sql stringlengths 6 1.05M |
|---|
-- Drops the blogger if it exists currently --
DROP DATABASE IF EXISTS employee_db;
-- Creates the "blogger" database --
CREATE DATABASE employee_db;
-- this used to create the database
USE employee_db;
CREATE TABLE departments (
id INT NOT NULL AUTO_INCREMENT,
department_name VARCHAR(30) NOT NULL,
PRIMARY KEY ... |
/*
*/
set serveroutput on size unlimited echo off
ACCEPT p_owner PROMPT "Owner: "
ACCEPT p_tables DEFAULT '.*' PROMPT "Table name. [ALL]: "
ACCEPT p_types DEFAULT 'P,U,R' PROMPT "Constraint type (P,U,R). [ALL]: "
PROMPT
PROMPT Disabled constraints (before)
SELECT c.owner, c.table_name, c.constraint_type, c.constraint... |
INSERT INTO honeywell5800_trips(sensor, loop, trippedBy)
SELECT @sensor as new_sensor,
@loop as new_loop,
@trippedBy as new_trippedBy
-- do not insert a new record if last trip contained
-- the same information
WHERE new_trippedBy NOT IN (
SELECT trippedBy FROM honeywell5800_trips
WHERE sensor=new_sen... |
<gh_stars>1-10
-- Add used protocol to producer table
DO $$
BEGIN
RAISE NOTICE '--- Running alter-script v 2.2.2: REST support ---';
RAISE NOTICE 'Removing default value of producer table protocol column.';
ALTER TABLE <misp2_schema>.producer
ALTER COLUMN protocol DROP DEFAULT;
... |
<reponame>EmmaRocheteau/eICU-GNN-LSTM
-- MUST BE RUN FIRST
-- creates a materialized view labels which looks like this:
/*
patientunitstayid | predictedhospitalmortality | actualhospitalmortality | predictediculos | actualiculos
-------------------+----------------------------+-------------------------+------------... |
-- file:updatable_views.sql ln:99 expect:true
UPDATE ro_view20 SET b=upper(b)
|
<reponame>franciscosens/doa-sangue
DROP TABLE IF EXISTS usuarios;
DROP TABLE IF EXISTS doacoes_perguntas;
DROP TABLE IF EXISTS doacoes;
DROP TABLE IF EXISTS hemocentros;
DROP TABLE IF EXISTS perguntas;
DROP TABLE IF EXISTS doadores;
DROP TABLE IF EXISTS hemocentros;
CREATE TABLE hemocentros(
id INTEGER PRIMARY KEY I... |
<filename>conf/evolutions/default/1.sql
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table random (
id varchar(255) not null,
sequence varchar(255),
lane varchar(255),
se... |
<filename>39/src/main/resources/db/migration/V1.1.0__sys_user_add_column.sql
alter table SYS_USER add signature varchar(60) comment 'ca签名'; |
<reponame>zeropsio/recipe-contember-engine<filename>packages/engine-tenant-api/src/migrations/2019-02-18-160155-session-expiration.sql<gh_stars>10-100
ALTER TABLE "api_key"
ADD COLUMN expiration INT DEFAULT NULL;
|
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET cli... |
create table client
(
id bigserial not null primary key,
name varchar(50)
);
create table manager
(
no bigserial not null primary key,
label varchar(50)
);
|
<filename>Odev4-5.sql<gh_stars>0
--dvdrental örnek veri tabanı üzerinden city tablosundaki şehir isimlerinin kaç tanesi 'R' veya r karakteri ile biter?
SELECT COUNT(city) FROM city
WHERE city ILIKE '%R';
|
<gh_stars>0
SELECT COUNT(i.InvoiceLineId) as Id37LineItems
FROM InvoiceLine i
WHERE i.InvoiceId = 37;
|
-- MySQL dump 10.13 Distrib 5.7.26, for osx10.10 (x86_64)
--
-- Host: 127.0.0.1 Database: laraclassified
-- ------------------------------------------------------
-- Server version 5.7.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL... |
<reponame>SebastianBienert/AdvancedDatabase
--Lista artystów, którzy stworzyli albumy o łącznym czasie utworów z gatunku rock dłuższym niż 1 godzina.
DECLARE
artistname VARCHAR(200);
BEGIN
for v_rec in (
SELECT DISTINCT
( ar.name )
FROM
artist ar
JOIN album a ON ar.artistid = a.artistid
... |
-- 1. insert two new records into the employee table.
Select * from Employee;
Insert into Employee(EmployeeId, LastName, FirstName) Values (9,'Funtanilla', 'Noah');
Insert into Employee(EmployeeId, LastName, FirstName) Values (10,'Hello', 'World');
-- 2. insert two new records into the tracks table.
Select * From Trac... |
<filename>SQL/Configure/Configure OLE Automation Procedures.sql<gh_stars>0
/**************************************************************************************
** CREATED BY: <NAME>
** CREATED DATE: 2018.08.21
** CREATION: Quick script to get a comma separated list of data.
*******************************... |
<filename>database/hotich.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th7 17, 2017 lúc 11:57 SA
-- Phiên bản máy phục vụ: 10.1.21-MariaDB
-- Phiên bản PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
... |
<filename>sql/2111/units.sql
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 21, 2019 at 05:32 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = ... |
CREATE TABLE owner_tokens(
owner_id int(11) NOT NULL,
api_token varchar(255) CHARACTER SET '<PASSWORD>',
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`owner_id`),
UNIQUE uniq_token (`api_token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
-- file:rowsecurity.sql ln:1194 expect:true
CREATE TABLE copy_t (a integer, b text)
|
<filename>Transaction/トランザクション分離レベルの確認.sql
SELECT
s.session_id,
CASE s.transaction_isolation_level
WHEN 0 THEN 'Unspecified'
WHEN 1 THEN 'ReadUncommitted'
WHEN 2 THEN 'ReadCommitted'
WHEN 3 THEN 'Repeatable'
WHEN 4 THEN 'Serializable'
WHEN 5 THEN 'Snapshot'
END AS Transaction_Isolation_Level ,
s.... |
DROP TABLE IF EXISTS user_secrets;
|
/*Clear Query Store and procedure cache*/
ALTER DATABASE AdventureWorks2016_EXT SET QUERY_STORE CLEAR;
ALTER DATABASE AdventureWorks2016_EXT SET QUERY_STORE = ON (QUERY_CAPTURE_MODE = ALL);
DBCC FREEPROCCACHE
GO
USE AdventureWorks2016_EXT;
GO
/*Run simple query - what data is collected and where does it go to?*/
SELEC... |
<gh_stars>1000+
-- 2017-07-19T17:17:54.862
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Table SET EntityType='de.metas.handlingunits',Updated=TO_TIMESTAMP('2017-07-19 17:17:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540831
;
-- 2017-07-19T17:18:12.053
-- I forgot to set... |
/*
Navicat MySQL Data Transfer
Source Server : 本地
Source Server Version : 50716
Source Host : 127.0.0.1:3306
Source Database : qzxyback
Target Server Type : MYSQL
Target Server Version : 50716
File Encoding : 65001
Date: 2019-01-16 21:46:16
*/
SET FOREIGN_KEY_CHECKS=0;
-- -------... |
<filename>src/test/resources/com/foundationdb/sql/parser/group-by-var-pop.sql
SELECT
var_pop(a),
b
GROUP BY
b |
create table contact (
id serial PRIMARY KEY
, first_name varchar(60) not null
, last_name varchar(60) not null
, birth_date date
, version int not null default 0
, unique (first_name, last_name)
);
create table hobby (
hobby_id varchar(20) not null
, primary key (hobby_id)
);
create... |
INSERT INTO borrow (inventory_nr, inventory_device_name, maintainer_shift_id, motivation, start_at, end_at) VALUES (1, 'guanti', 2, 'DPI minimale per classe di pericolo indicata PE00', '2018-08-19 16:25:00', '2018-08-19 18:38:00');
INSERT INTO borrow (inventory_nr, inventory_device_name, maintainer_shift_id, motivation... |
SELECT
rg.id
, rg.code
, rg.name
, COALESCE( (
SELECT
COUNT( 1 )
FROM
role r
WHERE
r.gid = rg.id
) ) roles_count
, rg.description
FROM
role_group rg
LEFT JOIN
role_company rc
ON
rc.gid = rg.id
LEFT JOIN
company c
ON
rc.cid = c.id
W... |
<gh_stars>1-10
CREATE TABLE TABLE1 (ID VARCHAR(100) PRIMARY KEY);
INSERT INTO TABLE1 VALUES ('http://other.example.com/1');
|
INSERT INTO PLM_VERSION(ID,NAME,STATUS,PRIORITY,PROJECT_ID) VALUES(11,'1.0.0','active',1,11);
|
ALTER TABLE `lh_chat` ADD `unanswered_chat` int(11) NOT NULL DEFAULT '0', COMMENT='';
ALTER TABLE `lh_chat` ADD INDEX `unanswered_chat` (`unanswered_chat`);
ALTER TABLE `lh_users` ADD `attr_int_1` int(11) NOT NULL, COMMENT='';
ALTER TABLE `lh_users` ADD `attr_int_2` int(11) NOT NULL, COMMENT='';
ALTER TABLE `lh_users` ... |
<filename>sql/_12_mysql_compatibility/_09_table_related/cases/_Q3005_create_table_constraint_add.sql
--+ holdcas on;
set system parameters 'compat_mode=mysql';
create table t1 (a int);
insert into t1 values (1),(2),(3);
alter table t1 add column b int primary key;
drop table t1;
create table t1 (a int);
insert into... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jul 06, 2021 at 01:06 PM
-- Server version: 10.3.29-MariaDB-0+deb10u1
-- PHP Version: 7.3.27-1~deb10u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 24, 2019 at 05:01 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<gh_stars>0
DROP TABLE IF EXISTS user;
DROP TABLE IF EXISTS course;
DROP TABLE IF EXISTS program;
DROP TABLE IF EXISTS course_type;
DROP TABLE IF EXISTS focus;
DROP TABLE IF EXISTS traditional;
DROP TABLE IF EXISTS equipment;
DROP TABLE IF EXISTS experience;
DROP TABLE IF EXISTS university;
DROP TABLE IF EXISTS univers... |
<filename>sql/recruitment.sql
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 25, 2020 at 10:28 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
-- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 16, 2020 at 05:30 PM
-- Server version: 5.6.49-cll-lve
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 07, 2020 at 11:15 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
Create Table Departments(
Department_ID Number Not Null Constraint Dept_ID_PK Primary Key,
Department_Name Varchar2(255) Not Null Constraint Dept_Name_QK Unique,
Manager_ID Number
Location_ID Number,
);
|
<gh_stars>0
# ************************************************************
# Sequel Pro SQL dump
# Version 4096
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: us-cdbr-iron-east-02.cleardb.net (MySQL 5.5.42-log)
# Database: heroku_e56800c88b7a6b4
# Generation Time: 2015-06-07 19:16:58 +00... |
<reponame>mtasca/CurrencyConverter
#
# Drop database currency_converter
# ------------------------------------------------------------
DROP DATABASE IF EXISTS currency_converter;
#
# Create database currency_converter
# ------------------------------------------------------------
CREATE DATABASE currency_converter;
U... |
<gh_stars>1-10
--password for all users is "<PASSWORD>"
INSERT INTO users (id, city, country, flat_number, postal_code, street_name, street_number, email, gender, initial_password_changed, is_activated, name, password, last_password_reset_date, phone_number, surname, user_type, version)
values (10, 'Beograd', 'Srbija'... |
ALTER TABLE ONLY transactions
DROP CONSTRAINT IF EXISTS transactions_pkey; |
CREATE INDEX IF NOT EXISTS md_cockpit_dategeneral
ON public.md_cockpit
USING btree
(dategeneral);
CREATE UNIQUE INDEX IF NOT EXISTS md_cockpit_uc
ON public.md_cockpit
USING btree
(dategeneral, m_product_id, attributeskey);
|
<filename>db/patches/2410_activity_v2_deprecations.sql
/* Changes to create a modern version of the Activity */
COMMENT ON COLUMN activity.duration
IS 'DEPRECATED - use activity_duration to document the time taken to perform the activity.';
COMMENT ON COLUMN activity.data_usage
IS 'DEPRECATED - A description of th... |
<reponame>SPbAU-ProgrammingParadigms/materials
select * from Country
where GovernmentForm in ('Monarchy', 'Republic');
|
exec arcsql.stop;
drop package body arcsql;
drop package arcsql;
drop function arcsql_version;
drop view locked_objects;
drop view lockers;
drop view name_generator;
drop view lock_time;
drop table cache;
drop table config_settings;
drop sequence seq_sql_log_id;
drop table sql_snap;
drop table sql_log;
drop table sql_l... |
alter table medal_tally drop primary key cascade;
drop table medal_tally cascade constraints purge;
create table medal_tally (
id number
,ranking number
,country varchar2(125)
,gold number
,silver number
,bronze number
,total number
,constraint medal_tally_pk primary key (id)
);
inser... |
--Tytuł: Procedura tworzy listę pracowników z podsumowaniem warunków szkodliwych w 1 wierszu
--Autor: <NAME>
--Update: 13-03-2022
--Version v1.2
/* Skrót do obsługi procedury
EXEC dbo.EmpHarmCondPlus
*/
USE EmployeeMedicalTest
GO
--Usuń Procedure jeżeli istnieje
IF OBJECT_ID ('dbo.EmpHarmCondPlus') IS NOT NULL DROP ... |
--
-- scoring support
--
CREATE OR REPLACE FUNCTION score(ctid tid) RETURNS float4 PARALLEL UNSAFE LANGUAGE c AS 'MODULE_PATHNAME', 'zdb_score';
|
<reponame>zixia/17salsa.com
--
-- 導出表中的數據 `ecm_regions`
--
INSERT INTO `ecm_regions` (region_id, parent_id, region_name, store_id) VALUES
(1, 0, '中國', 0),
(2, 1, '北京', 0),
(3, 1, '天津', 0),
(4, 1, '河北', 0),
(5, 1, '山西', 0),
(6, 1, '內蒙古', 0),
(7, 1, '遼寧', 0),
(8, 1, '吉林', 0),
(9, 1, '黑龍江', 0),
(10, 1, ... |
print '
Generating template dynamic view triggers...'
IF OBJECT_ID('[orm_meta].[generate_template_view_triggers]', 'P') IS NOT NULL
DROP PROCEDURE [orm_meta].[generate_template_view_triggers]
go
create procedure [orm_meta].[generate_template_view_triggers]
@template_guid uniqueidentifier
as
begin
set nocount on;... |
<filename>tpc-c/benchmark/run/sql.common/indexCreates.sql
alter table bmsql_warehouse add constraint bmsql_warehouse_pkey
primary key (w_id);
alter table bmsql_district add constraint bmsql_district_pkey
primary key (d_w_id, d_id);
alter table bmsql_customer add constraint bmsql_customer_pkey
primary key (c_w_... |
WITH revenue0 AS (
SELECT
l.suppkey as supplier_no,
sum(l.extendedprice*(1-l.discount)) as total_revenue
FROM
"${database}"."${schema}"."${prefix}lineitem" l
WHERE
l.shipdate >= DATE '1996-01-01'
AND l.shipdate < DATE '1996-01-01' + INTERVAL '3' MONTH
GROUP BY
l.suppkey
)
/* TPC_H ... |
-- the feed list has three seq scans on xml_tree_values and be pretty much unusable
drop index if exists xml_tree_values_results_state_path_idx;
create index xml_tree_values_results_state_path_idx on xml_tree_values(results_id, simple_path) where simple_path = 'VipObject.State.Name';
drop index if exists xml_tree_valu... |
CREATE OR REPLACE FUNCTION devilry__on_imageannotationcomment_after_insert_or_update() RETURNS TRIGGER AS $$
DECLARE
var_group_id integer;
BEGIN
var_group_id = devilry__get_group_id_from_feedbackset_id(NEW.feedback_set_id);
PERFORM devilry__rebuild_assignmentgroupcacheddata(var_group_id);
RETURN NEW;
EN... |
<gh_stars>1-10
--03_natural_join_bug_from_web_009.sql
drop table if exists a;
drop table if exists b;
drop table if exists c;
create table a ( id nchar(10));
create table b ( id nchar(20));
create table c ( id nchar(20));
insert into a values(n'aaa');
insert into a values(n'bbb');
insert into b values(n'aaa');
insert... |
<filename>openGaussBase/testcase/SQL/DDL/table/Opengauss_Function_DDL_Table_Case0041.sql
-- @testpoint: 列存表支持修改字段的数据类型
drop table if exists alter_table_tb041;
create table alter_table_tb041
(
c1 int,
c2 bigint,
c3 varchar(20)
)with(ORIENTATION=COLUMN);
insert into alter_table_tb041 values('11',null,'sss');
insert into ... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Nov 14, 2021 at 09:21 AM
-- Server version: 5.7.19
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
<filename>djequis/adp/sql/insert_hrstat_table.sql
INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('FT', 'FT Faculty', null, null);
INSERT INTO hrstat_table(hrstat, txt, active_date, inactive_date) VALUES ('PT', 'Part-time Fac Day', null, null);
INSERT INTO hrstat_table(hrstat, txt, active_date... |
<reponame>scoven2/Employee-Tracker
USE employeesDB;
INSERT INTO department (name)
VALUES ("Operations");
INSERT INTO department (name)
VALUES ("Compliance");
INSERT INTO department (name)
VALUES ("Finance");
INSERT INTO department (name)
VALUES ("Human Resources");
INSERT INTO department (name)
VALUES ("Legal");
INSE... |
insert into department(id, departmentName) values (1001, 'parzulpan');
|
<reponame>arianvaldivieso/pos<filename>application/migrations/20170712141515_min_and_max_price_items_item_kits.sql
-- min_and_max_price_items_item_kits --
ALTER TABLE `phppos_items` ADD `max_edit_price` decimal(23,10) NULL DEFAULT NULL,ADD `min_edit_price` decimal(23,10) NULL DEFAULT NULL;
ALTER TABLE `phppos_item_ki... |
<reponame>mnabavi84/datacamp-join-data-sql<filename>06-CROSSing the rubicon.sql
-- 4. Select fields
SELECT c.name AS city, l.name AS language
-- 1. From cities (alias as c)
FROM cities AS c
-- 2. Join to languages (alias as l)
CROSS JOIN languages AS l
-- 3. Where c.name like Hyderabad
WHERE c.name LIKE 'Hy... |
<reponame>karang24/crud_laravel
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 06, 2017 at 11:57 AM
-- 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_CL... |
<reponame>CallistoM/calc-shape-tool<gh_stars>0
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.18)
# Database: vat_tool
# Generation Time: 2017-10-25 20:13:04 +0000
#... |
DROP DATABASE IF EXISTS avito_small;
CREATE DATABASE avito_small;
\connect avito_small;
CREATE TABLE search_stream(
search_id NUMERIC,
ad_id NUMERIC,
position NUMERIC,
object_type NUMERIC,
hist_ctr NUMERIC,
is_click NUMERIC
);
CREATE TABLE search_info(
search_id NUMERIC,
search_date TIMESTAMP,
ip_... |
DECLARE @SummaryOfChanges_JobTypeGroup TABLE ([EventId] INT, [Action] VARCHAR(100));
MERGE INTO [dbo].[JobTypeGroup] AS Target
USING (VALUES
(1, 'Collection Submission', 25),
(2, 'Period End', 25),
(3, 'Reference Data', 25)
)
AS Source([JobTypeGroupId], [Description], [ConcurrentExecutionCount])
ON Target... |
<gh_stars>1-10
BEGIN;
SET client_min_messages TO ERROR;
SET client_encoding = 'UTF8';
DROP SCHEMA IF EXISTS peeps CASCADE;
CREATE SCHEMA peeps;
SET search_path = peeps;
-- Country codes used mainly for foreign key constraint on people.country
-- From http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
-- No need for any... |
<reponame>coderkan/crud-example
create table [dbo].[VR_ISG](
[id] [int] IDENTITY (1, 1) NOT NULL PRIMARY KEY,
[name]VARCHAR(50),
[date] DATE,
[update_date] DATE,
[sicil] VARCHAR(10),
[flag][int]
)
|
<filename>prisma/migrations/20210912090522_reinstate_profile_v7/migration.sql
/*
Warnings:
- The primary key for the `Profile` table will be changed. If it partially fails, the table could be left without primary key constraint.
*/
-- AlterTable
ALTER TABLE "Profile" DROP CONSTRAINT "Profile_pkey";
-- RenameInde... |
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:replica_identity.sql ln:74 expect:true
SELECT count(*) FROM pg_index WHERE indrelid = 'test_replica_identity'::regclass AND indisreplident
|
<filename>data/migrations/V0030__more_real_efile_objects.sql
SET search_path = real_efile, pg_catalog;
-- Name: f1; Type: TABLE; Schema: real_efile; Owner: fec
--
CREATE TABLE f1 (
repid numeric NOT NULL,
comid character varying(9),
com_name character varying(200),
com_str1 character varying(34),
... |
<reponame>mrudulpolus/kc
CREATE OR REPLACE procedure GET_S2S_SUBMISSION_TYPE_CODES
( cur_generic IN OUT result_sets.cur_generic) is
begin
open cur_generic for
SELECT S2S_SUBMISSION_TYPE_CODE,
DESCRIPTION,
UPDATE_TIMESTAMP,
UPDATE_USER
FROM OSP$S2S_SUBMISSION_TYPE;
end;
/
|
<reponame>qEasyChat/EasyChat
CREATE TABLE IF NOT EXISTS User(
id INTEGER PRIMARY KEY,
username TEXT NOT NULL,
password TEXT NOT NULL
) |
<reponame>ErikDono/EmployeeTracker<gh_stars>0
USE employees_DB;
insert into role (title, salary, dept_id) values ('Junior Developer I', 70000.00, 1);
insert into role (title, salary, dept_id) values ('Developer II', 110000.00, 1);
insert into role (title, salary, dept_id) values ('Developer III', 140000.00, 1);
insert... |
<reponame>igoralves1/HSJ---PHP
INSERT INTO patientecurrentsatus_history
(fk_patient, disp_name_patient, paciente_session, fk_exam_status_type,
disp_exam_status_type, dt_sys_admission, fk_tournee_medicale_fait,
disp_tournee_medicale_fait, fk_tournee_med_nursing_available,
disp_tournee_nursing_availab... |
/**************************************************************************************************
* FUNCTION eniwarenet.purge_completed_instructions(timestamp with time zone)
*
* Delete instructions that have reached the Declined or Completed state, and whose
* instruction date is older than the given date.
* ... |
CREATE PROCEDURE [dbo].[DataSet_Delete]
@datasetId int
AS
DECLARE @tableName nvarchar(64)
SELECT @tableName=tableName FROM DataSets WHERE datasetId=@datasetId
DECLARE @sql nvarchar(MAX) = 'DROP TABLE DataSet_' + @tableName
EXEC sp_executesql @sql
SET @sql = 'DROP SEQUENCE Sequence_DataSet_' + @tableName
EXEC sp... |
<filename>pcm-db-sample/insert_i18n_messages.sql
-- Pcm Sample Data
-- ------------------------------------------------------
USE `pcm`;
--
-- Insert i18n messages for Purpose of Use
--
insert into i18n_message values (1, 'PURPOSE.1.DISPLAY','Purpose of user treatment','en', 'Treatment');
insert into i18n_message va... |
-- db_patches
INSERT INTO `db_patches` (issue, created) VALUES ('POCOR-2967', NOW());
-- code here
ALTER TABLE `institution_subject_students` ADD INDEX `institution_id` (`institution_id`);
ALTER TABLE `institution_subject_students` ADD INDEX `student_id` (`student_id`);
ALTER TABLE `institution_subject_students` ADD ... |
--
-- Copyright 2020 The Android Open Source Project
--
-- 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
--
-- https://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applica... |
<reponame>menhuan/notes<gh_stars>10-100
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for people
-- ----------------------------
CREATE TABLE `people` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`name` varchar(40) CHARACTER SET utf8 COLLATE utf8_hung... |
<reponame>jambulud/devon4j
-- *** BinaryObject (BLOBs) ***
CREATE COLUMN TABLE BinaryObject (
id BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY,
modificationCounter INTEGER NOT NULL,
content BLOB,
filesize BIGINT NOT NULL,
mimeType VARCHAR(255),
CONSTRAIN... |
<gh_stars>100-1000
-- // CLOUD-73592 ability to specify more rdsconfig
-- Migration SQL that makes the change goes here.
CREATE TABLE cluster_rdsconfig (
clusters_id bigint NOT NULL,
rdsconfigs_id bigint NOT NULL
);
ALTER TABLE ONLY cluster_rdsconfig ADD CONSTRAINT cluster_rdsconfig_pkey PRIMARY KEY (clusters... |
# ************************************************************
# Sequel Pro SQL dump
# Version 3408
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: 127.0.0.1 (MySQL 5.5.21)
# Database: pixeltenchi
# Generation Time: 2013-01-03 20:32:19 +0000
# *********************************************... |
<reponame>PoignantWizard/UsefulSqlQueries<gh_stars>1-10
-- Convert latitude and longitude to spacial data
select convert(geography, 'Point('
+ convert(varchar(20), Longitude)
+ ' '
+ convert(varchar(20), Latitude)
+ ')'
) as SpacialData; |
<filename>assets/backup/dev_kios27_ci.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 03, 2015 at 12:18 PM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET ... |
<filename>src/main/resources/db/migration/V2019.11.20_203934__SoProject.sql
-- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
CREATE TABLE IF NOT EXISTS navbar_item (
name VARCHAR(20) PRIMARY KEY
); |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 09 Agu 2019 pada 13.35
-- Versi server: 10.3.16-MariaDB
-- Versi PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
INSERT INTO Books (title,titleLong,isbn,isbn13,deweyDecimal,publisherId,format,language,datePublished,edition,pages,dimensions,overview,image,msrp,excerpt,synopsys,notes)
VALUES("Test book","Test book: this book is a test","0123456789",NULL,NULL,1,NULL,"English",2020,"1st Edition",200,NULL,NULL,NULL,NULL,NULL,NULL,"thi... |
<filename>app/Database/database.sql<gh_stars>0
DROP DATABASE IF EXISTS jwt_auth;
CREATE DATABASE jwt_auth;
USE jwt_auth;
CREATE TABLE users (
id INT AUTO_INCREMENT,
email VARCHAR(255),
password VARCHAR(255),
PRIMARY KEY (id)
);
INSERT INTO users (email, password)
VALUES (
'<EMAIL>',
<PAS... |
-- Returns:
-- - linear_feature_id - primary key of the matched stream
-- - gnis_name - name of the nearest stream
-- - wscode_ltree - FWA Watershed Code of the nearest stream (as ltree)
-- - localcode_ltree - Local Watershed Code of the nearest stream (as ltree)
-- - blue_lin... |
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_tok... |
DROP DATABASE IF EXISTS zeroexploit;
CREATE DATABASE `zeroexploit` DEFAULT CHARACTER SET utf8 collate utf8_general_ci;
USE zeroexploit;
# type=1 返回是text/html的基准请求
# type=2 是ajax请求
# type=3 其他请求
# checked=0 是未处理
# checked=1 按参数分解处理
CREATE TABLE `http` (
`id` int NOT NULL AUTO_INCREMENT,
`gid` int(11) NOT NULL,
`... |
-- Azure Search cannot read the view's schema, so copy it to static table
SELECT *
INTO [SalesLT].[ProductsForSearch]
FROM [SalesLT].[vProductsForSearch] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.