sql stringlengths 6 1.05M |
|---|
/*
Select all movies and their genres in the database (independent of actor).
*/
SELECT mg.mg_movie_href,
gen.genre_name
FROM movie_genre AS mg
INNER JOIN genre AS gen ON gen.genre_id = mg.mg_genre_id; |
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
PRINT N'Adding foreign keys to [edfi].[Student]'
G... |
<reponame>klesh/emmo-model<gh_stars>1-10
ALTER TABLE `Roles` ADD COLUMN `permission` text;
/***** PLACE YOUR CUSTOMIZE SCRIPT HERE *****/
/******** END YOUR CUSTOMIZE SCRIPT *********/
|
ALTER TABLE PUB_ROLE ADD CHECK (ID IS NOT NULL);
ALTER TABLE PUB_ROLE ADD PRIMARY KEY (ID); |
<reponame>nmbazima/SQL-Scripts
-- Module 3 - Lab Exercise 3 - Test the Partitioning Strategy
-- Query the Timesheet table
USE HumanResources;
GO
SELECT PersonID, ShiftID, RegisteredStartTime, RegisteredEndTime, $PARTITION.pfHumanResourcesDates(RegisteredStartTime) AS PartitionNumber
FROM Payment.Timesheet;
GO
-- Vie... |
DROP TABLE logins;
DROP TABLE auths;
DROP TABLE users;
DROP TABLE teams;
|
alter table albums modify titlesort varchar(255);
alter table albums add index(titlesort, disc);
alter table contributors modify namesort varchar(255);
|
-- @testpoint: 修改字段值后,使用abort回滚
drop table if exists t_student;
create table t_student (stu_name char(20),stu_age int,sex char(10));
insert into t_student values('zhangsan',18,'boy'),('lisi',25,'boy'),('wangwu',28,'girl');
start transaction;
update t_student set stu_age=30 where stu_name='zhangsan';
select * from t_stu... |
--
-- This fixture creates the situation where two benchmarking instances has been
-- succesfully completed. These benchmark are have been completed from two different
-- benchmark types.
--
WITH events AS (
INSERT INTO event (task_id, success)
SELECT task_id, true
FROM task_expanded_fields
... |
<gh_stars>0
create table employee2 (emp_name varchar(10), dept varchar(10), salary int(10), primary key(emp_name));
insert into employee2 values ('Anjali', 'CSE', 40000);
insert into employee2 values ('Gyani', 'CSE', 80000);
insert into employee2 values ('Neha', 'ETC', 40000);
insert into employee2 values ('Monica', 'C... |
<filename>database/migrations/data/sectors.sql
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 24, 2019 at 07:13 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTIO... |
CREATE TABLE IF NOT EXISTS public."Smokes"
(
"Id" uuid NOT NULL,
"UserId" integer NOT NULL,
"Type" integer NOT NULL,
"Date" timestamp(3) with time zone NOT NULL,
CONSTRAINT "Smokes_pkey" PRIMARY KEY ("Id"),
CONSTRAINT "FK_Smokes_Users_UserId" FOREIGN KEY ("UserId")
REFERENCES public."Use... |
<gh_stars>0
-- Init
insert into "public"."dummy_tree"
("id", "parent_id", "name")
values
(1, null, '1'),
(2, null, '2'),
(3, null, '3'),
(4, 2, '2-1'),
(5, 2, '2-2'),
(6, 4, '2-1-1'),
(7, 4, '2-1-2'),
(8, 3, '3-1'),
(9, 3, '3-2'),
(10, 8, '3-1-1'),
(11, 8, '3-1-2'),
(12, 8, '3-1-3'),
(13, 5, '2-2-1'),
... |
<gh_stars>0
-- AlterTable
ALTER TABLE "Recipe" ALTER COLUMN "createdAt" DROP NOT NULL,
ALTER COLUMN "updatedAt" DROP NOT NULL;
|
<reponame>jmcuy/twitter-clone
-- Get all tweets. Tweets should be ordered with the most recent tweets first.
--
-- Write your query below:
SELECT * FROM tweets ORDER BY created_at desc;
|
/*
Copyright (c) 2020 <NAME>, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub... |
<gh_stars>0
# Host: localhost (Version 5.5.5-10.4.17-MariaDB)
# Date: 2021-04-08 08:48:06
# Generator: MySQL-Front 6.0 (Build 2.20)
#
# Structure for table "failed_jobs"
#
DROP TABLE IF EXISTS `failed_jobs`;
CREATE TABLE `failed_jobs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`connection` text COLLA... |
<gh_stars>1-10
insert into sykefravar_statistikk_naring (naring_kode, arstall, kvartal, antall_personer, tapte_dagsverk, mulige_dagsverk) values ('00', 2017, 1, 10, 822.346689, 26712.852863);
insert into sykefravar_statistikk_naring (naring_kode, arstall, kvartal, antall_personer, tapte_dagsverk, mulige_dagsverk) value... |
select * from gafanhotos;
select * from cursos;
desc cursos;
-- comando SELECT pode ser classificado como DML
-- ou como DQL - Date Query Language
-- selecionar todas as tabelas em ordem descendente
select * from cursos
order by nome desc;
-- selecionar apenas colunas desejadas
select ano, nome, carga from cursos
o... |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SPC_TRANSLATION_ACT1]') AND type IN (N'P', N'PC'))
DROP PROCEDURE [dbo].[SPC_TRANSLATION_ACT1]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SPC_TRANSLATION_ACT1]
@P_post_id NVARCHAR(15) = ''
... |
<filename>sql/schema_cdm/create_cdm_schema.sql<gh_stars>1-10
--Select database
USE @database;
GO
--Create cdm schema
IF(SCHEMA_ID('cdm') IS NULL)
EXEC('CREATE SCHEMA cdm')
; |
<filename>database/seeders/_ItemPoolName.sql
INSERT INTO [dbo].[_ItemPoolName] ([NameStrID], [RealName]) VALUES
(N'SN_ITEM_ARMOR_A', N'Lowest Quality Upper Body Garment'),
(N'SN_ITEM_ARMOR_B', N'Low Quality Upper Body Garment'),
(N'SN_ITEM_ARMOR_C', N'Medium Quality Upper Body Garment'),
(N'SN_ITEM_ARMOR_D', N'High Qua... |
-- 2019-11-27T08:22:00.691Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Message_Trl SET MsgText='Business Partner has no bill-to address',Updated=TO_TIMESTAMP('2019-11-27 10:22:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='en_US' AND AD_Message_ID=53057
;
-- 2019-11-27T0... |
SELECT *
FROM (
SELECT
seller_state,
count(*) as qtd_sellers
FROM tb_sellers
--WHERE seller_state IN ('SP','RJ','PR')
GROUP BY seller_state
)
WHERE qtd_sellers > 10 |
select SHA1("anystring");
|
CREATE TABLE food_cart_db.migrations (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
migration varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
batch int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table bouteille (
id bigint not null,
cave_id bigint,
domaine varchar(255),
appellation varchar(255),
millesime... |
drop table if exists urstp_user;
create table urstp_user
(
id mediumint unsigned not null auto_increment comment '用户Id',
username varchar(150) not null comment '用户名称',
password varchar(150) not null comment '用户密码',
user_pic varchar(150) comment '用户头像',
primary key (id),
)engine=InnoDB default charset=utf8 comment... |
<reponame>Chathray/ShareQ
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Dec 20, 2019 at 03:17 AM
-- Server version: 5.7.26
-- PHP Version: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:0... |
<filename>openGaussBase/testcase/SQL/INNERFUNC/systemInfo/Opengauss_Function_Innerfunc_System_info_Case0002.sql<gh_stars>0
-- @testpoint: 函数get_nodename(),返回当前节点的名字
select get_nodename(); |
<gh_stars>1-10
--
--test the pmk schema
--
DECLARE
pmk_oid oid;
class_count int;
proc_count int;
BEGIN
--if pmk schema not exist, it will raise an error.
SELECT oid FROM pg_namespace WHERE nspname='pmk' INTO pmk_oid;
--select the count of class_count
SELECT COUNT(*) FROM pg_class WHERE relna... |
<gh_stars>0
USE [JobPortal]
GO
/****** Object: Table [dbo].[AccessModule] Script Date: 20/12/2020 6:32:01 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
DROP TABLE [dbo].[ApplicantGeneralQuestion]
CREATE TABLE [dbo].[ApplicantGeneralQuestion](
[Id] [smallint] IDENTITY(1,1) NOT NULL,
[Type] [smalli... |
<reponame>AdamAranha/EmployeeTracker
use employee_tracker;
INSERT INTO departments (name) VALUES ('Sales');
INSERT INTO departments (name) VALUES ('Finance');
INSERT INTO departments (name) VALUES ('Engineering');
INSERT INTO departments (name) VALUES ('Legal');
INSERT INTO roles (title, salary, department_id) VALUES... |
<reponame>doodersrage/gazettejournal
/*
* Description:
* This file is used to create all tables used by WebCalendar and
* initialize some of those tables with the required data.
*
* The comments in the table definitions will be parsed to
* generate a document (in HTML) that describes these tables.
*
* History:
... |
<filename>sql/results_no_data.sql<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64)
--
-- Host: 192.168.3.11 Database: monopoly
-- ------------------------------------------------------
-- Server version 5.7.29
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHAR... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 04, 2017 at 10:04 AM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
/*
Foreclosure data
taxes_reo: taxes as a % of prop_orig_val for REO disposition
taxes_ss: taxes as a % of prop_orig_val for short sale disposition
non_tax_costs_reo: all non-tax costs as a % of prop_orig_val for REO disposition
non_tax_costs_ss: all non-tax costs as a % of prop_orig_val for short sale disp... |
<gh_stars>1-10
USE [VipunenTK_DW]
GO
/****** Object: View [dbo].[v_f_4_8_Tutkinnon_suorittaneiden_myohempi_koulutus] Script Date: 30.12.2021 16:38:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER view [dbo].[v_f_4_8_Tutkinnon_suorittaneiden_myohempi_koulutus] as
-- CSC JN 6.10.2015
-- Tehty k... |
<reponame>aviv/sqlfluff<gh_stars>100-1000
CREATE JAVA ADAPTER SCRIPT my_script AS
%jar hive_jdbc_adapter.jar;
/
CREATE OR REPLACE PYTHON ADAPTER SCRIPT test.adapter_dummy AS
def adapter_call(in_json):
return "BLABLA"
/
CREATE OR REPLACE LUA ADAPTER SCRIPT test.adapter_dummy AS
function adapter_call(in_json):
return... |
-- 23.07.2015 13:54
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO C_AggregationItem (AD_Client_ID,AD_Column_ID,AD_Org_ID,C_Aggregation_ID,C_AggregationItem_ID,Created,CreatedBy,EntityType,IsActive,Type,Updated,UpdatedBy) VALUES (1000000,552599,1000000,1000003,540021,TO_TIMESTAMP('2015-07... |
<gh_stars>1-10
ALTER TABLE db_version CHANGE COLUMN required_11040_01_mangos_spell_chain required_11040_02_mangos_spell_bonus_data bit;
DELETE FROM spell_bonus_data WHERE entry IN (52042, 5672);
INSERT INTO spell_bonus_data VALUES
(5672, 0.08272, 0, 0, 0, 'Shaman - Healing Stream Totem Aura');
|
CREATE DATABASE IF NOT EXISTS extension; USE extension;
CREATE TABLE IF NOT EXISTS triggers (
`extensionId` CHAR(64) NOT NULL,
`trigger_type` ENUM('OnChange', 'OnTime') NOT NULL,
`trigger_on` CHAR(64) NOT NULL,
UNIQUE KEY `extension_type_on_idx` (`extensionId`, `trigger_type`, `trigger_on` ASC)
) ENGINE=InnoDB... |
<gh_stars>0
INSERT INTO status(status_code) VALUES ('ACTIVE');
INSERT INTO status(status_code) VALUES ('ENGAGED');
INSERT INTO status(status_code) VALUES ('LOAD');
INSERT INTO status(status_code) VALUES ('OVERRIDE');
INSERT INTO status(status_code) VALUES ('UNPLUG'); |
<gh_stars>0
drop database shop;
create database shop charset utf8;
use shop;
create table sp_goods_info (
id int unsigned primary key auto_increment,
name varchar(50) not null default '' comment '商品名称',
intro varchar(255) not null default '' comment '商品简介',
descript text comment '商品描述',
price decimal(10, 2... |
larder/M
lardy/RT
large/RSPMYT
largehearted
|
CREATE TABLE `userinfo` (
`uid` INT(10) NOT NULL AUTO_INCREMENT,
`username` VARCHAR(64) NULL DEFAULT NULL,
`departname` VARCHAR(64) NULL DEFAULT NULL,
`created` DATE NULL DEFAULT NULL,
PRIMARY KEY (`uid`)
);
|
-- TAB-682
ALTER TABLE FEEDBACK
ADD (RELEASED_DATE TIMESTAMP(6) ); |
<reponame>ministryofjustice/nomis-oauth2-server<filename>src/main/resources/db/dev/data/auth/V900_3__users.sql
-- nomis users
INSERT INTO users (user_id, username, email, verified, source)
VALUES ('A04C70EE-51C9-4852-8D0D-130DA5C85C42', 'ITAG_USER', '<EMAIL>', true, 'nomis'),
('A04C70EE-51C9-4852-8D0D-130DA5C85C... |
<reponame>SpokeyWheeler/sqlfluff<filename>test/fixtures/parser/cockroach/comment_on_column.sql
COMMENT ON COLUMN t1.a IS 'Monty Python'
;
|
<filename>assets/database/master.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 08, 2019 at 05:41 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTI... |
SET autocommit = 1;
START TRANSACTION;
INSERT INTO financial.banks (cod_banco, nome_banco, created_at, updated_at)
SELECT cod_banco, nome_banco, NOW(), NOW() FROM financeiro.tb_banco;
INSERT INTO financial.flag_cards (id, bandeira, created_at, updated_at)
SELECT id_bandeira_cartao AS id, bandeira, NOW() AS created_at... |
<filename>sql/hardwaretype.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.5
-- Dumped by pg_dump version 9.6.3
-- Started on 2017-10-28 23:35:47 COT
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conf... |
INSERT INTO Persons( Id, FirstName, LastName, Birthdate, SSN, Street, City, Zip, State, Race, Latino, Gender, Veteran, MaritialStatus, DisabilityStatus, EducationLevel, EmploymentStatus) VALUES('71F704B4-DC27-BA2F-8587-D4D69969722B','Jaime','West','2009-05-29','669-88-4759','6279 Convallis St.','Boston','19704','Massac... |
<filename>db/pjdsys.sql
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 21-09-2017 a las 09:31:39
-- Versión del servidor: 5.7.19-0ubuntu0.16.04.1
-- Versión de PHP: 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET ... |
<reponame>surasanjaya1998/website
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 27 Apr 2019 pada 13.14
-- Versi server: 10.1.32-MariaDB
-- Versi PHP: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
<filename>phoenix-scala/sql/V3.001__product_album_links_position.sql
alter table product_album_links
add column "position" integer not null default 0;
create index product_album_links_position on product_album_links (left_id, "position")
|
-- Drop Views
DECLARE @name VARCHAR(500)
DECLARE cur CURSOR
FOR
SELECT [name]
FROM [sys].[objects]
WHERE type = 'v'
OPEN cur
FETCH NEXT
FROM cur
INTO @name
WHILE @@fetch_status = 0
BEGIN
EXEC ('DROP VIEW [' + @name + ']')
FETCH NEXT
FROM cur
INTO @name
END
CLOSE cur
DEALLOCATE cur |
-- file:timestamp.sql ln:80 expect:true
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 13:14:02 GMT-1')
|
-- file:json_encoding.sql ln:59 expect:true
SELECT jsonb '{ "a": "dollar \\u0024 character" }' as not_an_escape
|
--
-- Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
--
-- Licensed under the Universal Permissive License v 1.0 as shown
-- at http://oss.oracle.com/licenses/upl
--
# hr_idx_tt - Creates the indexes; run this after hr_cre_tt
CREATE INDEX emp_manager_ix
ON employees (manager_id);
... |
<filename>Admin/db script/product_category.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: May 27, 2021 at 06:02 AM
-- Server version: 5.7.31
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:... |
-- --------------------------------------------------------
-- Table Patient
-- ----------------------------
SET FOREIGN_KEY_CHECKS=1;
DROP TABLE IF EXISTS `patient`;
CREATE TABLE `patient` (
`p_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`p_fname` varchar(45) NOT NULL,
`p_lname` varchar(... |
insert into person (first_name, last_name, address, gender, enabled) values ('Siegfried', 'Furmston', '305 Fisk Lane', 'Male', false),
('Renaud', 'Deniso', '1 Graceland Place', 'Male', true),
('Lanita', 'Bazire', '95090 Burning Wood Terrace', 'Female', true),
('Jerrine', 'Fegan', '4 Spohn Plaza', 'Male', false),
('... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 27 Jun 2021 pada 11.45
-- Versi server: 10.4.18-MariaDB
-- Versi PHP: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... |
declare @PatientID as VARCHAR(1000), @PatientMasterVisitId as VARCHAR(1000)
, @HIVTestDate as VARCHAR(1000)
, @RegistrationDate as VARCHAR(1000)
, @c as cursor
set @c = cursor for
With HIVTesting AS
(Select a.ptn_pk, MAX(HIVDate)HIVTestDateMin
, MIN(HIVDate)HIVTestDateMax
From
(Select a.ptn_pk, a.ConfirmHIVPosDate... |
<reponame>darknegma/docker-airflow
CREATE TABLE "HRIS_DATA"."ICIMS"."PERSONS_PII"
(
"FULL_NAME_FIRST_LAST" VARCHAR,
"SYSTEM_ID" INT,
"EMAIL" VARCHAR,
"DEFAULT_PHONES_NUMBER" VARCHAR,
"CREATED_DATE" DATETIME,
"UPDATED_DATE" DATETIME,
"DEFAULT_ADDRESSES_ADDRESS" VARCHAR,
"DEFAULT_ADDRESSES_ADDRESS_2" VARCHAR,
"... |
CREATE DATABASE IF NOT EXISTS `freshwax` COLLATE 'utf8_general_ci' ;
GRANT ALL ON `freshwax`.* TO 'default'@'%' ;
FLUSH PRIVILEGES ;
|
drop table if exists test_table;
create table test_table (geo text);
copy test_table from '@path@/data/polygonfromtext.csv' DELIMITER '|' csv header;
\o @path@/expected/results/st_polygonfromtext.out
select st_astext(st_polygonfromtext(geo)) from test_table;
\o
|
<filename>Test Data/IDEATestData/FS_IDEATestData.sql
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more informatio... |
<filename>database/src/main/resources/db/migration/V1_38__Add_validator_state_function.sql
CREATE OR REPLACE FUNCTION get_validator_list(active_set integer, active_status varchar(64), search_state text,
search_limit integer, search_offset integer,
... |
CREATE TABLE `app` (
`id` int(11) unsigned not null auto_increment primary key comment '应用ID',
`name` varchar(100) not null comment '应用名称',
`description` varchar(255) not null comment '描述',
`app_key` varchar(255) not null default '' comment 'App Key',
`app_secret` varchar(255) not null default '' comment 'App... |
<filename>src/test/resources/bvt/parser/antlr_grammers_v4_plsql/examples/simple06.sql
select * from (( select * from dual)) a
|
<reponame>luiz158/Hibernate-SpringBoot
INSERT INTO article (title, id) VALUES ("CSS3 Tricks", 1) ^;
INSERT INTO magazine (title, id) VALUES ("Java QA", 1) ^;
INSERT INTO book (title, id) VALUES ("Java Coding Problems", 1) ^;
DROP TRIGGER IF EXISTS Just_One_Of_Many ^;
CREATE TRIGGER Just_One_Of_Many
BEFORE INSERT... |
<filename>openGaussBase/testcase/KEYWORDS/Deferred/Opengauss_Function_Keyword_Deferred_Case0034.sql
-- @testpoint: opengauss关键字deferred(非保留),作为游标名,部分测试点合理报错
--前置条件
drop table if exists deferred_test cascade;
create table deferred_test(cid int,fid int);
--关键字不带引号-成功
start transaction;
cursor deferred for select * from... |
<gh_stars>1-10
-- This file is automatically generated by LogicalPlanToSQLSuite.
select * from orc_t
--------------------------------------------------------------------------------
SELECT `gen_attr` AS `c1`, `gen_attr` AS `c2` FROM (SELECT `gen_attr`, `gen_attr` FROM (SELECT `c1` AS `gen_attr`, `c2` AS `gen_attr` FROM... |
DROP TABLE payment_details;
DROP TABLE zip_code;
DROP TABLE restaurant_service_type;
DROP TABLE order_line_optionline_restaurant;
DROP TABLE order_line;
DROP TABLE orderr;
DROP TABLE optionline_restaurant;
DROP TABLE product_restaurant;
DROP TABLE product_allergen;
DROP TABLE option_line;
DROP TABLE productoption;
DRO... |
<filename>sql/table_drop.sql
DROP TABLE t1;
DROP TABLE t2;
|
SELECT OBJECT_NAME(OBJECT_ID) AS TableName, *
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID('YOUR_DATABASE_NAME')
ORDER BY last_user_update DESC |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 01-12-2021 a las 20:17:02
-- Versión del servidor: 10.4.20-MariaDB
-- Versión de PHP: 7.4.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<gh_stars>1-10
create table `token` (
-- Ed25519 public key
`id` char(64) not null primary key,
`ghid` bigint not null,
`ghtoken` varchar(255) not null,
`active` tinyint(1) not null default 1,
`created_at` datetime(6) not null default current_timestamp(6),
`last_used_at` datetime(6) not null default curre... |
CREATE TABLE client_transparency_status (
grace_period_expiration_date Nullable(String),
has_owning_business Nullable(UInt8),
is_satisfied Nullable(UInt8)
)
ENGINE = Log
|
<gh_stars>10-100
SELECT "CommonGovernment_5"."funding_agency_name" AS "funding_agency_name" FROM "CommonGovernment_5" GROUP BY "CommonGovernment_5"."funding_agency_name";
|
<filename>migrations/sqls/20211219103110-data-table-up.sql
CREATE TABLE IF NOT EXISTS `users` (
`id` CHAR(36) BINARY ,
`name` VARCHAR(100),
`email` VARCHAR(100) UNIQUE,
`email_verified` DATETIME,
`image` VARCHAR(255),
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT EXISTS `accounts` (`id` CHAR(36) BINARY , `type`... |
/*
* 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 ... |
--
-- Tables for Spring Security's user details service
--
CREATE TABLE user_ (
uuid VARCHAR(64) PRIMARY KEY,
host_uuid VARCHAR2(64),
username VARCHAR2(255) not null,
password VARCHAR2(255) not null,
enabled NUMBER(1,0) not null,
account_non_expired NUMBER(1,0) not null,
account_non_locked NUMBER(1,0)... |
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 15, 2018 at 11:24 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
<filename>migrations/2021-12-04-190338_create_chat_tables/down.sql
-- This file should undo anything in `up.sql`
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS rooms;
DROP TABLE IF EXISTS messages;
DROP TABLE IF EXISTS subscribes;
SET FOREIGN_KEY_CHECKS = 1;
|
--parallel queries require big-ish tables so collect them all here
--so that we need to generate queries only once.
CREATE TABLE test (i int, j double precision, ts timestamp);
--has to be big enough to force at least 2 workers below.
INSERT INTO test SELECT x, x+0.1, _timescaledb_internal.to_timestamp(x*1000) FROM g... |
<filename>tests/queries/0_stateless/02147_order_by_optimizations.sql<gh_stars>1000+
DROP TABLE IF EXISTS t_02147;
DROP TABLE IF EXISTS t_02147_dist;
DROP TABLE IF EXISTS t_02147_merge;
CREATE TABLE t_02147 (date DateTime, v UInt32)
ENGINE = MergeTree ORDER BY toStartOfHour(date);
CREATE TABLE t_02147_dist AS t_02147 ... |
<reponame>wengyanqing/timescaledb<filename>sql/updates/0.7.0--0.7.1.sql
DROP FUNCTION IF EXISTS _timescaledb_internal.create_hypertable_row(REGCLASS, NAME, NAME, NAME, NAME, INTEGER, NAME, NAME, BIGINT, NAME, REGPROC);
DROP FUNCTION IF EXISTS _timescaledb_internal.rename_hypertable(NAME, NAME, NAME, NAME);
DROP FUNCTI... |
<filename>macros/epoch_to_timestamp.sql
{% macro epoch_to_timestamp(column_name, time_unit='seconds') %}
dateadd({{ time_unit }}, {{ column_name }}, '1970-01-01')
{% endmacro %}
|
DROP DATABASE IF EXISTS benchmark;
CREATE DATABASE benchmark;
USE benchmark;
CREATE TABLE `benchmark` (
`test_no` int(11) NOT NULL AUTO_INCREMENT,
`commit` varchar(100) DEFAULT NULL,
`DateTime` timestamp NOT NULL DEFAULT CURRENT_T... |
/*
Warnings:
- You are about to drop the column `teamId` on the `customsummoner` table. All the data in the column will be lost.
- The primary key for the `customteam` table will be changed. If it partially fails, the table could be left without primary key constraint.
- You are about to drop the column `id` o... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 23, 2021 at 08:23 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_CHARACT... |
--
-- Programacion basica en SQL
-- ===========================================================================
--
-- Sea el siguiente conjunto de tablas en una base de datos:
--
-- tbl0
-- ------------------------
-- K0 CHAR(1)
-- c01 INT
-- c02 INT
-- c03 CHAR(4)
-- c04 FLOAT
--
-- ... |
<filename>protected/data/migrations/0_schema.sql
/* create users table */
CREATE TABLE users (
username VARCHAR(128) NOT NULL PRIMARY KEY,
email VARCHAR(128) NOT NULL,
password VARCHAR(128) NOT NULL, /* in plain text */
role INTEGER NOT NULL, /* 0: normal user, 1: administrator... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 18, 2022 at 08:40 PM
-- 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... |
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50505
Source Host : localhost:3306
Source Database : book_dinner
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2018-04-26 19:35:17
*/
SET FOREIG... |
CREATE TABLE [Invalid].[LLDDandHealthProblem] (
[LLDDandHealthProblem_Id] INT NOT NULL,
[Learner_Id] INT NULL,
[UKPRN] INT NOT NULL,
[LearnRefNumber] VARCHAR (100) NULL,
[LLDDCat] BIGINT NULL,
[PrimaryL... |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
SET NAMES utf8mb4;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CH... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.