sql stringlengths 6 1.05M |
|---|
<reponame>Danial41/-
ALTER TABLE `#__session` MODIFY `session_id` varbinary(192) NOT NULL;
ALTER TABLE `#__session` MODIFY `guest` tinyint(3) unsigned DEFAULT 1;
ALTER TABLE `#__session` MODIFY `time` int(11) NOT NULL DEFAULT 0;
|
SET @@auto_increment_increment = 1;
-- CATEGORIAS ---
INSERT INTO categorias (tipo_categoria) VALUES
('Restaurantes'),
('Combustible'),
('Viajes'),
('Hoteles'),
('Compras'),
('Regalos'),
('Varios'),
('Domiciliacion'),
('Electrónica'),
('Préstamo');
-- CUENTAS --
INSERT INTO cuentas (entidad,numer... |
/*
################################################################################
Creating Submission Import Progress table
author: <NAME>
date: 9 October 2020
version: 2.6.0.001
################################################################################
*/
---------------------------------------------------... |
-- TODO: allow arbitrary CRS
-- TODO: allow arbitrary column AND table names
-- basic network setup
-- alternatively use ogr2ogr
-- note that sqlite only recognises 5 basic column affinities (TEXT, NUMERIC, INTEGER, REAL, BLOB); more specific declarations are ignored
-- the 'INTEGER PRIMARY KEY' column is alwa... |
-- Copyright (c) 2019 The DAML Authors. All rights reserved.
-- SPDX-License-Identifier: Apache-2.0
create table participant_event_transaction_tree_witnesses
(
event_id varchar not null,
event_witness varchar not null,
primary key (event_id, event_witness),
foreign key (event_id) references participan... |
ALTER TABLE `sessions` ENGINE = InnoDB
|
<reponame>clouserw/zamboni<filename>migrations/778-add-public-id.sql
ALTER TABLE addons ADD COLUMN `solitude_public_id` varchar(255) DEFAULT NULL;
|
DROP TABLE IF EXISTS participant;
CREATE TABLE participant(
host_year INT NOT NULL,
nation_code CHAR(3) NOT NULL,
gold INT DEFAULT 0,
silver INT DEFAULT 0,
bronze INT DEFAULT 0,
CONSTRAINT pk_participant_host_year_nation_code PRIMARY KEY(host_year,nation_code));
INSERT INTO participant (host_year, nation_code, gold, ... |
--CLIENT
create class t1(i int);
create class t2(i int);
create class t3(i int, str varchar(255));
create trigger tr1 before update on t1 execute insert into t3 values (obj.i, 't1');
create trigger tr2 before update on t2 execute insert into t3 values (obj.i, 't2');
insert into t1 values (1), (2), (3), (4), (5);
inse... |
SELECT b.EMPLID
, EXT_ORG_ID
, EXT_CAREER
, EXT_DATA_NBR
, EXT_SUMM_TYPE
, EXT_ACAD_LEVEL
, TERM_YEAR
, EXT_TERM_TYPE
, EXT_TERM
, INSTITUTION
, UNT_TYPE
, UNT_ATMP_TOTAL
, UNT_COMP_TOTAL
, CLASS_RANK
, CLASS_SIZE
,... |
USE [EZDiscuss]
GO
/****** Object: StoredProcedure [dbo].[MessageRetrieveByMessageID] Script Date: 09/16/2014 22:21:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME>
-- Create date: January 29, 2014
-- Description: Retrieves a Message... |
<gh_stars>0
CREATE DATABASE IF NOT EXISTS `tithoy_news` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `tithoy_news`;
-- MySQL dump 10.13 Distrib 5.6.19, for linux-glibc2.5 (x86_64)
--
-- Host: localhost Database: sym2rest
-- ------------------------------------------------------
-- Server version 5.5.40-0ubuntu0.14.... |
DELETE FROM DIR_RANKING_ORDER
WHERE ID = ?;
|
<reponame>NapalmRainPHP/LaravelForLoftSchool
-- phpMyAdmin SQL Dump
-- version 4.4.15.7
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3306
-- Время создания: Окт 20 2016 г., 18:11
-- Версия сервера: 5.7.13
-- Версия PHP: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... |
<reponame>lenchik1/cib-interns-test-task
drop table if exists socks cascade;
create table socks (
color varchar(255) not null,
cotton_part int2 not null,
quantity int4 not null,
primary key (color, cotton_part)
); |
<reponame>AloisioFernandes/Teste<filename>banco-relacional/inserir_cidades.sql
-- SELECT * FROM `estados`;
-- INSERT INTO `cidades` (nome, area, estado_id)
-- VALUES ('Campinas', 795, 25);
-- INSERT INTO `cidades` (nome, area, estado_id)
-- VALUES ('Niterói', 133.9, 19);
-- INSERT INTO `cidades` (nome, area, estado_... |
INSERT INTO student (
first_name, last_name, date_of_birth, email
)
VALUES (
'Olga',
'Rozhdestvina',
'1990-03-16'::DATE,
'<EMAIL>'
); |
<filename>ows-contactdb .sql
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th1 18, 2019 lúc 07:36 AM
-- Phiên bản máy phục vụ: 10.1.37-MariaDB
-- Phiên bản PHP: 7.2.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
S... |
<reponame>KarmaScripter/BudgetX
CREATE TABLE GsPayScale
(
ID INTEGER NOT NULL UNIQUE IDENTITY(1,1),
LOCNAME NVARCHAR(255) NULL,
GRADE FLOAT NULL,
ANNUAL1 FLOAT NULL,
HOURLY1 NVARCHAR(255) NULL,
OVERTIME1 NVARCHAR(255) NULL,
ANNUAL2 FLOAT NULL,
HOURLY2 NVARCHAR(255) NULL,
OVERTIME2 NVARCHAR(255) NULL,
ANNUAL3 ... |
<reponame>marcelo5g/teoSQL-V2<filename>ep03/distinct_case.sql
-- lista das categorias por ordem alfabética
-- CASE é o IF do SQL
SELECT
DISTINCT CASE WHEN product_category_name IS NULL THEN 'outros'
ELSE product_category_name
END AS categoria_fillna
FROM tb_products
o... |
<filename>configuration.sql<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 07, 2016 at 10:08 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OL... |
DECLARE @SourceSchema sysname = '<SourceSchema>' -- 'dw'
, @SourceTable sysname = '<SourceTable>' -- 'Case'
, @MaxColLen INT
, @SQL VARCHAR(MAX)
, @iCount INT
, @CR CHAR(2) = CHAR(13) + CHAR(10)
, @TB INT = 4
DECLARE @Cols TABLE (Id INT IDENTITY(1,1), ColName VARCHAR(100), OrigDataType VARCHAR(20), DataType V... |
/*
This script will create stored procedure to
1. create recordDateTime column for Account_Info table
2. sort the table in account, recordDateTime with descent order
*/
set ansi_nulls on
go
set quoted_identifier on
go
DROP PROCEDURE IF EXISTS sortAcctTable
GO
create procedure sortAcctTable @table nvarchar(max)
as
... |
-- write insert queries to populate the `burgers` table with at least three entries.
INSERT INTO buyers (buyer_name) VALUES ('Kevon');
INSERT INTO buyers (buyer_name) VALUES ('Jane');
INSERT INTO pets (animal_breed, animal_name, price, buyer_id) VALUES ('wolf', 'Cassie', 195, 1);
INSERT INTO pets (animal_breed, animal... |
--DROP FUNCTION populate_country_region_city_id_ipv4();
CREATE OR REPLACE FUNCTION populate_country_region_city_id_ipv4()
RETURNS SETOF varchar AS $BODY$
DECLARE country_temp varchar(64);
DECLARE region_temp varchar(100);
DECLARE city_temp varchar(100);
DECLARE counter bigint;
DECLARE xyz CURSOR FOR SELECT * from publ... |
<reponame>ctrlenter/migr8
-- This is a test
-- Does it work with multiple comments???
CREATE TABLE "Bimse" (
"Id" BIGSERIAL PRIMARY KEY,
"Data" TEXT
); |
<filename>src/test/resources/shared.test_59.sql
-- shared.test
--
-- execsql {
-- CREATE TABLE ab(a PRIMARY KEY, b);
-- CREATE TABLE de(d PRIMARY KEY, e);
-- INSERT INTO ab VALUES('<NAME>', 100000);
-- INSERT INTO ab VALUES('Bangkok', 8000000);
-- INSERT INTO de VALUES('Ubon', 120000);
-- INSER... |
<filename>src/test/resources/sql/insert/fbff041c.sql
-- file:numeric.sql ln:118 expect:true
INSERT INTO num_exp_mul VALUES (2,3,'-147998901.44836127257')
|
<filename>data/sql/galaxy_manager/scripts/galaxy.sql
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!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' */;
CREATE TABL... |
<gh_stars>1-10
drop database if exists ctd;
create database ctd;
\c ctd;
create table Groups (
group_id int,
group_no char(5)
);
create table Students (
student_id int,
name varchar(30),
group_id int
);
insert into Groups
(group_id, group_no) values
(1, 'M3437'),
(2, 'M3439');
insert into Students... |
SELECT FIRST_NAME, LAST_NAME
FROM employees
WHERE LAST_NAME LIKE '%i%' OR LAST_NAME LIKE '%a%' OR LAST_NAME LIKE '%o%'
|
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50553
Source Host : 127.0.0.1:3306
Source Database : badmin
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2019-04-14 14:23:01
*/
SET FOREIGN_KEY_C... |
CREATE DATABASE IF NOT EXISTS `jbone_sys` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `jbone_sys`;
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: localhost Database: jbone_sys
-- ------------------------------------------------------
-- Server version 5.7.20
/*!40101 SET @OLD_CHARACTER_SE... |
-- Deploy ggircs-portal:database_functions/get_valid_applications_for_certifier to pg
-- requires: tables/certification_url
begin;
drop function ggircs_portal_private.get_valid_applications_for_certifier;
commit;
|
create table REPORT_GROUP (
ID varchar2(32) not null,
CREATE_TS timestamp,
CREATED_BY varchar2(50 char),
VERSION integer default 1 not null,
UPDATE_TS timestamp,
UPDATED_BY varchar2(50 char),
DELETE_TS timestamp,
DELETED_BY varchar2(50 char),
TITLE varchar2(255 char) not null,
C... |
//// CHANGE name=change0
CREATE TABLE table256 (
id integer NOT NULL,
field1 character varying(30),
usertype0field usertype0,
usertype8field usertype8,
usertype5field usertype5
);
GO
//// CHANGE name=change1
ALTER TABLE ONLY table256
ADD CONSTRAINT table256_pkey PRIMARY KEY (id);
GO
|
<gh_stars>100-1000
select * from EMPLOYEE where EMPLOYEE_NAME like /* @prefix(employeeName) */'aaa%' escape '$' |
-- apply changes
create table fh_acl (
id uuid not null,
environment_id uuid,
application_id uuid,
group_id uuid,
roles varchar(255),
version bigint not null,
when_updated ... |
<gh_stars>1000+
select URLHash('' as url) = URLHash(appendTrailingCharIfAbsent(url, '/'));
select URLHash('http://ya.ru' as url) = URLHash(appendTrailingCharIfAbsent(url, '/'));
select URLHash('http://ya.ru' as url) = URLHash(appendTrailingCharIfAbsent(url, '?'));
select URLHash('http://ya.ru' as url) = URLHash(appendT... |
<filename>src/test/isolation2/sql/resgroup/resgroup_operator_memory.sql
SET optimizer TO off;
--
-- setup
--
--start_ignore
DROP VIEW IF EXISTS many_ops;
DROP ROLE r1_opmem_test;
DROP RESOURCE GROUP rg1_opmem_test;
DROP RESOURCE GROUP rg2_opmem_test;
CREATE LANGUAGE plpython3u;
--end_ignore
-- a helper function to r... |
.mode csv
.import input input
-- First half
SELECT DISTINCT t1.value * t2.value
FROM input t1, input t2
WHERE t1.value + t2.value = 2020;
-- Second half
SELECT DISTINCT t1.value * t2.value * t3.value
FROM input t1, input t2, input t3
WHERE t1.value + t2.value + t3.value = 2020; |
<reponame>opengauss-mirror/Yat
-- @testpoint: opengauss关键字procedural(非保留),作为同义词对象名,部分测试点合理报错
--前置条件
drop table if exists procedural_test;
create table procedural_test(id int,name varchar(10));
--关键字不带引号-成功
drop synonym if exists procedural;
create synonym procedural for procedural_test;
insert into procedural values... |
<reponame>mememeeryl/aps<filename>data/csodatabasev4.sql<gh_stars>0
CREATE DATABASE IF NOT EXISTS `cso` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `cso`;
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: cso
-- ------------------------------------------------------
-- Server v... |
<filename>alert.sql
CREATE OR REPLACE STREAM "DESTINATION_SQL_STREAM" (
ticker_symbol varchar(4),
avg_change double);
CREATE OR REPLACE PUMP "STREAM_PUMP" AS INSERT INTO "DESTINATION_SQL_STREAM"
SELECT STREAM ticker_symbol, avg_change
FROM (
SELECT STREAM
ticker_symbol,
AVG(change) OVER W1 a... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 11 Des 2017 pada 07.49
-- Versi Server: 10.1.28-MariaDB
-- PHP Version: 5.6.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
<reponame>jRiest/PuckHunt<filename>server/db_setup.sql
CREATE TABLE pucks (
id integer NOT NULL,
name text,
estimote_id text,
beacon_uuid text,
beacon_major_val integer,
beacon_minor_val integer,
lat double precision,
lng double precision
);
CREATE SEQUENCE pucks_id_seq
START WITH 1... |
<filename>prisma/migrations/20220208155731_add_created_at_to_session/migration.sql
-- AlterTable
ALTER TABLE "Session" ADD COLUMN "createdAt" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP;
|
<filename>module1-introduction-to-sql/queries/part1/q3.sql
SELECT
count(*) as "total_items"
FROM
charactercreator_character_inventory |
--d:postgres
SET search_path = tasker, pg_catalog ;
CREATE OR REPLACE FUNCTION activity_is_parent_of (
a_activity_id integer,
a_parent_id integer )
RETURNS boolean
STABLE
SECURITY DEFINER
-- Set a secure search_path
SET search_path = tasker, pg_catalog, pg_temp
LANGUAGE plpgsql
AS $$
DECLARE
l_rec record ... |
INSERT INTO department (name)
VALUES ("Accounting"),
("Production"),
("Maintenance");
INSERT INTO role (title, salary, department_id)
VALUES ("Finance Manager", 90000, 1),
("IT Manager", 80000, 2),
("Maintenance Manager", 70000, 3),
("Accountant", 50000, 1),
("Office Assistant", 30000, 1),
... |
CREATE DATABASE covidhm;
\connect covidhm; |
<filename>rpfdb/resources/refresh_db.sql
DROP DATABASE IF EXISTS rpf;
DROP DATABASE IF EXISTS rpf_pre;
CREATE DATABASE rpf;
CREATE DATABASE rpf_pre;
|
<filename>src/main/resources/sql/settings_pay_type.sql
/*
Navicat Premium Data Transfer
Source Server : mysql-5.7.21
Source Server Type : MySQL
Source Server Version : 50721
Source Host : localhost:3306
Source Schema : db_springboot_layui
Target Server Type : MySQL
Target Serve... |
<filename>database/pgpb.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th12 07, 2019 lúc 12:55 PM
-- Phiên bản máy phục vụ: 10.3.16-MariaDB
-- Phiên bản PHP: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TR... |
<reponame>Soumya-Dey/PL-SQL-programs<gh_stars>0
-- only id
CREATE OR REPLACE PROCEDURE
adjust_salary_id(
in_employee_id IN emp.emp_id%TYPE,
in_percent IN NUMBER
) IS
BEGIN
UPDATE emp
SET esal = esal + esal * in_percent / 100
WHERE eid = in_employee_id;
END;
-- only ... |
<gh_stars>0
/*Customer table*/
INSERT INTO CUSTOMER VALUES('123456E7', 'GHI',
NULL,'GHI','9098123429', '<EMAIL>','122 DALLAS DOWNTOWN',
'DALLAS','TEXAS',50932,'N',NULL);
INSERT INTO CUSTOMER VALUES('T0981237', 'DEF',
NULL,'DEF','4245985740', '<EMAIL>','212 MIDWAY STREET',
'RALEIGH','NORTH CAROLINA',42571,'M','M10... |
<gh_stars>1-10
BEGIN;
CREATE TYPE user_status AS ENUM ('Active', 'Inactive', 'Blocked', 'Deleted');
CREATE TABLE IF NOT EXISTS users (
id UUID DEFAULT uuid_generate_v4(),
email text UNIQUE,
password text NOT NULL,
name text NOT NULL,
status user_status NOT NULL DEFAULT 'Inactive',
created_a... |
SET client_min_messages TO warning;
--This is for testing functionality of timezone-specific timestamps
SET TIMEZONE TO 'America/Chicago';
/***
Based on our config, this should not create an ERROR but should not do anything.
*/
INSERT INTO test.orders (order_id, customer_id, order_date, total)
VALUES (5, NULL, '2018-... |
CREATE TABLE [KNet].[Command] (
[ID] INT IDENTITY (1, 1) NOT NULL,
[Active] BIT CONSTRAINT [CS_KNet.Command_Active] DEFAULT (CONVERT([bit],(1))) NOT NULL,
[DateCreated] DATETIME CONSTRAINT [CS_KNet.Command_DateCreated] DEFAULT (getdate()) NOT NULL,
... |
--
-- database_schema_3-4.sql
--
-- Version: $Revision$
--
-- Date: $Date: 2012-05-29
--
-- The contents of this file are subject to the license and copyright
-- detailed in the LICENSE and NOTICE files at the root of the source
-- tree and available online at
--
-- http://www.dspace.org/license/
--
--
-- SQL comma... |
/* ================================================
* Oracle XFiles Demonstration.
*
* Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"... |
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1
-- Время создания: Апр 05 2013 г., 12:02
-- Версия сервера: 5.5.27
-- Версия PHP: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!401... |
DROP TABLE IF EXISTS oauth_access_token;
DROP TABLE IF EXISTS oauth_refresh_token;
CREATE TABLE oauth_access_token (
token_id VARCHAR(256),
token BLOB,
authentication_id VARCHAR(256),
user_name VARCHAR(256),
client_id VARCHAR(256),
authentication BLOB,
refresh_token... |
# Populating ALBUM
INSERT INTO locker.ALBUM( DESC1, USER_ID ) VALUES ( '', NULL );
INSERT INTO locker.ALBUM( DESC1, USER_ID ) VALUES ( 'Vanilla Time', 1 );
INSERT INTO locker.ALBUM( DESC1, USER_ID ) VALUES ( 'Greatest Hits', 1 );
INSERT INTO locker.ALBUM( DESC1, USER_ID ) VALU... |
drop table if exists job_config;
|
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 04-Abr-2020 às 02:27
-- Versão do servidor: 10.4.11-MariaDB
-- versão do PHP: 7.3.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... |
select substring(basedatetime, 1, 10) as ymd, count(*) as n from af_vault.ais group by substring(basedatetime, 1, 10) order by ymd;
|
DROP TABLE IF EXISTS `org_invitations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `org_invitations` (
`user_id` int(11) NOT NULL,
`org_id` int(11) NOT NULL,
`developer_status` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`user_id`, `o... |
<gh_stars>100-1000
-- liquibase formatted sql
-- changeset darren:sql1
INSERT INTO account(uuid, kind, name, state) VALUES('admin', 'admin', 'admin', 'active');
INSERT INTO account(uuid, kind, name, state) VALUES('system', 'system', 'system', 'inactive');
INSERT INTO account(uuid, kind, name, state) VALUES('superadmi... |
CREATE TABLE backfill_runs (
id bigint NOT NULL PRIMARY KEY AUTO_INCREMENT,
service_id bigint NOT NULL,
registered_backfill_id bigint NOT NULL,
pipeline_target_backfill_id bigint NULL DEFAULT NULL,
created_at timestamp(3) NOT NULL DEFAULT NOW(3),
updated_at timestamp(3) NOT NULL DEFAULT NOW(3) ON UPDATE NO... |
<reponame>yuanweikang2020/canal<filename>parse/src/test/resources/ddl/alter/test_76.sql
CREATE TABLE `tb_wbajtotdth` (
`col_lmpzmediez` int unsigned zerofill,
`col_nhckjelmwe` year,
`col_yvelqmjboo` varbinary(185) DEFAULT '\0',
`col_uttbttlgkx` smallint(181) unsigned DEFAULT '1',
UNIQUE KEY `col_uttbttlgkx` (... |
--
-- hpc_catalog_metadata.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>
-- @version $Id$
--
DROP TABLE IF EXISTS ... |
DELETE FROM waffle_switch_mkt WHERE name="shared-secret-in-url";
|
drop table library.person;
create table library.BORROWER (
id serial PRIMARY KEY,
name VARCHAR(100) NOT NULL
);
create table library.BOOK (
id serial PRIMARY KEY,
title VARCHAR(100) NOT NULL
);
create table library.LOAN (
id serial PRIMARY KEY,
book int NOT NULL REFERENCES library.BOOK (id),
... |
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: 192.168.1.173 Database: juegafutboldb
-- ------------------------------------------------------
-- Server version 8.0.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL... |
<filename>initStaf.sql
/*insert into film [(filmID, naam, genre, uitgebrachtOp, kosten, filmOmschrijving)]
values ('1', '<NAME>', 'Thriller', 2004, 7.50, 'spannende thriller over een prinsis die in het bos gevonden wordt door zeven dwergen');
*/
--stafid,naam
insert into staf (stafid,naam)
values (1,'steven si... |
------------------------
-- 删除数据库下的所有表格
------------------------
USE cpdc1111
GO
-- 定义变量
DECLARE @drop_all_sql VARCHAR ( 8000 )
-- 循环判断是否还有表未删除
WHILE ( SELECT COUNT ( * ) FROM sysobjects WHERE type = 'U' ) > 0
BEGIN
-- 拼接SQL
SELECT
@drop_all_sql = 'drop table ' + name
FROM
sysobj... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 14, 2022 at 04:53 PM
-- Server version: 8.0.27-0ubuntu0.20.04.1
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_S... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 05 Des 2019 pada 01.05
-- Versi server: 10.4.8-MariaDB
-- Versi PHP: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Nov 15, 2019 at 07:57 PM
-- Server version: 5.7.26
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `orders`
--
-- ---------------------------... |
<reponame>segor/zno-opendata
CREATE FUNCTION [dbo].[clean_str]
(
@str NVARCHAR(500) NULL
)
RETURNS NVARCHAR(500)
AS
BEGIN
RETURN CASE WHEN @str <> 'null' THEN LTRIM(RTRIM(REPLACE(REPLACE(REPLACE(@str, N'"', N''), CHAR(13), N''), CHAR(10), N' '))) END
END
|
-- Descripción de Datos de la BD -> Productos.db
-- Crear la tabla Empresa (Entidad del contexto general - no hace parte del REQ)
CREATE TABLE Empresa(
ID_Empresa INTEGER NOT NULL,
Nombre VARCHAR(50) NOT NULL,
NIT VARCHAR(11) NOT NULL,
Fecha_Fundacion DATETIME NOT NULL,
Antiguedad INTEGER GENERATED... |
use job_manage;
SET NAMES utf8mb4;
CREATE TABLE `user_custom_script_template` (
`row_create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`row_update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`username` varchar(128) NOT NULL,
`script_language` tinyint(5) NOT NULL,
`... |
begin;
drop table if exists bbref.results;
create table bbref.results (
game_id integer,
year integer,
game_date date,
team_name text,
team_id text,
opponent_name text,
opponent_id text,
location_id text,
field text,
team_score integer,
oppone... |
<reponame>aliostad/deep-learning-lang-detection<filename>data/train/sql/90a56c432ae09dc9bc644c3582e57c83b03e922bdbo.SWITCHclient_HeaderUpdate.StoredProcedure.sql
USE [NavIntegrationDB]
GO
/****** Object: StoredProcedure [dbo].[SWITCHclient_HeaderUpdate] Script Date: 02/13/2012 17:17:22 ******/
SET ANSI_NULLS ON
GO... |
<reponame>tomjrees/plpg_hashids
drop function if exists hashids.consistent_shuffle(text, text);
CREATE OR REPLACE FUNCTION hashids.consistent_shuffle
(
p_alphabet text,
p_salt text
)
RETURNS text AS
$$
DECLARE p_alphabet ALIAS FOR $1;
p_salt ALIAS FOR $2;
v_ls int;
v_i int;
v_v int := 0;
v_p int := 0;
v_n in... |
-- Revert seattleflu/schema:roles/public from pg
begin;
grant usage on schema sqitch to public;
commit;
|
<filename>src/test/resources/pager1.test_49.sql
-- pager1.test
--
-- execsql {
-- CREATE TABLE t6(a, b);
-- CREATE TABLE t7(a, b);
-- CREATE TABLE t5(a, b);
-- DROP TABLE t6;
-- DROP TABLE t7;
-- }
CREATE TABLE t6(a, b);
CREATE TABLE t7(a, b);
CREATE TABLE t5(a, b);
DROP TABLE t6;
DROP TA... |
-- where.test
--
-- execsql {
-- SELECT 1 WHERE abs(random())<0
-- }
SELECT 1 WHERE abs(random())<0 |
<gh_stars>0
-- Exported from QuickDBD: https://www.quickdatabasediagrams.com/
-- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here.
-- Modify this code to update the DB schema diagram.
-- To reset the sample schema, replace everything with
-- two dots ('..' - without quotes).
... |
<reponame>pingoswoole/tpadmin
/*
Navicat Premium Data Transfer
Source Server : 192.168.0.168
Source Server Type : MySQL
Source Server Version : 100508
Source Host : 192.168.0.168:3306
Source Schema : tpadmin
Target Server Type : MySQL
Target Server Version : 100508
... |
-- !Ups
CREATE TABLE "person" (
"id" serial PRIMARY KEY,
"name" varchar(255) NOT NULL,
"age" integer NOT NULL
);
-- !Downs
DROP TABLE "person" if exists; |
CREATE DATABASE `sales`;
CREATE TABLE `customer`
(
`id` int (11) NOT NULL AUTO_INCREMENT,
`name` varchar (45) NOT NULL,
`email` varchar (45) NOT NULL,
`address` varchar (45) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE= InnoDB DEFAULT CHARSET= utf8;
/* CREATE user 'kooryryuu'@'localhost';
GRANT ALL ON sales.* T... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Machine: localhost
-- Genereertijd: 09 okt 2015 om 21:05
-- Serverversie: 5.5.41-0ubuntu0.14.04.1
-- PHP-versie: 5.5.9-1ubuntu4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@... |
<reponame>BrettPWRE/HDB<filename>oracle_script/CONSTRAINTS/hdb_ext_data_source_ref.ddl
alter table hdb_ext_data_source
add
constraint hdb_ext_data_source_fk1
foreign key (agen_id)
references hdb_agen(agen_id);
alter table hdb_ext_data_source
add
constraint hdb_ext_data_source_fk2
foreign key (model_id)
... |
CREATE TABLE "Departments" (
"id" serial,
"title" varchar(50) NOT NULL,
"remark" text
);
ALTER TABLE "Departments" ADD CONSTRAINT "PK_Departments" PRIMARY KEY ("id");
CREATE TABLE "Roles" (
"name" varchar(50) NOT NULL
);
ALTER TABLE "Roles" ADD CONSTRAINT "PK_Roles" PRIMARY KEY ("name");
CREATE TABLE "Users" (
... |
<filename>jOOQ-test/src/org/jooq/test/cubrid/create.sql
DROP VIEW v_library/
DROP VIEW v_author/
DROP VIEW v_book/
DROP TRIGGER t_triggers_trigger/
DROP TABLE t_dates/
DROP TABLE t_triggers/
DROP TABLE t_book_to_book_store/
DROP TABLE t_book_store/
DROP TABLE t_book/
DROP TABLE t_book_details/
DROP TABLE t_author/
DR... |
<reponame>HeroicHitesh/datashare-toolkit
bqutil.fn.y4md_to_date(date) AS game_date,
* EXCEPT(date),
CONCAT(v_name, '|', h_name) AS label
|
--
-- Test access privileges
--
-- Clean up in case a prior regression run failed
-- Suppress NOTICE messages when users/groups don't exist
SET client_min_messages TO 'warning';
DROP ROLE IF EXISTS regress_priv_group1;
DROP ROLE IF EXISTS regress_priv_group2;
DROP ROLE IF EXISTS regress_priv_user1;
DROP ROLE IF EXI... |
use brihaspati;
drop table if exists COURSE_PROGRAM;
CREATE TABLE COURSE_PROGRAM
(
ID INTEGER NOT NULL,
STUDENT_ID INTEGER NOT NULL,
COURSE_ID VARCHAR(255) NOT NULL,
PROGRAM VARCHAR(255) NOT NULL,
PRIMARY KEY(ID),
UNIQUE(STUDENT_ID,COURSE_ID,PROGRAM),
Foreign Key (STUDENT_ID)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.