text stringlengths 1 1.05M |
|---|
insert into PERSON (ID, NAME) values (4, 'effine');
|
-- https://classroom.udacity.com/nanodegrees/nd027/parts/f7dbb125-87a2-4369-bb64-dc5c21bb668a/modules/a7801de4-ee3f-4531-b887-82dea67f47a6/lessons/01995bb4-db30-4e01-bf38-ff11b631be0f/concepts/1533c19b-0505-49fd-b1b7-06c987641f0d
-- https://www.postgresql.org/docs/13/ddl-basics.html
-- https://www.postgresql.org/docs... |
CREATE TABLE `m_floating_rates` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(200) NOT NULL,
`is_base_lending_rate` BIT(1) NOT NULL DEFAULT 0,
`is_active` BIT(1) NOT NULL DEFAULT 1,
`createdby_id` BIGINT(20) NOT NULL,
`created_date` DATETIME NOT NULL,
`lastmodifiedby_id` BIGINT(20) NOT NULL,
`lastmo... |
INSERT INTO USER_DOMAIN (USER_NAME, USER_SURNAME) VALUES
('Eni','Berisha'),
('Andi','Berisha'),
('Sid','Tellalhari'),
('John','Behar');
INSERT INTO TASK_DOMAIN (HAS_TASK_BEEN_COMPLETED_CHECK, TASK_NAME,USER_ID) VALUES
('Y','taxes',1),
('Y','Laundry',2),
('N','Walk the dog',3); |
{{
config(
materialized='table'
)
}}
SELECT
order_id,
promo_id,
user_id,
address_id,
created_at,
order_cost,
shipping_cost,
order_total,
tracking_id,
shipping_service,
estimated_delivery_at,
delivered_at,
status
FROM {{ source('tutorial', 'orders') }}
|
DROP TABLE categories;
DROP TABLE tags;
DROP TABLE votes;
DROP TABLE leave_words;
DROP TABLE friend_links;
DROP TABLE links;
DROP TABLE cards;
|
DROP DATABASE domainhunter;
CREATE DATABASE domainhunter
WITH
OWNER = postgres
ENCODING = 'UTF8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
DROP TABLE public.domain;
CREATE TABLE public.domain (
id SERIAL NOT NULL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
tld VARCHAR(10) NOT NULL,
exp... |
DROP INDEX IF EXISTS "VonageSessionLayout_vonageSessionId";
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 17, 2020 at 05:21 PM
-- Server version: 10.3.15-MariaDB
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
SELECT t1.name, count(*)
FROM
site as s,
so_user as u1,
question as q1,
answer as a1,
tag as t1,
tag_question as tq1
WHERE
q1.owner_user_id = u1.id
AND a1.question_id = q1.id
AND a1.owner_user_id = u1.id
AND s.site_id = q1.site_id
AND s.site_id = a1.site_id
AND s.site_id = u1.site_id
AND s.site_id = tq1.site_id
AND s.s... |
### Schema
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers
(
id int AUTO_INCREMENT,
burger_name varchar(255) NOT NULL,
devoured BOOLEAN DEFAULT false,
PRIMARY KEY (id)
);
|
-- Email
CREATE TABLE email (
id uuid NOT NULL,
email character varying(255) NOT NULL,
verified boolean NOT NULL
);
ALTER TABLE email
ADD CONSTRAINT email_pkey PRIMARY KEY (id);
ALTER TABLE email
ADD CONSTRAINT email_uk_email UNIQUE (email);
-- Email verification token
CREATE TABLE email_verifi... |
ALTER TABLE admins ADD password VARCHAR(100);
UPDATE admins set password=crypt(email, gen_salt('bf', 10));
ALTER TABLE admins ALTER COLUMN password SET NOT NUll;
|
insert into model(`model_name`) values('Alice');
|
#|frequency |flux |
113.499387796 -0.00678305141628
113.495660179 -0.0134488940239
113.491932808 -0.00309644965455
113.488205681 0.00969441514462
113.484478798 0.0137932784855
113.480752161 -0.00175093684811
113.477025768 0.00593731412664
113.47329962 0.0160758625716
113.469573717 0.00470563024282
113.46584805... |
TRUNCATE dataflow_batch_export;
TRUNCATE dataflow_batch_import;
TRUNCATE log_customer;
TRUNCATE log_quote;
TRUNCATE log_summary;
TRUNCATE log_summary_type;
TRUNCATE log_url;
TRUNCATE log_url_info;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;
TRUNCATE log_visitor_online;
TRUNCATE report_event;
TRUNCATE report_viewed... |
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
-- Copyright [2016-2020] EMBL-European Bioinformatics Institute
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may ob... |
/*
Enter your query here.
*
* *
* * *
* * * *
* * * * *
*/
set @number=0;
select repeat('* ', @number := @number + 1)
from information_schema.tables
where @number<20;
/*
Enter your query here.
* * * * *
* * * *
* * *
* *
*
*/
set @number=21;
select repeat('* ', @number := @number - 1)
from information_sch... |
SET SEARCH_PATH TO STAGING_VOCABULARY;
-- CREATE INDEXES ON OMOP VOCABULARY TABLES --
-- drug strength
CREATE INDEX idx_stg_drug_strength_id_1
ON drug_strength
USING btree
(drug_concept_id);
ALTER TABLE drug_strength CLUSTER ON idx_stg_drug_strength_id_1;
CREATE INDEX idx_stg_drug_strength_id_2
... |
CREATE TABLE #Codesets (
codeset_id int NOT NULL,
concept_id bigint NOT NULL
)
;
INSERT INTO #Codesets (codeset_id, concept_id)
SELECT 0 as codeset_id, c.concept_id FROM (select distinct I.concept_id FROM
(
select concept_id from @vocabulary_database_schema.CONCEPT where concept_id in (4180793)
UNION select c.c... |
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : demo
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 21/05/2019 01:01... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.8
-- Dumped by pg_dump version 9.5.8
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
... |
-- link: https://leetcode.com/problems/employees-earning-more-than-their-managers/description/
-- The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.
-- Given the Employee table, write a SQL query that finds out employees who earn mor... |
SELECT sum(s) FROM (SELECT y AS s FROM remote('127.0.0.{1,2}', test, big_array) ARRAY JOIN x AS y);
DROP TABLE test.big_array;
|
-- CLTPHP SQL Backup
-- Time:2017-04-05 14:51:47
-- http://www.cltphp.com
--
-- 表的结构 `clt_ad`
--
DROP TABLE IF EXISTS `clt_ad`;
CREATE TABLE `clt_ad` (
`ad_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '广告名称',
`type_id` tinyint(5) NOT NULL COMMENT '所属位置',
`pic` varchar(2... |
-- MySQL dump 10.16 Distrib 10.1.7-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: simpleblog
-- ------------------------------------------------------
-- Server version 10.1.7-MariaDB-1~trusty-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_... |
INSERT INTO Company(CompanyName , ContactFirstName , ContactLastName,ContactNumber , ContactEmail ,Street , City , Province ,PostalCode , PWD) VALUES
('Beauxbatons','Tom','Riddle','5149834356','Tom@gmail.com','Hogwarts st.','London','ON','K0L1C1','c89636');
INSERT INTO Company(CompanyName , Contact... |
ALTER TABLE "public"."resume"
DROP COLUMN "version_date"; |
# --- !Ups
alter table users drop column if exists default_language;
alter table users add column default_language_id bigint;
alter table users add constraint fk_default_language_languages foreign key (default_language_id) references languages (id) on delete restrict on update restrict;
create index ix_users_default_l... |
ALTER TABLE `t_device_online` ADD COLUMN `intranetIp` varchar(30) COMMENT '内网IP' AFTER `status`;
ALTER TABLE `t_device_mapping`
ADD COLUMN `hostname` varchar(255) NULL AFTER `remote_port`;
ALTER TABLE `t_device_mapping`
ADD COLUMN `bind_tls` int(1) NULL AFTER `hostname`;
ALTER TABLE `t_device_online` CHANGE CO... |
/****** Object: StoredProcedure [dbo].[LocalErrorHandler] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[LocalErrorHandler]
/****************************************************
**
** Desc: This procedure should be called from within a Try...Catch block
** It will genera... |
SET SEARCH_PATH TO armydb;
INSERT INTO "manufacturing_details" (weapon_id, manufacturing_date, manufacting_location, company_name) VALUES (1053,'2000-01-1','Argentina','Bersa');
INSERT INTO "manufacturing_details" (weapon_id, manufacturing_date, manufacting_location, company_name) VALUES (1054,'2001-02-2','Australia'... |
SELECT bands.name AS 'Band Name'
FROM bands; |
set client_encoding = 'utf-8';
set client_min_messages = warning;
create extension if not exists pgtap;
reset client_min_messages;
begin;
select plan(27);
select has_materialized_view(
'swrs_transform', 'permit',
'swrs_transform.permit should be a materialized view'
);
select has_index(
'swrs_transform',... |
-- extract articles with named entities
-- columns articleId, entity name, entity type name and article text
SELECT
pa.project_article_id AS 'id',
et.name AS 'type',
e.name AS 'name',
REPLACE(CONCAT(a.title, ' ', a.body), '"', '\"') AS 'text'
FROM
`project_article` AS pa
INNER JOIN
`article` AS a ON pa.article_... |
DROP TABLE IF EXISTS user_in_gist_information CASCADE;
DROP TABLE IF EXISTS gist_content_information CASCADE;
DROP TABLE IF EXISTS gist_information CASCADE;
|
-- MySQL dump 10.16 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: admin_dev
-- ------------------------------------------------------
-- Server version 10.1.26-MariaDB-0+deb9u1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... |
-- dialect: PostgreSQL
-- from running `psql -E` and entering \d <some table name>
SELECT c.relchecks, c.relkind, c.relhasindex, c.relhasrules, c.relhastriggers, c.relrowsecurity, c.relforcerowsecurity, c.relhasoids, '', c.reltablespace, CASE WHEN c.reloftype = 0 THEN '' ELSE c.reloftype::pg_catalog.regtype::pg_catalo... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 22, 2021 at 09:31 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
/*
MySQL Data Transfer
Source Host: localhost
Source Database: pos
Target Host: localhost
Target Database: pos
Date: 23/02/2021 13:03:18
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for barang
-- ----------------------------
CREATE TABLE `barang` (
`kode_barang` varcha... |
-- USER is a reserved keyword with Postgres
-- You must use double quotes in every query that user is in:
-- ex. SELECT * FROM "user";
-- Otherwise you will have errors!
CREATE TABLE "Users" (
"id" serial PRIMARY KEY,
"email" VARCHAR(255) NOT NULL,
"name" VARCHAR(255), -- should be NOT NULL in future
"passw... |
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
DROP TABLE KEYWORD;
DROP TABLE STG_KEYWORD;
DROP TABLE STG_KEYWORD_AGG;
-- Staging table for keywords, truncated before processing each class
CREATE TABLE STG... |
{% macro get_user_columns() %}
{% set columns = [
{"name": "company", "datatype": dbt_utils.type_string()},
{"name": "id", "datatype": dbt_utils.type_int()},
{"name": "login", "datatype": dbt_utils.type_string()},
{"name": "name", "datatype": dbt_utils.type_string()}
] %}
{{ return(columns) }}
{% end... |
/*
Select returns detailed concurent program information from concurrent request id
*/
accept Enter_request_id prompt 'Please enter request_id : ';
SELECT cr.request_id,
re.responsibility_key AS RESPONSIBILITY,
us.user_name,
us.description,
us.email_address ,
cp.concurrent_program_name AS Concurrent_... |
GRANT EXECUTE ON FUNCTION pg_stat_statements_reset TO citus WITH GRANT OPTION;
GRANT EXECUTE ON FUNCTION citus_stat_statements_reset TO citus WITH GRANT OPTION;
|
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : CaretClassifier_svmPoly_pca
-- Dataset : iris_date_tgt
-- Database : db2
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model deployment code
WITH "ADS_... |
-- BP 6.1D content: domain syschar: 3
INSERT INTO S_DOM
VALUES (15122,
'dogs',
'This test deals with simple relationships between two classes.
It creates a number of instances of each class and relates them.
The instances proceed to generate events to themselves and to one another.
Executes unrelates betwee... |
CREATE TABLE [dbo].[SQLVersion] (
[SQLVersionId] INT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (100) NOT NULL,
[Description] NVARCHAR (500) NOT NULL,
[IsActive] BIT NOT NULL,
[CreatedOn] DATETIME CONSTRAINT [DF_SQLVersion_CreatedOn] DEFAULT (getdate(... |
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may no... |
CREATE DATABASE IF NOT EXISTS `fortuna` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `fortuna`;
CREATE TABLE IF NOT EXISTS `users` (
`UserId` int(11) NOT NULL AUTO_INCREMENT,
`Email` varchar(128) NOT NULL,
`PassHash` varchar(128) NOT NULL,
`Salt` varchar(64) NOT NULL,
`Confirm` varchar(64) DEFAULT NULL,
... |
CREATE TABLE `tbl_platform` (
`id` bigint unsigned,
`roleId` int(11) not null,
PRIMARY KEY (`id`),
UNIQUE KEY `idx_roleId` (`roleId`)
) ENGINE=innodb DEFAULT CHARSET=utf8 COMMENT='平台账号对应角色';
CREATE TABLE `tbl_role` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(64),
`rank` int(11) not null DEF... |
-- Copyright (c) 2007, 2013, Oracle and/or its affiliates.
-- Copyright (c) 2008, 2014, Monty Program Ab & SkySQL Ab
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; version 2 of the Licen... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 02, 2019 at 02:56 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- use text for groups
ALTER TABLE `sys_user` CHANGE `groups` `groups` TEXT;
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 30, 2020 at 06:31 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
-- Drops the burgers_db if it already exists --
DROP DATABASE IF EXISTS burgers_db;
-- Create the database burgers_db and specified it for use.
CREATE DATABASE burgers_db;
USE burgers_db;
-- Create the table plans.
CREATE TABLE burgers (
id int NOT NULL AUTO_INCREMENT,
burger_name varchar(255) NOT NULL,
devou... |
DELIMITER $$
CREATE FUNCTION emp_info(p_first_name varchar(255), p_last_name varchar(255)) RETURNS decimal(10,2)
BEGIN
DECLARE v_max_from_date date;
DECLARE v_salary decimal(10,2);
SELECT
MAX(from_date)
INTO v_max_from_date FROM
employees e
JOIN
salaries s ON e... |
CREATE FUNCTION tracked_deletes_datavalidation.RuleStatusDescriptor_TR_DelTrkg()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO tracked_deletes_datavalidation.RuleStatusDescriptor(RuleStatusDescriptorId, Id, ChangeVersion)
SELECT OLD.RuleStatusDescriptorId, Id, nextval('changes.ChangeVersionSequence')
FROM... |
DROP DATABASE IF EXISTS employeeTracker_db;
CREATE DATABASE employeeTracker_db;
USE employeeTracker_db;
CREATE TABLE employee (
id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
role_id INT NOT NULL,
manager_id INT,
FOREIGN KEY (role_id) REFERENC... |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE routes (
id UUID DEFAULT uuid_generate_v4() PRIMARY KEY,
slug VARCHAR NOT NULL UNIQUE ,
creator_id UUID,
target VARCHAR NOT NULL,
active BOOLEAN NOT NULL DEFAULT 't',
active_from TIMESTAMP, -- time based activation
active_till TIMESTA... |
SET DEFINE OFF;
ALTER TABLE AFW_01_EVENM_NOTFB ADD (
CONSTRAINT AFW_01_EVENM_NOTFB_UK1
UNIQUE (CODE, REF_STRUC_APLIC)
ENABLE VALIDATE)
/
|
create table customer (id InT PRIMARY KEY AUTO ONCREMENT,
firstname VARCHAR(30), lastname VARCHAR(30));
|
CREATE TABLE IF NOT EXISTS %pre%post (
log_ID int(11) NOT NULL AUTO_INCREMENT,
log_CateID int(11) NOT NULL DEFAULT '0',
log_AuthorID int(11) NOT NULL DEFAULT '0',
log_Tag varchar(250) NOT NULL DEFAULT '',
log_Status tinyint(4) NOT NULL DEFAULT '0',
log_Type int(11) NOT NULL DEFAULT '0',
log_Alias v... |
IF NOT EXISTS (select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='sa' and TABLE_NAME='sa_alueluokitus') BEGIN
CREATE TABLE sa.sa_alueluokitus(
id bigint IDENTITY(1,1) NOT NULL,
koodi nvarchar(3) NOT NULL,
nimi nvarchar(200) NULL,
nimi_sv nvarchar(200) NULL,
nimi_en nvarchar(200) NULL,
alkupvm date... |
CREATE PROCEDURE [dbo].[sp-select-customers]
@custid int = 0
AS
SELECT count(*) from dbo.Customer where id = @custid
RETURN 0
|
ALTER TABLE QUERY ADD COLUMN DASH_UUID varchar(255) DEFAULT NULL;
UPDATE QUERY INNER JOIN DASH ON (QUERY.DASH_ID = DASH.ID) SET QUERY.DASH_UUID = DASH.UUID;
ALTER TABLE QUERY DROP COLUMN DASH_ID |
-- file:rowsecurity.sql ln:1420 expect:true
ALTER POLICY p ON tbl1 TO regress_rls_frank USING (true)
|
SET send_logs_level = 'fatal';
DROP DATABASE IF EXISTS database_for_dict_01018;
CREATE DATABASE database_for_dict_01018;
DROP TABLE IF EXISTS database_for_dict_01018.table_for_dict;
CREATE TABLE database_for_dict_01018.table_for_dict
(
key_column UInt64,
second_column UInt8,
third_column String
)
ENGINE = Mer... |
SELECT *
FROM CITY;
|
DROP INDEX CONCURRENTLY IF EXISTS "post_history_post_id_idx";
DROP INDEX CONCURRENTLY IF EXISTS "post_history_categories_idx";
DROP INDEX CONCURRENTLY IF EXISTS "post_history_state_idx";
DROP TABLE IF EXISTS "post_history";
|
-- This file and its contents are licensed under the Timescale License.
-- Please see the included NOTICE for copyright information and
-- LICENSE-TIMESCALE for a copy of the license.
\ir include/rand_generator.sql
\c :TEST_DBNAME :ROLE_SUPERUSER
\ir include/compression_utils.sql
SET client_min_messages = ERROR;
DRO... |
/*********
CONCEPT LEVEL check:
PLAUSIBLE_GENDER - number of records of a given concept which occur in person with implausible gender for that concept
Parameters used in this template:
cdmDatabaseSchema = @cdmDatabaseSchema
cdmTableName = @cdmTableName
cdmFieldName = @cdmFieldName
conceptId = @conceptId
plausibleGend... |
CREATE SCHEMA IF NOT EXISTS training_cucumber;
|
create table items (
id integer
);
alter table items enable row level security;
create table projects (
id integer
);
alter table projects force row level security;
|
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 25, 2017 at 07:24 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.5.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
--Recompile
sp_recompile 'Insert_Data_Session' |
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Puja](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Precio] [int] NULL,
[IdPiedra] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Puja] ADD PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNOR... |
CREATE TABLE underscored_no_fields (
id INT NOT NULL,
sample_table_id INT NOT NULL,
PRIMARY KEY (id),
CONSTRAINT underscored_no_fields_sample_table_id_fkey FOREIGN KEY (sample_table_id) REFERENCES sample_table(id) ON DELETE NO ACTION ON UPDATE CASCADE
);
|
select * from dm_documents where name like 'Client - Enclosing ATE%'
update dm_documents set createdbyref = 'JJH' where name = 'Client - Enclosing ATE policy (LVPI-PM)' |
/* NOTE that all extents in this file assume *no* initial data load.
If the table will have data, you must calculate accordingly or performance
will be *bad*. Change table, PK and index creation statements only for
those tables which will have an initial data load.
Altered by Andrew Gilmore to reflect esti... |
--Problem URL: https://www.hackerrank.com/challenges/average-population-of-each-continent/problem
SELECT
COUNTRY.CONTINENT,
FLOOR(AVG(CITY.POPULATION))
FROM
COUNTRY
INNER JOIN CITY ON COUNTRY.CODE = CITY.COUNTRYCODE
GROUP BY
COUNTRY.CONTINENT;
|
DROP TABLE IF EXISTS sessiones_activas;
create table sessiones_activas (
id_session varchar(40),
usuario varchar(20),
id_sucursal MEDIUMINT,
jerarquia varchar(5),
finaliza varchar(20)
);
alter table sessiones_activas add index id_session(id_session);
DROP TABLE IF EXISTS datos_caja;
create table datos_caja (
id... |
SELECT * FROM deaths; |
--
-- YB_TABLEGROUP Testsuite: Testing Statments for TABLEGROUP.
--
\h CREATE TABLEGROUP
\h ALTER TABLEGROUP
\h DROP TABLEGROUP
--
-- pg_catalog alterations. Validate columns of pg_yb_tablegroup and oids.
--
\d pg_yb_tablegroup
SELECT oid, relname, reltype, relnatts FROM pg_class WHERE relname IN ('pg_yb_tablegroup', ... |
-- @testpoint:opengauss关键字leading(保留),作为角色名
--关键字不带引号-合理报错
drop role if exists leading;
create role leading with password 'gauss@123' valid until '2020-12-31';
--关键字带双引号-成功
drop role if exists "leading";
create role "leading" with password 'gauss@123' valid until '2020-12-31';
--清理环境
drop role "leading";
--关键字带单引号... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5ubuntu0.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 18, 2021 at 06:21 PM
-- Server version: 5.7.32-0ubuntu0.18.04.1
-- PHP Version: 7.3.20-1+ubuntu18.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
... |
CREATE OR REPLACE FUNCTION test_set_roles_function()
RETURNS SETOF TEXT
LANGUAGE plpgsql
AS $$
DECLARE
test_enterprise CONSTANT enterprises.name%TYPE = 'BigCo';
test_user CONSTANT users.name%TYPE = 'BigCo User';
test_organization CONSTANT organizations.name%TYPE = 'BigCo Engineering';
test_project CONSTANT pro... |
--
-- Timeperiods.
--
CREATE TABLE mod_bam_reporting_timeperiods (
timeperiod_id int NOT NULL,
name varchar(200) NOT NULL,
sunday varchar(200) default NULL,
monday varchar(200) default NULL,
tuesday varchar(200) default NULL,
wednesday varchar(200) default NULL,
thursday varchar(200) default NULL,
frid... |
DELETE dbo.tblUsers
WHERE Country = 'United states' AND Team = 'Maximum PC Magazine' |
CREATE OR REPLACE FUNCTION solarnet.calc_avg_watt_hours(real, real, real, real,
double precision, double precision, interval)
RETURNS double precision AS
$BODY$
SELECT CASE
WHEN
/* Wh readings available, so use difference in Wh */
$5 IS NOT NULL AND $6 IS NOT NULL AND $5 > $6
THEN $5 - $6
WHEN ... |
/*
correct_BnF_BLIC.sql is a MySQL script intended to fix the logic
used to link to BnF by ISBN
Version: $Revision$
Date: $Date$
(C) COPYRIGHT 2017 Ahasuerus
ALL RIGHTS RESERVED
The copyright notice above does not evidence any actual or
intended publication of such source code.... |
-- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64)
--
-- Host: localhost Database: rumoxdb
-- ------------------------------------------------------
-- Server version 5.7.29
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!... |
CREATE TABLE BOOK (ID BIGINT NOT NULL, DESCRIPTION VARCHAR(255), ILLUSTRATIONS SMALLINT DEFAULT 0, ISBN VARCHAR(255), NBOFPAGE INTEGER, PRICE FLOAT, TITLE VARCHAR(255), PRIMARY KEY (ID))
CREATE SEQUENCE SEQ_GEN_SEQUENCE INCREMENT BY 50 START WITH 50
|
INSERT INTO tb_user (NAME, EMAIL, PASSWORD, ACTIVE, DATE_REQUEST_PASSWORD, CODE_REQUEST_PASSWORD, NUMBER_REQUESTS_PASSWORD, CREATED_AT, UPDATED_AT) VALUES ('Bob', 'bob@gmail.com', '$2a$10$eACCYoNOHEqXve8aIWT8Nu3PkMXWBaOxJ9aORUYzfMQCbVBIhZ8tG', true, null, null, null, CURRENT_TIMESTAMP(0)::TIMESTAMP WITHOUT TIME ZONE, n... |
UPDATE CONFIG set version = '8.1';
ALTER TABLE CENTRE_COUTS DROP FOREIGN KEY fk_couts_responsable;
ALTER TABLE CENTRE_COUTS DROP idResponsable;
|
Select * from xafnfc.sttm_cust_personal U WHERE U.Last_Name LIKE '%NWAME%' and U.First_Name LIKE '%VICTOR%'
select * from xafnfc.smtb_user P WHERE P.USER_NAME LIKE '%SEVI%' --AND P.Home_Branch = '023'
select U.User_Id, U.User_Name, U.Customer_No, U.Home_Branch from xafnfc.smtb_user U
WHERE U.Record_Stat = 'O'
o... |
USE demo
DECLARE @UnixTimeStamp BIGINT = 1599624698
SELECT dbo.udf_ConvertUnixTimeStamp(@UnixTimeStamp) AS TheDate |
---
name: srv_alias
description: Lists all email aliases
templates:
- backend.backend
returns: TABLE
returns_columns:
-
name: localpart
type: email.t_localpart
-
name: domain
type: dns.t_hostname
-
name: mailbox_localpart
type: email.t_localpart
-
name: mailbox_domain
type: dns.t_hostname
-
na... |
CREATE DATABASE price_watch;
USE price_watch;
CREATE TABLE Searches (
SearchID INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
UpdatedDate TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FlightFrom VARCHAR(3) NOT NULL,
FlightTo VARCHAR(3) NOT NULL,
FlightDate DATE NOT NULL,
Currency VARCHA... |
ALTER TABLE `groups` CHANGE `sType` `sType` ENUM( 'Root', 'Class', 'Club', 'Friends', 'Other' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `history_groups` CHANGE `sType` `sType` ENUM( 'Root', 'Class', 'Club', 'Friends', 'Other' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NUL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.