sql stringlengths 6 1.05M |
|---|
<filename>install/campusbullet-blank.sql
-- phpMyAdmin SQL Dump
-- version 3.3.2deb1ubuntu1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 16, 2012 at 11:32 AM
-- Server version: 5.1.61
-- PHP Version: 5.3.2-1ubuntu4.14
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET... |
<filename>xiaoxin_notes.sql<gh_stars>1-10
/*
Navicat Premium Data Transfer
Source Server : mysql
Source Server Type : MySQL
Source Server Version : 50722
Source Host : localhost:3306
Source Schema : xiaoxin_notes
Target Server Type : MySQL
Target Server Version : 50722
File En... |
<gh_stars>10-100
CREATE TABLE public.testtable (
field1 integer,
field2 integer,
field3 character varying(150) DEFAULT 'none'::character varying,
field4 double precision,
field5 boolean DEFAULT false,
field6 integer DEFAULT 0,
field7 double precision DEFAULT 1 NOT NULL
);
ALTER TABLE public... |
-- Constraint: FKey1_$%{}[]()&*^!@"'`\/#
-- ALTER TABLE testschema.test_second_table DROP CONSTRAINT "FKey1_$%{}[]()&*^!@""'`\/#";
ALTER TABLE testschema.test_second_table
ADD CONSTRAINT "FKey1_$%{}[]()&*^!@""'`\/#" FOREIGN KEY (so_id)
REFERENCES testschema.test_first_table (id) MATCH FULL
ON UPDATE NO AC... |
<reponame>totemtang/postgresql-iqp<filename>tpch_conf/iqp_query/q9_para.sql
set max_parallel_workers_per_gather to 0;
set work_mem to 1000000;
set decision_method to dp;
set tpch_updates to 'supplier,part,partsupp,orders,lineitem';
set enable_nestloop to off;
set enable_indexscan to off;
set enable_mergejoin to off;
... |
alter table broadcasts
drop subject,
drop audience;
|
<filename>openGaussBase/testcase/SQL/INNERFUNC/Trim/Opengauss_Function_Innerfunc_Trim_Case0007.sql
-- @testpoint: 字符处理函数trim,函数作为join条件项
drop table if exists zsharding_tbl;
create table zsharding_tbl(c_id int, c_int int, c_integer integer);
select distinct B.c_id CID,B.c_int CINT,B.c_integer INTER from zsharding_tbl a... |
<reponame>opengauss-mirror/openGauss-graph
---- test function for cstore partition size:
-- 1. pg_table_size
-- 2. pg_relation_size
-- 3. pg_indexes_size
-- 4. pg_total_relation_size
-- 5. pg_partition_size
-- 5. pg_partition_indexes_size
---- 1. pg_table_size
create table test_cstore_pg_table_size (a int)
with(orie... |
USE mathapp;
INSERT INTO teachers VALUES(1, "John", "Doe");
INSERT INTO teachers VALUES(2, "James", "Cruz");
INSERT INTO teachers VALUES(3, "Jessica", "White");
INSERT INTO students VALUES(1, "Jane", "Smith", 1, 3 , "+", 1);
INSERT INTO students VALUES(2, "Jeff", "Robinson", 2, 7, "+", 1);
INSERT INTO students VALUES(3... |
<filename>datalove_create.sql
-- arquivo para criacao das tabelas do banco de dados
BEGIN TRANSACTION;
CREATE TABLE "Tag" (
`id_tag` INTEGER NOT NULL,
`nome` TEXT NOT NULL,
`quantidade` INTEGER NOT NULL,
PRIMARY KEY(`id_tag`)
);
CREATE TABLE "Spotted" (
`id_spot` INTEGER NOT NULL,
`texto` TEXT,
`horário` DATETI... |
<reponame>sanctum32/AscemuDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
CREAT... |
create sequence hibernate_sequence;
alter sequence hibernate_sequence owner to postgres;
create table blocked_mail
(
id_blocked_mail integer not null
constraint blocked_mail_pkey
primary key,
cause varchar(255),
email varchar(255)
);
alter table blocked_mail
owner to postgres;
... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 17, 2020 at 11:16 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<filename>sql/get/feed/charts.sql<gh_stars>0
SELECT f.id,
f.title,
f.subtitle,
author.name as author_name,
f.submitted,
img.filename as img,
f.status
FROM subscription s
RIGHT JOIN feed f on s.feed_id = f.id
JOIN author on f.author_id = author.id
JOIN img on ... |
<reponame>danmadeira/apex_auth_custom<filename>DDL/Table/MENU~UNQ.sql<gh_stars>0
PROMPT ALTER TABLE menu ADD CONSTRAINT menu_pk PRIMARY KEY
ALTER TABLE menu
ADD CONSTRAINT menu_pk PRIMARY KEY (
menu_id
)
USING INDEX
STORAGE (
NEXT 1024 K
)
/
|
<gh_stars>0
CREATE TABLE [Stg].[SQLCode]
(
[SCId] INT IDENTITY(1,1) NOT NULL PRIMARY KEY
,[SQLCode] VARCHAR(255)
,[Type] VARCHAR(255)
)
|
<filename>web-kas.sql
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 23 Bulan Mei 2020 pada 00.57
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... |
CREATE TABLE [dbo].[EventsProcessed]
(
[EventId] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY,
[ProcessedDateTime] DATETIME NOT NULL
)
|
<reponame>compositactic/CTLiteDemo
IF (db_id(N'BlogDb') IS NULL)
CREATE DATABASE BlogDb
ELSE
BEGIN
ALTER DATABASE BlogDb SET single_user WITH ROLLBACK IMMEDIATE DROP DATABASE BlogDb
CREATE DATABASE BlogDb
END
|
<reponame>alphagov-mirror/pay-direct-debit-connector
--liquibase formatted sql
--changeset uk.gov.pay:alter_table-payers-payment-request-id
ALTER TABLE payers DROP COLUMN payment_request_id;
--rollback ADD COLUMN payment_request_id BIGINT NOT NULL; |
<reponame>Shuttl-Tech/antlr_psql
-- file:init_privs.sql ln:4 expect:true
SELECT count(*) > 0 FROM pg_init_privs
|
USE [WideWorldImporters]
GO
SELECT o.name as table_name, i.name as index_name, i.type_desc, i.is_primary_key, i.is_unique, c.name as column_name
FROM sys.objects o
INNER JOIN sys.indexes i
ON o.object_id = i.object_id
AND o.type = 'U'
AND o.name = 'Orders'
INNER JOIN sys.index_columns ic
ON ic.index_id = i.index_id
AND... |
.read "schema.sql"
INSERT INTO "info" values("generated", "2015-11-03 17:00");
INSERT INTO "info" values("Author", "<NAME>");
INSERT INTO "info" values("generator", "info");
INSERT INTO "departments"(name, long_name, created_at, updated_at) VALUES ("info", "Informatik", datetime('now'), datetime('now'));
INSERT INTO... |
<reponame>SE-H-Team7/OnlineFintessStore
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 23, 2017 at 07:10 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- 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'Creating primary key [AssessmentIdentifica... |
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE certificates(
fingerprint text PRIMARY KEY,
common_name text NOT NULL,
country text,
locality text,
organization text,
organizational_unit text,
not_before TIMESTAMP WITHOUT TIME ZONE not NULL,
not_after TIMESTA... |
DROP TABLE tweets;
CREATE TABLE tweets (
key text PRIMARY KEY,
user_user varchar,
text text,
createdat timestamp
) WITH comment='Tweets'
AND COMPACT STORAGE
AND read_repair_chance = 1.0; |
<gh_stars>10-100
//// CHANGE name=change0
CREATE TABLE table58 (
id integer NOT NULL,
field1 character varying(30),
usertype3field usertype3,
usertype5field usertype5
);
GO
//// CHANGE name=change1
ALTER TABLE ONLY table58
ADD CONSTRAINT table58_pkey PRIMARY KEY (id);
GO
|
<reponame>guibv/sqlp
-- MODULE DML117
-- SQL Test Suite, V6.0, Interactive SQL, dml117.sql
-- 59-byte ID
-- TEd Version #
-- AUTHORIZATION FLATER
SELECT USER FROM HU.ECCO;
-- RERUN if USER value does not match preceding AUTHORIZATION comment
ROLLBACK WORK;
-- date_time print
-- TEST:0645 Featu... |
<gh_stars>0
/*
Скрипт развертывания для VegetablesAndFruits
Этот код был создан программным средством.
Изменения, внесенные в этот файл, могут привести к неверному выполнению кода и будут потеряны
в случае его повторного формирования.
*/
GO
SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 09 Haz 2018, 09:48:50
-- Sunucu sürümü: 5.6.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARA... |
<gh_stars>0
CREATE CONSTRAINT tweetConstraint IF NOT EXISTS ON (n:Tweet) ASSERT n.tweetId IS UNIQUE
|
DROP TABLE [portal].[Module]; |
<gh_stars>0
WITH cust_non_redhat AS (
SELECT t.customer_id,
array_agg(DISTINCT substring(t.email from '@(.*)$')) AS domain
FROM PUBLIC.api_user t
WHERE substring(t.email FROM '@(.*)$') != 'redhat.com'
GROUP BY t.customer_id
),
filtered_customers AS (
SELECT c.id,
c.acco... |
<reponame>ArijitDutta24/Heritage<filename>store/installfiles/control/sql/countries.sql
INSERT INTO `{prefix}countries` (`id`, `cName`, `cISO`, `cISO_2`, `iso4217`, `enCountry`, `localPickup`, `freeship`) VALUES
(1, 'Afghanistan', 'AFG', 'AF', '004', 'no', 'no', 'no'),
(2, 'Albania', 'ALB', 'AL', '008', 'no', 'no', 'n... |
CREATE PROCEDURE [dbo].[dnn_DeletePackage]
@PackageID int
AS
DELETE
FROM dbo.dnn_Packages
WHERE [PackageID] = @PackageID
|
<filename>DotNetSurfer_Backend/database/DotNetSurfer_Backend.Database/dbo/Tables/Features.sql
CREATE TABLE [dbo].[Features]
(
[FeatureId] INT IDENTITY(1, 1) NOT NULL PRIMARY KEY,
[FeatureType] NVARCHAR(100) NOT NULL,
[Name] NVARCHAR(50) NULL,
[Description] NVARCHAR(200) NULL,
[Version] NVARCHAR(100) NULL,
[Githu... |
-- Sorting Data
SELECT * FROM person ORDER BY date_of_birth;
SELECT * FROM person ORDER BY date_of_birth ASC;
SELECT * FROM person ORDER BY date_of_birth DESC;
SELECT * FROM person ORDER BY country_of_birth;
SELECT * FROM person ORDER BY country_of_birth ASC;
SELECT * FROM person ORDER BY country_of_birth DESC;
... |
<filename>tyler_kostelak.sql
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Mar 11, 2018 at 10:34 PM
-- Server version: 5.6.34-log
-- PHP Version: 7.1.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = ... |
<gh_stars>10-100
-- Deploy seattleflu/schema:warehouse/encounter-location/relation-fk to pg
-- requires: warehouse/encounter-location-relation
begin;
insert into warehouse.encounter_location_relation (relation)
select distinct relation from warehouse.encounter_location
on conflict (relation) do nothing
;
alt... |
<filename>scripts/postgres/content/checkpoint_state.sql
select * from jsonb_each_text(to_jsonb((select r from pg_control_checkpoint() r)))
order by 1
|
<gh_stars>10-100
-- file:tsearch.sql ln:522 expect:true
insert into pendtest values (to_tsvector('Lore ipsam'))
|
create table users(id int primary key, json text);
insert into users values(1, '{"has": [[1, 2], ["A", "B"]]}');
insert into users values(2, '{"has": [[3], ["B", "C"]]}');
insert into users values(3, '{"has": []}');
.headers on
.mode column
select json_each.value as value, count(json_each.value) as count from users, js... |
<reponame>JCVenterInstitute/OMeta-Public<filename>web/src/main/resources/gen_lookup_value_insert.sql<gh_stars>1-10
-- LOOKUP_VALUE
-- select * from lookup_value;
SELECT
'INSERT INTO lookup_value ( lkuvlu_id, lkuvlu_name, lkuvlu_type, lkuvlu_data_type, lkuvlu_create_date, lkuvlu_modify_date ) VALUES ( ',
... |
<reponame>betoamaya/ConsultasTurismo
/*Crear Factura de Anticipos*/
DECLARE @ID INT,
@MovID VARCHAR(MAX),
@Estatus CHAR(15),
@CFDFlexEstatus VARCHAR(15),
@CFDXml VARCHAR(MAX),
@noCertificado VARCHAR(MAX),
@Sello VARCHAR(MAX),
@SelloSAT VARCHAR(MAX),
@TFDC... |
with source as (
select channel_code,
channel_name
from "azadwh"."Aza_ods_Version1"."dim_channel"
)
select * from source |
<filename>DMS5/GetDEMCodeString.sql
/****** Object: UserDefinedFunction [dbo].[GetDEMCodeString] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION dbo.GetDEMCodeString
/****************************************************
**
** Desc:
** Returns sting for data extraction manager comple... |
<filename>migrations/2021-09-13-172349_hidesindex/up.sql
CREATE INDEX idx_postshides_user ON post_hides (user_id);
CREATE INDEX idx_commenthides_user ON comment_hides (user_id);
|
<reponame>Zhaojia2019/cubrid-testcases
--+ holdcas on;
set system parameters 'dont_reuse_heap_file=yes';
create table tb (id int primary key, a short);
insert into tb values (1,1);
insert into tb values (2,2);
insert into tb values (3,3);
create index i_tb_a on tb(a);
select /*+ recompile */ a from tb where a between 2... |
<filename>src/room_booking/mrbs-1.4.9/mrbs-1.4.9/web/upgrade/18/mysql.sql<gh_stars>0
# $Id: mysql.sql 1571 2010-11-02 15:10:18Z cimorrison $
# Remove the private columns as they are no longer needed
# (the privacy status is now held in the status column)
ALTER TABLE %DB_TBL_PREFIX%entry
DROP COLUMN private;
... |
<reponame>ArielMolho/copa-america-react
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.3
-- Dumped by pg_dump version 13.3
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
... |
/*
renumeracion_ampliado.sql
desc.: renumera segmentos 61, 62, 63, 64, ...
dentro de radio
autor. -h
fecha 2020-08-21 Vi
insumo:
file muestreo.sql
(esto se podría agregar a ese archivo)
que genera numeracion_seg_cfr
producto
vista
prov | dpto | codloc | frac | radio | s_id | n_s_radio | n_s_frac | nuevo_numero
para... |
<reponame>jonyedu/Sistema_SisGe_Fact
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64)
--
-- Host: localhost Database: comercial
-- ------------------------------------------------------
-- Server version 8.0.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACT... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 30, 2020 at 06:31 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<gh_stars>0
CREATE TABLE book (
isbn VARCHAR NOT NULL PRIMARY KEY,
title VARCHAR NOT NULL,
author VARCHAR NOT NULL,
thumbnail VARCHAR,
thumbnail_small VARCHAR
);
CREATE TABLE owned_books (
isbn VARCHAR NOT NULL,
user_id INTEGER NOT NULL,
FOREIGN KEY (isbn) REFERENCES book(isbn),
FOREIGN KEY (... |
create proc sp_updateScientificName
@id int ,@nom varchar(50)
as
update Nom_scientifique set nom_NS=@nom where id_NS=@id
return |
UPDATE Reports
SET StatusId = 2
WHERE CategoryId = 4 AND StatusId = 1
--4. Delete
DELETE FROM Reports
WHERE StatusId = 4 |
<gh_stars>0
-- 1. Show the total population of the world.
SELECT SUM(population) FROM world;
-- 2. List all the continents - just once each.
SELECT DISTINCT(continent) FROM world;
-- 3. Give the total GDP of Africa
SELECT SUM(gdp) FROM world WHERE continent = 'Africa';
-- 4. How many countries have an area of at lea... |
<filename>vendor/update/035.sql<gh_stars>0
ALTER TABLE `entPhysical_state` ADD `entPhysical_state_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
|
-- MySQL Script generated by MySQL Workbench
-- 06/01/17 20:21:14
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITION... |
-- Your SQL goes here
CREATE TABLE requests (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
code INTEGER NOT NULL,
user_id UUID references users(id) ON DELETE CASCADE NOT NULL,
client_id UUID references clients(id) ON DELETE CASCADE NOT NULL,
sale_date DATE NOT NULL,
delivery_date DATE NOT NULL,
status I... |
<reponame>221B-io/databrary.org<filename>hasura/migrations/1587492609149_alter_table_public_users_add_column_avatarURI/up.sql<gh_stars>1-10
ALTER TABLE "public"."users" ADD COLUMN "avatarURI" jsonb NULL; |
ALTER TABLE Tiling
ADD COLUMN owner_id INT,
ADD FOREIGN KEY (owner_id) REFERENCES Account (id)
;
ALTER TABLE Polygon
ADD COLUMN owner_id INT,
ADD FOREIGN KEY (owner_id) REFERENCES Account (id)
;
|
-- Creates the db structure for sites tables ...
--
-- $Id: db_sites.sql 2247 2007-11-02 13:56:21Z alex $ --
--
-- Table app_sites_archives --
CREATE SEQUENCE sites_archives_seq INCREMENT BY 1 NO MAXVALUE MINVALUE 1 CACHE 1;
CREATE TABLE app_sites_archives (
site_archive_id integer DEFAULT nextval('sites_archives... |
-- Database-schema of ifcSQL, Copyright (c) 2021, <NAME>, <NAME>, MIT License (see https://github.com/IfcSharp/IfcSharpLibrary/tree/master/Licence)
-- this database runs on Microsoft SQL Server 2019, earlier versions don't support UTF-8
-- this database was testet on Microsoft SQL Server 2019 EXPRESS
CREATE UNIQUE NO... |
INSERT INTO `tb_messages`(`id`, `images`, `sender`, `state`, `time`, `message`) VALUES (76, '', 1, 'send', '23:27:24', '12');
INSERT INTO `tb_messages`(`id`, `images`, `sender`, `state`, `time`, `message`) VALUES (77, 'http://localhost/assets/images/f49dade4b2ded94ad5c7ca29cba22135.png:::', 0, 'send', '23:27:22', '');
|
<reponame>andylolz/openbenches.org
-- --------------------------------------------------------
--
-- Table structure for table `merged_benches`
--
CREATE TABLE `merged_benches` (
`benchID` bigint(20) NOT NULL,
`mergedID` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
... |
-- file:vacuum.sql ln:49 expect:true
CREATE FUNCTION do_analyze() RETURNS VOID VOLATILE LANGUAGE SQL
AS 'ANALYZE pg_am'
|
<reponame>a-masterov/s64da-benchmark-toolkit<filename>benchmarks/htap/stats_schema.sql<gh_stars>10-100
CREATE TABLE oltp_stats(
id UUID
, ts TIMESTAMP NOT NULL
, current_ok_rate INT NOT NULL
, current_err_rate INT NOT NULL
);
ALTER TABLE oltp_stats ADD PRIMARY KEY(id, ts);
CREATE INDEX oltp_stats_ts_idx ON o... |
SELECT c.*, listado.*
FROM ciudades as c
LEFT JOIN listado ON c.CODIGO_DANE = listado.codigo_dane
WHERE listado.nombre IS NOT NULL;
|
<filename>assets/schema.sql
CREATE DATABASE video_games_db;
USE video_games_db;
CREATE TABLE games(
id INT NOT NULL AUTO_INCREMENT,
Name TEXT NOT NULL,
Genre TEXT NOT NULL,
ESRB_Rating TEXT,
Platform TEXT NOT NULL,
Publisher TEXT,
Developer TEXT,
Critic_Score TEXT,
User_Score TEXT,
Year INT,
PRIMARY KEY(id)
... |
<filename>src/sql/READ_ONLY/CPM_ACTION_LOG_TABLE.sql
-- SQL to create log table for CPM script actions.
-- CTools
CREATE TABLE CTOOLS_USER.CPM_ACTION_LOG (
ACTION_TIME DATE,
SITE_ID VARCHAR2(99),
ACTION_TAKEN VARCHAR2(99)
);
-- CTQA
-- CREATE TABLE CTQA_USER.CPM_ACTION_LOG (
-- ACTION_TIM... |
<reponame>My-Colaborations/ada-ado<filename>db/samples/sqlite/ado-drop-sqlite.sql
/* File generated automatically by dynamo */
DROP TABLE IF EXISTS `user`;
|
<gh_stars>0
/*
Copyright 2010-2017 BusinessCode GmbH, Germany
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 at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... |
CREATE TABLE "user_devices" (
"id" UUID PRIMARY KEY NOT NULL,
"user_id" UUID NOT NULL,
"device_id" text NOT NULL,
"device_type" text NOT NULL,
"device_token" text NOT NULL,
"created_on" TIMESTAMP DEFAULT now(),
"updated_on" TIMESTAMP default current_timestamp
);
ALTER TABLE "user_devices" ADD CONSTRAINT "user_... |
INSERT INTO `test`.`user` (`id`, `name`, `phone`)
VALUES
(1, 'user1444', '44444453444'),
(2, 'ffdd', '');
INSERT INTO `test2`.`store` (`id`, `name`, `products`, `nv`)
VALUES
(1, 'product1', 4100, NULL),
(2, 'prodd6', 0, NULL),
(3, '磊2', 0, NULL),
(4, 'dd', 0, NULL),
(5, '33', 0, '333fff');
|
CREATE SEQUENCE "CF_VERSION_LOG_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 61 CACHE 20 NOORDER NOCYCLE |
-- Move the old table out of the way.
ALTER TABLE timestamps RENAME TO timestamps_old;
-- Create the new table.
CREATE TABLE timestamps (
id bigserial NOT NULL,
service character varying(255) NOT NULL,
collection_id integer,
"timestamp" timestamp without time zone,
counter integer
);
-- Copy pre... |
<filename>modules/core/db/update/hsql/17/170312-2-createWaypoint.sql
alter table CRUISESAMPLE_WAYPOINT add constraint FK_CRUISESAMPLE_WAYPOINT_ROUTE foreign key (ROUTE_ID) references CRUISESAMPLE_ROUTE(ID);
create index IDX_CRUISESAMPLE_WAYPOINT_ROUTE on CRUISESAMPLE_WAYPOINT (ROUTE_ID);
|
<filename>testdata/between.golden.sql
select
foo between bar and baz,
foo not between bar and baz,
foo between bar and baz,
foo not between bar and baz,
foo between symmetric bar and baz,
foo not between symmetric bar and baz
|
<filename>127_0_0_1.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 19 Jul 2017 pada 01.38
-- Versi Server: 10.1.9-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER... |
<gh_stars>100-1000
DROP ROLE IF EXISTS team_manager;
|
select Cust_Type,Rep_line_group,Sum(Record_count) Record_Count
from
(
select decode(substr(t.ACCOUNT_NUMBER,4,1),1,'CORPORATE','INDIVIDUAL') Cust_Type,
decode (substr(t.CENTRAL_BANK_CODE,1,1),'C','DEBIT','H','CREDIT','K','CREDIT','DEBIT' ) REP_LINE_GROUP , count(*) Record_Count
from xafnfc.vw_trial_balance t
... |
-- SOURCE FILE: ./src//000-basic/000.fieldquote.sql
DELIMITER //
DROP FUNCTION IF EXISTS `FIELDQUOTE` //
CREATE FUNCTION `FIELDQUOTE`(in_str varchar(255))
RETURNS varchar(100)
DETERMINISTIC NO SQL
BEGIN
RETURN concat('`',in_str,'`');
END //
DROP FUNCTION IF EXISTS `suppressRequires` //
CREATE FUNCTION `suppressR... |
<filename>Database/SQL_Scripts/01_create_tables.sql<gh_stars>0
/* CREATE TABLES */
-- ------------------------- 80-character-line marker ------------------------
/* TODO:
- Foreign key policies for each table. Commissioner of course
knows better what they want. Options e.g.
DCA = ON DELETE CASCADE = On the Deleti... |
--
-- Start compiling Albion custom Error Logging module
--
set def on
-- Logging API Packages
start &&build_dir.gzkerrl;
start &&build_dir.gzkerr1;
|
alter table users.user add column key varchar(100); |
WITH tf AS (
select
docid,
word,
freq
from (
select
docid,
tf(word) as word2freq
from
tokenized
group by
docid
) t
LATERAL VIEW explode(word2freq) t2 as word, freq
),
df AS (
select
word,
count(distinct docid) docs
from
tokenized
group by
wor... |
<reponame>JaavLex/demo-dbsql<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: mysql
-- Generation Time: Oct 09, 2021 at 12:20 PM
-- Server version: 8.0.23
-- PHP Version: 7.4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!401... |
-- file:triggers.sql ln:902 expect:true
UPDATE city_view SET country_name = 'Japan' WHERE city_name = 'Tokyo' RETURNING *
|
/* fix scholl mask */
DELETE FROM `spell_proc_event` WHERE `entry` IN (11103,11119,11120,11129,11180,11255,12357,12358,12359,12360,12598,12846,12847,12848,14892,15268,15286,15323,15324,15325,15326,15362,15363,16164,17793,17796,17801,17802,17803,18073,18096,19407,19412,19413,19414,19415,20234,20235,23551,23572,23721,285... |
select
'ASM_DISKGROUP_STAT' CNAME, to_char(systimestamp, 'yyyy-mm-dd"T"hh24:mi:ss.ff') CTIMESTAMP,
v$asm_diskgroup_stat.*
from
v$asm_diskgroup_stat
/
|
<filename>app/import/tables.sql
DROP TABLE IF EXISTS `question`;
CREATE TABLE `question` (
`id_question` INT(25) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT 'identifikator',
`question` TEXT NOT NULL,
`info` TEXT NULL,
`required` TINYINT(1) NOT NULL,
`category` ENUM('personal', 'interesting', 'organization... |
CREATE DATABASE IF NOT EXISTS `soporteprueba` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `soporteprueba`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: openlisa.saas.la Database: soporteprueba
-- ------------------------------------------------------
-- Server version 5.7.19-0ubuntu0.16.04.1
... |
{% macro get_transfer_columns() %}
{% set columns = [
{"name": "_fivetran_deleted", "datatype": "boolean"},
{"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()},
{"name": "amount", "datatype": dbt_utils.type_float()},
{"name": "created_at", "datatype": dbt_utils.type_timestamp()},
{... |
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
DROP TABLE IF EXISTS reindex_drop_heap_bitmap;
CREATE TABLE reindex_drop_heap_bitmap (a INT);
insert into reindex_drop_heap_bitmap select generate_series(1,1000);
insert into reindex_drop_heap_bitmap select generate_series(1,1000);
cre... |
<reponame>rodel-talampas/gpdb
DROP domain if exists pg_alter_domain;
CREATE domain pg_alter_domain AS TEXT ;
ALTER domain pg_alter_domain add CONSTRAINT cons_check check (char_length(VALUE) = 5);
select oid, gp_segment_id, conname from pg_constraint where conname ~ 'cons_check';
select oid, gp_segment_id,conname from... |
/*L
Copyright Ekagra Software Technologies Ltd.
Copyright SAIC, SAIC-Frederick
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/common-security-module/LICENSE.txt for details.
L*/
CREATE TABLE CSM_APPLICATION (
APPLICATION_ID BIGINT AUTO_INCREMENT NOT NULL,
... |
DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE products (
item_id INT AUTO_INCREMENT NOT NULL, -- item_id unique id for each product
product_name VARCHAR(100) NOT NULL, -- product_name Name of product
department_name VARCHAR(100) NOT NULL, -- department_name
price DECIMAL(1... |
-- Your SQL goes here
CREATE TABLE status (
status_id SERIAL PRIMARY KEY,
description VARCHAR NOT NULL
)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.