sql stringlengths 6 1.05M |
|---|
<gh_stars>1-10
drop table author;
create table author
(ssn varchar(11) primary key,
lastname varchar(40) not null,
firstname varchar(20) not null,
phone varchar(12) null,
address varchar(40) null,
city varchar(20) null,
state varchar(2) null,
zip varchar(5) null);
;
drop table publisher;
create table publish... |
<filename>src/test/resources/collate2.test_63.sql<gh_stars>100-1000
-- collate2.test
--
-- execsql {
-- SELECT a FROM collate2t1 WHERE NOT CASE a WHEN 'aa' THEN 1 ELSE 0 END;
-- }
SELECT a FROM collate2t1 WHERE NOT CASE a WHEN 'aa' THEN 1 ELSE 0 END; |
-- CreateTable
CREATE TABLE "PublishedTree" (
"uuid" UUID NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"name" TEXT NOT NULL,
"treeData" JSONB,
"ownerUuid" UUID NOT NULL,
CONSTRAINT "PublishedTree_pkey" PRIMARY KEY ("uuid")
);
-- AddForeignKey
ALTER TABLE "PublishedTre... |
<gh_stars>100-1000
INSERT INTO all_eps_log VALUES(now(), NULL); |
--
-- adjust the schema name if necessary
-- currently (tpcds_500_parquet)
--
create schema tpcds_500_parquet;
use tpcds_500_parquet;
--
-- unpartitioned tables
--
create table call_center like tpcds_500_text.call_center stored as parquet;
create table catalog_page like tpcds_500_text.... |
<gh_stars>0
INSERT IGNORE INTO `roles` VALUES (1,'ADMIN');
INSERT IGNORE INTO `roles` VALUES (2, 'EMPLOYEE');
INSERT IGNORE INTO `roles` VALUES (3, 'USER'); |
<reponame>making-books-ren-today/test_eval_3_shxco
-- MySQL dump 10.13 Distrib 5.7.17, for osx10.12 (x86_64)
--
-- Host: localhost Database: mepprod
-- ------------------------------------------------------
-- Server version 5.7.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD... |
SELECT fn_db_add_column('vm_external_data', 'tpm_hash', 'TEXT');
SELECT fn_db_add_column('vm_nvram_data', 'nvram_hash', 'TEXT');
|
--
-- hpc_data_management_configuration.sql
--
-- Copyright SVG, Inc.
-- Copyright Leidos Biomedical Research, Inc
--
-- Distributed under the OSI-approved BSD 3-Clause License.
-- See http://ncip.github.com/HPC/LICENSE.txt for details.
--
--
-- @author <a href="mailto:<EMAIL>"><NAME></a>
--
ALTER TABLE HPC_DATA_MANA... |
INSERT INTO `plants` (`user_id`, `name`, `species`, `pot_type`, `pot_size`, `soil_type`, `height`, `profile_photo_path`, `created_at`, `updated_at`) VALUES
(1, 'Brandushe', 'aloe', 'ceramic', '10', 'Succulent Soil', 15, null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(1, 'Spinisor', 'elephant_bush', 'plastic', '1... |
<reponame>TFE-2020-21-ISPT-DIALUNDAMA-Peniel/ePublish
SELECT * FROM etudiants
left JOIN etudiants_succes
on etudiants.matricule=etudiants_succes.matricule_etudiant
WHERE (etudiants_succes.matricule_etudiant is NULL) OR etudiants_succes.idsessions >= $idsessions
Etudiant::leftJoin('etudiants_succes ', 'etudia... |
select
IFNULL(details.deptname, 'No associated department') AS 'Department',
details.empcount AS 'Employee Count',
concat('$', format(sum(details.totalsalary), 2)) AS 'Total Utilized Budget'
from
(select
count(employee.id) empcount,
role.title,
sum(role.salary) totalsalary,
department.name deptname
from
employ... |
CREATE DATABASE name_of_database CHARACTER SET utf8 COLLATE utf8_general_ci; |
INSERT INTO `mayor_consumo_view` VALUES ('QUICK', 110277.30, 'QUICK-Stop');
INSERT INTO `mayor_consumo_view` VALUES ('ERNSH', 104874.98, 'Ernst Handel');
INSERT INTO `mayor_consumo_view` VALUES ('SAVEA', 104361.95, 'Save-a-lot Markets');
INSERT INTO `mayor_consumo_view` VALUES ('RATTC', 51097.80, 'Rattlesnake Canyon Gr... |
<reponame>aidulazmi/aplikasi-rute-transmetro-Pekanbaru<filename>si_buswey.sql
-- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 16, 2019 at 06:01 PM
-- Server version: 5.5.32
-- PHP Version: 5.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone ... |
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Feb 18, 2022 at 01:54 PM
-- Server version: 5.6.38
-- PHP Version: 7.2.1
SET SQL_MODE
= "NO_AUTO_VALUE_ON_ZERO";
SET time_zone
= "+00:00";
--
-- Database: `cine`
--
-- -------------------------------... |
<gh_stars>1-10
CREATE TABLE `SITE_DB`.`user_log_payment_reminders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`order_id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `order_id` (`order_id`),
CON... |
INSERT INTO user (id, username, password, firstname, lastname, email, enabled, lastpasswordresetdate) VALUES (1, 'admin', '$2a$08$lDnHPz7eUkSi6ao14Twuau08mzhWrL4kyZGGU5xfiGALO/Vxd5DOi', 'admin', 'admin', '<EMAIL>', 1, '2016-01-01');
INSERT INTO user (id, username, password, firstname, lastname, email, enabled, lastpass... |
SELECT COUNT (*) AS QTDPEDIDOS
FROM PCPEDC C
LEFT JOIN PCCLIENT T ON C.CODCLI = T.CODCLI
LEFT JOIN PCUSUARI U ON T.CODUSUR1 = U.CODUSUR
LEFT JOIN PCSUPERV V ON U.CODSUPERVISOR = V.CODSUPERVISOR
WHERE C.POSICAO NOT IN (
'C', 'F'
)
AND V.CODGERENTE IN (
1, 8, 9, 10
)
AND T.USADEBCREDRCA = 'N'
AN... |
/* Definition for the CLEAR_PEERS procedure : */
------------------------------------------------------------------------------
-- Create date: 2020-02-15
-- Autor: <NAME>
--
-- Description:
-- Deletes peer information like address, name and so on.
--------------------------------------------------------------------... |
<reponame>jdkoren/sqlite-parser<gh_stars>100-1000
-- tkt-f777251dc7a.test
--
-- execsql {
-- SELECT ins() AS x FROM t2 UNION ALL SELECT ins() AS x FROM t1
-- }
SELECT ins() AS x FROM t2 UNION ALL SELECT ins() AS x FROM t1 |
-- original: join4.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
create temp table t1(a integer, b varchar(10));
insert into t1 values(1,'one');
insert into t1 values(2,'two');
insert into t1 values(3,'three');
insert into t1 values(4,'four');
create temp table t2... |
-- 2020-06-09T12:58:00.058Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Reference_Value_ID,ColumnName,Created,CreatedBy,DisplayLogic,EntityType,FieldLength,IsActive,IsAutocomplete,... |
<gh_stars>1000+
-- 2018-06-11T11:19:54.049
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process_Para SET AD_Val_Rule_ID=131,Updated=TO_TIMESTAMP('2018-06-11 11:19:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=541310
;
|
-- src/clojure-discord-example/db/sql/messages.sql
-- :name insert-message :! :n
-- :doc Insert a single character
insert into messages (info)
values (:message)
--WITHOUT FUNCTION AS IMPLICIT
-- :name random-message :! :n
-- :doc get a random message
select
info -> 'content' as content
from
messages
where
info -> 'a... |
-- Adding a `NOT NULL` constraint to version column in `messages` table
-- and adding the same column also to the `conversations` table.
-- Drop related triggers, to avoid errors when dropping old tables.
DROP TRIGGER track_deletes_of_conversations;
DROP TRIGGER track_inserts_of_conversations;
DROP TRIGGER track_del... |
--DROP PROCEDURE GPSQLWEB.procCountValora
CREATE PROCEDURE GPSQLWEB.procCountValora (
IN P_VLOEMP varchar(2),
IN P_VLODEL varchar(2),
IN P_VLOCOA varchar(12),
IN P_VLOCON bigint,
IN P_VLONOM varchar(40),
IN P_VLOUNI double,
IN P_VLOLIQ varchar(1),
IN P_VLODIV INTEGER,
IN P_VLOCLS varchar(1),
IN P_VL... |
<gh_stars>1-10
BEGIN;
ALTER TABLE "workers"
DROP CONSTRAINT IF EXISTS "addr_when_running",
ADD CONSTRAINT "addr_when_running" CHECK (((state <> 'stalled'::worker_state) AND (state <> 'landed'::worker_state) AND ((addr IS NOT NULL) OR (baggageclaim_url IS NOT NULL))) OR (state = 'stalled'::worker_state) OR (state ... |
<filename>doc/modules/cassandra/examples/CQL/timeuuid_min_max.cql<gh_stars>1-10
SELECT * FROM myTable
WHERE t > maxTimeuuid('2013-01-01 00:05+0000')
AND t < minTimeuuid('2013-02-02 10:00+0000');
|
<gh_stars>0
SELECT net as network,
count(*) as number_of_event
from earthquakes
group by net
|
<gh_stars>1-10
-- Show activity of replication slots.
-- Min. required version: Postgres 10
SELECT
r.client_addr,
r.usename,
s.database,
r.application_name,
s.slot_name,
s.plugin,
s.slot_type,
s.temporary,
s.active,
pg_size_pretty(pg_current_wal_lsn(... |
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/KEYWORDS/preferred/Opengauss_Function_Keyword_Preferred_Case0032.sql
-- @testpoint:opengauss关键字preferred(非保留),作为用户名
--关键字preferred作为用户名不带引号,创建成功
drop user if exists preferred;
CREATE USER preferred PASSWORD '<PASSWORD>';
drop user preferred;
--关键字preferr... |
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: crawl-data-amazon
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.19-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR... |
<gh_stars>0
drop graph g cascade;
create graph g;
select set_graph_path('g');
SET search_path TO 'g';
CREATE VLABEL person;
CREATE ELABEL knows;
CREATE (:person {name: 'Tom'})-[:knows {fromdate:'2011-11-24'}]->(:person {name: 'Summer'});
CREATE (:person {name: 'Pat'})-[:knows {fromdate:'2013-12-25'}]->(:person {name:... |
USE t17;
INSERT IGNORE INTO jos_dp_device_model_family (device_model_family_id, ac_family_code, family_name, is_enabled, os3_emulator_device_id, model_family_group_id, model_family_type_id, min_os_version_id, max_os_version_id, release_date, platform_id)
VALUES
(1423,1423,'iPhone 6',1,1400,1400,1400,950800,950800,... |
PRAGMA foreign_keys=off;
BEGIN TRANSACTION;
COMMIT;
PRAGMA foreign_keys=on;
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 18, 2021 at 01:39 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 7.4.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
<reponame>rochaandre/scripts-oracle-named
-- Performance statistics for Sort, RBS, and redo logs
--Sorts (disk/memory)% Should be (<10%)
--Rbs Wait (waits/gets)% Should be(<1%)
--Redo buffer waits()% Should be nearly zero%
set serveroutput on
set feedback off
declare
logical_reads number := null;
disk_s... |
/*
Navicat MySQL Data Transfer
Source Server : first_mysql
Source Server Version : 50720
Source Host : localhost:3306
Source Database : achieveit
Target Server Type : MYSQL
Target Server Version : 50720
File Encoding : 65001
Date: 2020-02-26 15:14:09
*/
SET FOREIGN_KEY_CHECKS=0;
... |
<filename>database/sp_gangguan_kecemasan(1).sql<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 22, 2021 at 04:25 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET... |
-- file:polymorphism.sql ln:485 expect:true
select myleast()
|
<reponame>myarist/Codecademy
SELECT category,
price,
AVG(downloads)
FROM fake_apps
GROUP BY category, price; |
-- Name: register(text, text, text); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.register(em text, ps text, vinfo text) RETURNS public.jwt_token
LANGUAGE plpgsql SECURITY DEFINER
AS $$
declare
result public.jwt_token;
begin
insert into basic_auth.users
(email,pass,role,validated,... |
<filename>app/ThirdParty/php-sql-parser/tests/expected/creator/join.sql
SELECT a.*, surveyls_title, surveyls_description, surveyls_welcometext, surveyls_url FROM SURVEYS AS a INNER JOIN SURVEYS_LANGUAGESETTINGS ON (surveyls_survey_id = a.sid and surveyls_language = a.language) ORDER BY active DESC, surveyls_title ASC |
alter table pluginrepository add remote_repository_name varchar(64); |
<reponame>zhangleizjk/Nooper.Shop
/**
* Schema: Nooper_Shop
*/
drop schema if exists `nooper_shop`;
create schema if not exists `nooper_shop`
default character set utf8mb4
default collate utf8mb4_bin;
/**
* Working in Nooper_Shop
*/
use `nooper_shop`
/**
* Part 1: System
*/
/**
* ... |
--Returns the list of Child Group Ids for a given Group Id
CREATE FUNCTION [dbo].[GetChildAppSettingGroups]
(
@AppSettingGroupId INT
)
RETURNS @Result TABLE ([Id] INT, [ParentGroupId] INT) AS BEGIN
WITH Result ([AppSettingGroupId], [ParentGroupId])
AS
(
SELECT [AppSettingGroupId], [ParentGrou... |
<reponame>blinkops/blink-aws-query
select id, accepter_vpc_id, requester_vpc_id
from aws.aws_vpc_peering_connection
where id = '{{ output.id.value }}';
|
<reponame>laingsimon/vcdb<gh_stars>1-10
CREATE TABLE dbo.Person (
Id int identity,
Name nvarchar(255) not null,
Age int
)
GO
CREATE UNIQUE CLUSTERED INDEX IX_Person_Id ON dbo.Person (Id)
CREATE UNIQUE INDEX IX_Person_Name ON dbo.Person (Name)
CREATE INDEX IX_Person_Name_Age ON dbo.Person (Name ASC, Age DESC... |
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--
-- SYNC1 HEAP TABLE 1
--
create table sync1_heap_alter_part_split_partrange1 (i int) partition by range(i) (start(1) end(10) every(5));
--
-- Insert few records into the table
--
insert into sync1_heap_alter_part_split_partrange1 valu... |
CREATE TABLE IF NOT EXISTS translations(src_lang TEXT, tgt_lang TEXT, src TEXT, tgt TEXT, author TEXT, frontend TEXT,
inserted DATETIME default current_timestamp);
ALTER TABLE translations ADD ip_address TEXT default 'unknown';
CREATE TABLE IF NOT EXISTS access(src_lang TEXT, tgt_lang TEXT, input_nfc_len INTEGER, auth... |
select substring(to_char(tan(cast(4 as short))),0,16) from db_root;
select substring(to_char(tan(cast(4 as int))),0,16) from db_root;
select substring(to_char(tan(cast(4 as bigint))),0,16) from db_root;
select substring(to_char(tan(cast(4 as float))),0,16) from db_root;
select substring(to_char(tan(cast(4 ... |
<gh_stars>0
-- @testpoint:opengauss关键字minvalue(非保留),自定义数据类型名为explain
--关键字explain作为数据类型不带引号,创建成功
drop type if exists minvalue;
CREATE TYPE minvalue AS (f1 int, f2 text);
select typname from pg_type where typname ='minvalue';
drop type minvalue;
--关键字explain作为数据类型加双引号,创建成功
drop type if exists "minvalue";
CREATE TYPE ... |
DROP TABLE IF EXISTS [ChatUserInfos]
DROP TABLE IF EXISTS [UserRoles]
DROP TABLE IF EXISTS [ChatUsers];
DROP TABLE IF EXISTS [Attachments];
DROP TABLE IF EXISTS [AttachmentTypes];
DROP TABLE IF EXISTS [MessagesDeleteQueue];
DROP TABLE IF EXISTS [Messages];
DROP TABLE IF EXISTS [ChatInfos];
DROP TABLE IF EXISTS... |
<gh_stars>0
ALTER TABLE groups
RENAME TO teams;
-- link_ prefix to call it out as being a link table.
-- (This isn't in any style guide or anything. Just seemed like a good idea)
ALTER TABLE user_groups
RENAME TO link_users_teams;
ALTER TABLE link_users_teams
RENAME COLUMN group_id to team_id;
|
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 25, 2022 at 09:52 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
#strangegiggles02202018.sql
drop table if exists StrangeGigglesComics;
CREATE TABLE `StrangeGigglesComics` (
`ComicID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ComicTitle` varchar(80) DEFAULT NULL,
`ComicEdition` varchar(50) DEFAULT NULL,
`ComicPublisher` varchar(80) DEFAULT NULL,
`Date` varchar(... |
<filename>migrations/2020-12-20-032959_create_feeds/down.sql
DROP TABLE IF EXISTS feeds
|
DECLARE @DbName nvarchar(50)
SET @DbName = N'Write a DB Name here'
DECLARE @EXECSQL varchar(max)
SET @EXECSQL = ''
SELECT @EXECSQL = @EXECSQL + 'Kill ' + Convert(varchar, SPId) + ';'
FROM MASTER..SysProcesses
WHERE DBId = DB_ID(@DbName) AND SPId = @@SPId
EXEC(@EXECSQL) |
UPDATE BASI_050 x
SET
x.CONSUMO = 1
WHERE x.NIVEL_ITEM = 1
AND x.CONSUMO = 0
;
------------------------
UPDATE BASI_040 x
SET
SUB_COMP =
( SELECT
c.sub_comp
FROM BASI_050 c
WHERE c.NIVEL_ITEM = x.NIVEL_ITEM
AND c.GRUPO_ITEM = x.GRUPO_ITEM
AND c.SEQUENCIA = x.SEQUENCIA
)
WHERE x.NIV... |
<filename>init.sql
CREATE DATABASE application;
|
<gh_stars>1-10
------ START : Line Estimate application status ---
Insert into EGW_STATUS (ID,MODULETYPE,DESCRIPTION,LASTMODIFIEDDATE,CODE,ORDER_ID) values (nextval('SEQ_EGW_STATUS'),'LINEESTIMATE','Rejected',now(),'REJECTED',6);
------ END : Line Estimate application status ---
--rollback delete from egw_status where... |
USE `airdrome`
/*
Object application
*/
CREATE TABLE IF NOT EXISTS `object_application_languages` (
`id` TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(100) NOT NULL UNIQUE,
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT EXISTS `object_application_targets` (
`id` TINYINT UNSIGNED NOT NULL AUTO_... |
--people who shopped in 5 diffrent months in a given year from store
create or replace function repeatedShoppers (yr int)
returns refcursor
AS $$
declare
c1 refcursor := 'mycursor';
begin
open c1 for
select ss_customer_sk, count(*)
from
(select distinct ss_customer_sk, d_moy
from store_sales_histo... |
<filename>migrate/migrations/20200516114120_create_todo_task_list.up.sql
INSERT INTO task_lists (title, type, created_at) VALUES ('Todo', 'todo', NOW());
|
SET max_parallel_workers_per_gather = 0;
DROP TABLE IF EXISTS temp.fwa_watersheds_upstream_area_:wsg;
CREATE table temp.fwa_watersheds_upstream_area_:wsg
(watershed_feature_id integer, upstream_area double precision);
INSERT INTO temp.fwa_watersheds_upstream_area_:wsg
(watershed_feature_id, upstream_area)
-- find t... |
ALTER TABLE "public"."notification" ADD COLUMN "state" boolean NOT NULL DEFAULT true;
|
INSERT INTO department (department_name)
VALUES ("Sales"),
("Engineering"),
("Finance"),
("Legal")
INSERT INTO employee_role (title, salary, department_id)
VALUES ("Salesperson", 80000, 1),
("Lead Engineer", 150000, 2),
("Software Engineer", 120000, 2),
("Account Manag... |
/*
SQLyog Ultimate v9.02
MySQL - 5.5.5-10.4.10-MariaDB : Database - test
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHE... |
CREATE TABLE patient_age(
PES_ID_PACIENTE int,
year_ref int,
AGE int,
PRIMARY KEY(PES_ID_PACIENTE, year_ref, AGE)
);
|
SELECT * FROM world.city
WHERE CountryCode = 'BRA' AND Population > 1000000 |
<filename>cnprc_ehr/resources/schemas/dbscripts/sqlserver/obsolete/cnprc_ehr-16.33-16.34.sql
/*
* Copyright (c) 2016-2017 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License ... |
<filename>k8s/migration/V3__alter_tables.sql
ALTER TABLE owners ADD COLUMN name VARCHAR(255);
ALTER TABLE owners ADD COLUMN address VARCHAR(255);
ALTER TABLE owners ADD COLUMN city VARCHAR(255);
ALTER TABLE owners ADD COLUMN telephone VARCHAR(255);
ALTER TABLE owners ADD COLUMN pets VARCHAR(255);
ALTER TABLE vets ADD ... |
<filename>models/stg_lever__opportunity_stage_history.sql
with base as (
select *
from {{ ref('stg_lever__opportunity_stage_history_tmp') }}
),
fields as (
select
{{
fivetran_utils.fill_staging_columns(
source_columns=adapter.get_columns_in_relation(ref('stg_lever__... |
-- Exported from QuickDBD: https://www.quickdatabasediagrams.com/
-- Link to schema: https://app.quickdatabasediagrams.com/#/d/8haxFP
-- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here.
CREATE TABLE "employees" (
"emp_no" INT NOT NULL,
"emp_title" VARCHAR(30) NOT... |
-- @tags newvalue
-- comment
--@bugs MPP-1
select 'foo';
|
CREATE TABLE IF NOT EXISTS `kwc_article_authors` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`token` varchar(50) CHARACTER SET latin1 NOT NULL,
`firstname` varchar(100) CHARACTER SET latin1 NOT NULL,
`lastname` varchar(100) CHARACTER SET latin1 NOT NULL,
`feedback_email` varchar(200) CHARACTER SET latin1 NOT NULL... |
select
pg_xlog_location_diff(pg_last_xlog_replay_location(), '0/00000000')::bigint as wal_position,
pg_catalog.pg_is_in_recovery() as pg_is_in_recovery,
extract(epoch from now() - pg_last_xact_replay_timestamp())::float8 as time_lag; |
---- ALTER TABLE ... CHANGE COLUMN , type change
-- constraints : constraints : UNIQUE KEY not maintained in new def
-- ordering : no order defined
-- name : same or different
-- type : same or different
--------------------- UNIQUE keys
------- type the same, UNIQUE not maintained in new def
-- UNIQUE should be K... |
-- @testpoint:openGauss保留关键字placing作为作为表空间名,
--不带引号,合理报错
drop tablespace if exists placing;
CREATE TABLESPACE placing RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
--加双引号,创建成功
drop tablespace if exists "placing";
CREATE TABLESPACE "placing" RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
--清理环境
drop ... |
/*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 5.7.14 : Database - sir
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@F... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 16 Sep 2020 pada 20.04
-- Versi server: 10.4.14-MariaDB
-- Versi PHP: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.58.3
-- Generation Time: Jun 11, 2021 at 06:21 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
create database latihan;
use latihan;
create table mahasiswa(
nim char(10) not null primary key,
nama varchar(50) not null,
alamat text not null,
telepon char(15) not null
); |
<reponame>WidiantoBsi/PenggajianCV<filename>penggajian-ta.sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 16 Nov 2020 pada 14.04
-- Versi server: 10.1.38-MariaDB
-- Versi PHP: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TR... |
CREATE TABLE agency (
AGENCY_ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
PARENT_AGENCY_ID INT NULL,
AGENCY_TYPE VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
REFERENCED_BY_DOCUMENT_URL VARCHAR(2000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL,
IS_STILL_REFERENCED_BY_DOCUMENT BOOLEAN NUL... |
<reponame>satotatsu/sqlapp<filename>sqlapp-core-oracle/src/main/resources/com/sqlapp/data/db/dialect/oracle/metadata/userPrivileges.sql<gh_stars>1-10
/*if dbaOrUser=='DBA'*/
SELECT
p.*
FROM DBA_SYS_PRIVS p
WHERE 1=1
/*if isNotEmpty(userName) */
AND p.GRANTEE IN /*userName*/('%')
/*end*/
AND p.GRANTEE IN (SELE... |
<filename>src/BibleTraining.Migrations/Scripts/BeforeMigration/0000_UseDb.sql
USE [$DbName$]
GO |
create user testuser identified by 'password';
grant all on *.* to testuser@'%';
create database zoomtest;
|
USE [Campus6]
DECLARE @p1 nvarchar(9) = '000000000'
DECLARE @p2 nvarchar(9) = '000000000'
SELECT DISTINCT
P.PEOPLE_ID
,P.PersonId
,FIRST_NAME
,LAST_NAME
,nonqualifiedUserName
,AU.OPERATOR_ID
,AU.[STATUS]
,AUP.PROFILE_CODE
,AP.PROFILE_NAME
,AU.LOGON_ID
,AUP.REVISION_DATE
,AUP.CREATE_DATE
FROM PersonUser
INN... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 23, 2017 at 08:01 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>nahidnfr123/001-MedoCare
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 09, 2021 at 10:55 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.4.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/... |
\i ./schema.sql
\i ./views.sql
\i ./triggers.sql
\i ./procedures.sql
\i ./init.sql
|
/*
Warnings:
- You are about to drop the column `orders` on the `Item` table. All the data in the column will be lost.
- You are about to alter the column `one_star` on the `Rating` table. The data in that column could be lost. The data in that column will be cast from `String` to `Int`.
- You are about to alt... |
-- =============================================================================================================
-- Author: <NAME>. (<EMAIL>)
-- Create date: 2018-10-15
-- Description: Представление для формирования команд произвольных правил объектов баз данных
-- =====================================================... |
CREATE TABLE IF NOT EXISTS `#__quiz_r_student_dalliclick` (
`c_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`c_sq_id` int(10) NOT NULL,
`c_choice_id` int(10) NOT NULL,
`c_elapsed_time` int(10) NOT NULL,
PRIMARY KEY (`c_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unico... |
<filename>Guillet-Revol_Emeline/examen/test_jour.sql
Select (Stock - count(D.Tests_ID_T)) as Stock, Type_T, Adr_C
FROM Contenir
left join Centre ON ID_C = centre_ID_C
left Join Tests ON Contenir.tests_ID_T = ID_T
left Join Depister D ON D.Tests_ID_T = ID_T
Group by Adr_C, Type_T |
<filename>application/common/upgrade/80.sql
ALTER TABLE `qb_msg` ADD `update_time` INT( 10 ) NOT NULL COMMENT '排序值';
ALTER TABLE `qb_msg` ADD INDEX ( `update_time` ) COMMENT '';
ALTER TABLE `qb_msg` ADD INDEX ( `visit_time` ) COMMENT '';
|
CREATE TABLE [dbo].[Author]
(
[ID] INT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR(MAX) NULL,
CONSTRAINT [PK_Author] PRIMARY KEY ([ID])
)
|
<reponame>kyowill/derby-10.0.2.1
-- test the pushing of predicates into unflattened views
-- and derived tables
set isolation to rr;
-- by default, holdability of ResultSet objects created using this Connection object is true. Following will set it to false for this connection.
NoHoldForConnection;
-- set up... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.