sql stringlengths 6 1.05M |
|---|
<filename>db/migrations/20160721180940_create_users.sql<gh_stars>10-100
-- +micrate Up
BEGIN;
CREATE TABLE users(
id INTEGER NOT NULL,
uuid character varying NOT NULL,
email character varying NOT NULL,
name character varying NOT NULL,
encrypted_password VARCHAR NOT NULL,
created_at timestamp without time z... |
<reponame>dram/metasfresh
-- 2018-05-25T13:15:33.036
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Index_Table (AD_Client_ID,AD_Index_Table_ID,AD_Org_ID,AD_Table_ID,BeforeChangeCodeType,Created,CreatedBy,EntityType,ErrorMsg,IsActive,IsUnique,Name,Processing,Updated,UpdatedBy) VALUES (... |
create function cpic.pharmgkb_guideline_alleles(pharmgkbdrugid text)
returns table(genesymbol text, chr text, alleles text[]) as
$$
select
a.genesymbol,
g.chr,
array_agg(distinct a.name order by a.name) as alleles
from allele a join gene g on a.genesymbol=g.symbol
where
a.clinicalfunctionalstatus is... |
<gh_stars>1-10
DELETE FROM `spell_proc_event` WHERE `entry` = 45059;
INSERT INTO `spell_proc_event` VALUES
(45059,0,0,0,0,0x0000000000000000,0x08000000,0);
|
/*
Navicat Premium Data Transfer
Source Server : local
Source Server Type : MySQL
Source Server Version : 80012
Source Host : localhost:3306
Source Schema : vfs_bms
Target Server Type : MySQL
Target Server Version : 80012
File Encoding : 65001
Date: 11/11/2019 17:45:... |
<reponame>juned3you/lily-backend
ALTER TABLE users add company text null;
ALTER TABLE users add department text null;
ALTER TABLE fitbituser add corporate_admin boolean null; |
<reponame>irynahan/SQL
CREATE TABLE positions(
position_id int PRIMARY KEY,
name varchar(100) CHARACTER SET utf8);
INSERT INTO positions values (1,"Developer");
INSERT INTO positions values (2,"Senior developer");
INSERT INTO positions values (3,"Senior QA engineer");
INSERT INTO positions values (4,"Team Lead");
CRE... |
<reponame>sumesh-aot/namex
-- noinspection SqlNoDataSourceInspectionForFile
DROP VIEW NAMEX.conflicts_with_no_nrs_vw;
CREATE OR REPLACE FORCE VIEW NAMEX.conflicts_with_no_nrs_vw(id, name, corp_name_type_cd, state_type_cd, source, start_date, jurisdiction)
AS
SELECT c.corp_num AS id, corp.corp_nme AS name, ... |
<gh_stars>1-10
-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-10-04 09:46:58
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Drop foreign keys ***********************... |
<reponame>solita/kuntalaisaloite<filename>municipalityinitiative-web/src/main/resources/db/migration/V13__migrate_old_participants.sql
-- Add new "name" field for verified_participant (we want the participants name to be what it was when he/she participated)
ALTER TABLE verified_participant
ADD COLUMN name VARCHAR(10... |
alter table "hibernate_sequences" alter column "sequence_next_hi_value" type BIGINT;
|
# --- !Ups
-- Add task_styles to challenges.
SELECT add_drop_column('challenges', 'task_styles', 'VARCHAR DEFAULT NULL');;
-- add task_id index for status_actions, as it causes deletes to run slower.
SELECT create_index_if_not_exists('status_actions', 'task_id', '(task_id)');;
-- Add bundle_id index for when we are upd... |
<filename>src/postgres/src/test/regress/sql/yb_index_scan.sql
-- Test primary key ordering
CREATE TABLE pk_asc(k int, v int, PRIMARY KEY(k ASC));
INSERT INTO pk_asc VALUES (20, 2),(30, 3),(10, 1);
SELECT * FROM pk_asc;
EXPLAIN (COSTS OFF) SELECT * FROM pk_asc ORDER BY k;
SELECT * FROM pk_asc ORDER BY k;
EXPLAIN (COSTS ... |
<reponame>jrouhaud/postgres
--
-- CREATE SEQUENCE
--
-- various error cases
CREATE SEQUENCE sequence_testx INCREMENT BY 0;
CREATE SEQUENCE sequence_testx INCREMENT BY -1 MINVALUE 20;
CREATE SEQUENCE sequence_testx INCREMENT BY 1 MAXVALUE -20;
CREATE SEQUENCE sequence_testx INCREMENT BY -1 START 10;
CREATE SEQUENCE seq... |
echo '\x \\ SELECT * FROM foo;' | psql
|
create class test_class (date_col date, time_col time, timestamp_col timestamp, datetime_col datetime);
insert into test_class(datetime_col) values (DATETIME '1-1-1 00:00:00.000');
insert into test_class(datetime_col) values (DATETIME '0001-01-01 00:00:00.000');
insert into test_class(datetime_col) values (DATETIME '1... |
CREATE TABLE District (
id INTEGER PRIMARY KEY,
name VARCHAR(255) NOT NULL
);
CREATE TABLE Municipality (
id INTEGER PRIMARY KEY,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
district INTEGER,
FOREIGN KEY (district) REFERENCES District(... |
CREATE TABLE [dbo].[ItemTypeQuestionSets] (
[id] INT IDENTITY (1, 1) NOT NULL,
[ItemTypeId] INT NOT NULL,
[QuestionSetId] INT NOT NULL,
[TransactionLevel] BIT CONSTRAINT [DF_ItemTypeQuestionSets_TransactionLevel] DEFAULT ((0)) NOT NULL,
[QuantityLevel] BIT CONSTRAINT ... |
CREATE TABLE arith_history (
date DATE NOT NULL,
answer INT NOT NULL,
operation VARCHAR(255) NOT NULL
) |
<reponame>CosmoDict/CosmoDict
INSERT INTO `TOKEN`
(`token_id`,`value`)
VALUES
(?,?)
|
create table user (
id bigint(20) not null auto_increment primary key,
name varchar(255) not null,
password varchar(255) not null
); |
-- +micrate Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE feeds (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
url TEXT NOT NULL UNIQUE,
link TEXT NOT NULL,
description TEXT,
date TEXT,
feed_type INTEGER NOT NULL,
created_at TEXT,
updated_at TEXT
);
CREATE INDEX feeds_link ON... |
/*
Navicat MySQL Data Transfer
Source Server : dhamar-172.16.58.3
Source Server Version : 50546
Source Host : 172.16.58.3:3306
Source Database : gotogether
Target Server Type : MYSQL
Target Server Version : 50546
File Encoding : 65001
Date: 2016-02-14 21:08:34
*/
SET FOREIGN_KEY_C... |
DROP TABLE IF EXISTS "category" CASCADE;
CREATE SEQUENCE "category_seq" RESTART;
CREATE TABLE "category"
(
"ID" int NOT NULL DEFAULT nextval('category_seq'),
"Name" varchar(255) NOT NULL,
"Content" text NULL,
"Url" varchar(255) NOT NULL,
"Order" int NOT NULL DEFAULT currval('category_seq'),
"Parent" int NULL,
... |
<filename>INSERT.sql
-- Insert Operations
INSERT INTO language
VALUES -- language codes according to ISO 639-2/T
('eng', 'English'),
('zho', '\u20013\u25991'),
('ita', 'Italiano');
INSERT INTO game
VALUES (
'Half-life: Alyx',
'Half-Life: Alyx is Valve''s VR return to the Half-Life series. ... |
<reponame>amartyniuk2/chicshock<filename>prisma/migrations/20211016181541_reinstate_notifications/migration.sql
/*
Warnings:
- You are about to drop the column `notificationSettings` on the `User` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "User" DROP COLUMN "notificationSettings... |
<filename>DotNetNote/DotNetNote.SqlServer/dbo/Tables/DotNetNote/NoteComments.sql
--[2] 댓글 테이블 생성
Create Table dbo.NoteComments
(
Id Int Identity(1, 1)
Not Null Primary Key, -- 일련번호
BoardName NVarChar(50) Null, -- 게시판이름(확장): Notice
BoardId Int N... |
<filename>docker/postgres/init_schema.sql
CREATE USER grafana WITH PASSWORD '<PASSWORD>';
CREATE DATABASE grafana;
ALTER DATABASE grafana OWNER TO grafana;
GRANT ALL PRIVILEGES ON DATABASE grafana TO grafana;
\c grafana
DROP TABLE IF EXISTS test_grafana;
CREATE TABLE IF NOT EXISTS test_grafana(event_time TIMESTAMP, s... |
-- file:polymorphism.sql ln:790 expect:true
select dfunc(a =>+1)
|
DROP DATABASE IF EXISTS employee_db;
CREATE database employee_db;
USE employee_db;
CREATE TABLE department (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE role (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(30) NOT NULL,
salary INT,
department_id INT... |
ALTER TABLE ixsi.booking_create
ADD CONSTRAINT "UQ_booking_create_pid_bid" UNIQUE (provider_id, booking_id);
ALTER TABLE ixsi.booking_target_status_inavailability
ADD COLUMN booking_id character varying;
ALTER TABLE ixsi.booking_target_status_inavailability
ADD CONSTRAINT "FK_booking_target_status_inavailabilit... |
<reponame>SalmonKing72/del
-- Each questionnaire is a an assessment and version.
-- If there are 2 version of an assessment, it would be represented by 2 rows in this query.
select
concat(asmt_shrt_name, '-', asmt_vrsn_id) as asmtid,
asmt_vrsn_id as version,
case asmt_vrsn.asmt_stus_id
when 1 then 'active'
... |
<reponame>jherrerotardon/contextualization-tool
CREATE DATABASE ContextualizationTool;
CREATE TABLE Language (
ID varchar(10) NOT NULL,
Name varchar(50) NOT NULL,
TS TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (ID)
);
CREATE TABLE String (
ID varchar(100) NOT NULL,
Value varchar... |
-- Clear old instance group mappings
DELETE FROM main_organizationinstancegroupmembership;
DELETE FROM main_unifiedjobtemplateinstancegroupmembership;
DELETE FROM main_inventoryinstancegroupmembership;
-- Build new mappings based on instance group names
INSERT INTO main_organizationinstancegroupmembership (instancegro... |
<filename>app/db/sql/user/where.sql<gh_stars>1-10
SELECT * FROM users WHERE $1^ = $2 ORDER BY id;
|
<gh_stars>10-100
CREATE OR REPLACE FUNCTION core.tf_i_src_pipedrive_trg_mail_message_i()
RETURNS INTEGER AS $$
/*
===========================================================================================================
DESCRIPTION: Insert data from stage 'pipedrive_*' tables into core input table... |
<gh_stars>100-1000
create or replace package body ut_annotation_manager as
/*
utPLSQL - Version 3
Copyright 2016 - 2019 utPLSQL 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
... |
<filename>popx/stub/migrations/transactional/20200831110752000016_identity_verifiable_address_remove_code.sqlite3.down.sql
DROP INDEX IF EXISTS "identity_verifiable_addresses_status_via_idx" |
<gh_stars>1000+
ALTER TABLE provider ADD CONSTRAINT IF NOT EXISTS unique_name_per_cloud UNIQUE (customer_uuid, name, code);
|
INSERT INTO ame_transaction_split (ame_transaction_id,ame_transaction_split_id,ame_transaction_split_date,amount,status,cash_type,others)
VALUES ('[AME_TRANSACTION_ID]','[AME_TRANSACTION_SPLIT_ID]','[AME_TRANSACTION_SPLIT_DATE]',[AMOUNT],'[STATUS]','[CASH_TYPE]','[OTHERS]')
|
<gh_stars>100-1000
-- shows all listeners by server, name, environment and component
-- useful for seeing if they are all tied back to a component name
SELECT DISTINCT
s.server_name
, pc.name
, e.environment_name
, pc.component_id
FROM dbo.t_server s
INNER JOIN dbo.t_environment e
ON s.envir... |
<filename>API/src/main/resources/db/migration/V4__Add_Role_Uuid_Column_To_Users.sql<gh_stars>0
ALTER TABLE lepine.users
ADD COLUMN role_uuid uuid NOT NULL;
ALTER TABLE lepine.users
ADD CONSTRAINT fk_customer
FOREIGN KEY(role_uuid) REFERENCES lepine.roles(uuid); |
<reponame>Zhaojia2019/cubrid-testcases
--test insert(date) for many list partition(have NULL value) with null value.
create table list_test(id int,
test_time time,
test_date date,
test_timestamp timestamp... |
drop table "t01" ;
create table "t01" (
"name" text
,"capital" text
,"pop" text
,"area" text
);
insert into "t01" ( "name", "capital", "pop", "area" ) values
( 'Austria', 'Vienna', '83859', '8075' )
, ( 'Belgium', 'Brussels', '30518', '10192' )
, ( 'Denmark', 'Copenhagen', '43094', '5295' )
, ( 'Finland',... |
CREATE DATABASE IF NOT EXISTS empresa;
CREATE TABLE IF NOT EXISTS clientes(
idCliente int not null primary key auto_increment, /*chame primária, é alto incremente pelo MySQL*/
nomeCLiente varchar(100) not null, /*not null significa que é obrigatório*/
sexoCliente enum('m', 'f'),
u... |
DROP DATABASE IF EXISTS tech_blog;
CREATE DATABASE tech_blog;
USE tech_blog; |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 28 Feb 2021 pada 07.46
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
`b`.`beans_acreage`,
case
when `b`.`beans_mapped` = '1' then 'Yes'
when `b`.`beans_mapped` = '0' then 'No'
else 'null'
end
as `beans_mapped`,
case
when `b`.`beans_improved_seeds` = '1' then 'Yes'
when `b`.`beans_improved_seeds` = '0' then 'No'
else 'null'
end
as `beans_improved_seeds`,
`b`.`beans_improved_acreage... |
<reponame>ThibautMarechal/turborepo-remote-cache
-- CreateTable
CREATE TABLE "Event" (
"id" UUID NOT NULL,
"sessionId" TEXT NOT NULL,
"duration" INTEGER NOT NULL,
"eventType" TEXT NOT NULL,
"hash" TEXT NOT NULL,
"sourceType" TEXT NOT NULL,
"creationDate" TIMESTAMP(3) NOT NULL DEFAULT CURRENT... |
create procedure getEmailCount @mail varchar(50),
@EmailCOUNT int OUT
as
Select @EmailCOUNT = COUNT(*) from Klienci
where Email = @mail
go
create procedure getEmail @mail varchar(50)
as
select Email from Klienci where Email = @mail
go
create procedure addUser @imie varchar(30), @naz varchar(30),
@mail varchar(50),... |
show databases;
create database course;
use course;
show tables;
create table student(htno varchar(10),sname char(20),phno int, branch char(10),age real);
show tables;
insert into student values("197R123","ram",12345,"cse",21);
insert into student values("197R124","sita",234567,"AIML",24);
insert into student values("h... |
INSERT INTO `bus` (`bus_no`, `name`) VALUES
('B1', 'KSRTC'),
('B2', 'NASHA'),
('B3', 'KTP'),
('B4', 'KTC'),
('B5', 'ATP'),
('B6', 'SRTC');
INSERT INTO `stand` (`stand_code`, `name`) VALUES
('S1', 'Palakkad'),
('S2', 'Mannarkkad'),
('S3', 'Perinthalmanna'),
('S4', 'Malappuram'),
('S5', 'Kondotty'),
('S6', 'Kozhikkode')... |
<filename>prisma/migrations/20220217094133_application_status/migration.sql
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_ApplicationForm" (
"id" TEXT NOT NULL PRIMARY KEY,
"building" TEXT NOT NULL,
"roomType" TEXT NOT NULL,
"funding" TEXT NOT NULL DEFAULT 'nsfas',
"parentFullName" TE... |
<filename>src/DbEx/Resources/SqlServer/DeleteAllAndReset.sql
-- Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/DbEx
DECLARE t_cursor
CURSOR LOCAL READ_ONLY STATIC SCROLL FOR
SELECT t.TABLE_SCHEMA, t.TABLE_NAME FROM (
SELECT TABLE_SCHEMA, TABLE_NAME, (SELECT OBJECTPROPER... |
INSERT INTO Items (
Id
, Path
, Name
, Author
, Description
, IsFolder
, SortOrder
, PublishedOn
, CreatedOn
, UpdatedOn
) VALUES (
1
, '/talks/Exhortations'
, 'Exhortations'
, ''
, ''
, 1
, 1
, null
, UTC_TIMESTAMP()
, UTC_TIMESTAMP()
)
, ... |
<reponame>svetlimladenov/Databases-Basics---MS-SQL-Server<gh_stars>0
SELECT * FROM Departments
SELECT * FROM (SELECT ISNULL(CAST((DATEDIFF(DAY,OpenDate,CloseDate)) AS varchar),'no info') AS AvarageDuration FROM Reports
GROUP BY Id,CloseDate,OpenDate) |
<reponame>ph-gaia/sisgeneros-mb
-- 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------... |
<reponame>signner/vue-admin
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50553
Source Host : localhost:3306
Source Database : vue
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2019-05-24 22:48:51
*/... |
<filename>sqitch/verify/initial-ddl.sql<gh_stars>1-10
-- Verify prc:initial-ddl on sqlite
BEGIN;
SELECT
user_id,
create_time,
update_time,
last_login_time,
tos_agree_time,
tos_agreed_version,
scheduled_delete_time,
is_deactivated,
assignment_level,
assignee_level,
github_id,
github_login,
... |
<filename>agi_avdpool_ng_sogis/agi_dm01avso24_fixpunktekategorie1_lfp1nachfuehrung.sql
SELECT
lfp1nachfuehrung.t_id AS tid,
lfp1nachfuehrung.nbident,
lfp1nachfuehrung.identifikator,
lfp1nachfuehrung.beschreibung,
lfp1nachfuehrung.perimeter,
to_char(lfp1nachfuehrung.gueltigereintrag,'YYYYMMDD') A... |
SELECT * FROM employee WHERE name LIKE 'J%';
|
<reponame>bhupendpatil/Practice
--assume that you have a table employee with columns name, salary, id
set serveroutput on;
declare
a number;
begin
update employee
set salary = salary + 150;
if sql%notfound then
dbms_output.put_line('none selected');
elsif sql%found then
a := sql%rowcount;
dbms_... |
-- Verify ovid:data/dont-defund-the-police on sqlite
BEGIN;
-- XXX Add verifications here.
ROLLBACK;
|
CREATE TABLE monitoring_demo_db.customer
(
id INT(11) NOT NULL AUTO_INCREMENT,
address VARCHAR(255),
created_date DATETIME,
email VARCHAR(255),
last_modified_date DATETIME,
name VARCHAR(255),
PRIMARY KEY (id)
) ENGINE = INNODB; |
/*
This script was created by Visual Studio on 2/11/2014 at 9:02 AM.
Run this script on database FCQ-Brands.
This script performs its actions in the following order:
1. Disable foreign-key constraints.
2. Perform DELETE commands.
3. Perform UPDATE commands.
4. Perform INSERT commands.
5. Re-enable foreign-key constrai... |
<gh_stars>1-10
select * from DBA_PRIV_AUDIT_OPTS;
|
<reponame>aseigo/kandesk<filename>priv/repo/sql/sps_tasks.sql<gh_stars>100-1000
-- *****************************************************************************
-- Copyright (c) 2020-2020 <NAME>
-- -----------------------------------------------------------------------------
-- Function: public.sp_delete_board(bigint)... |
<filename>projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_UserRole.pkey.sql
ALTER TABLE [dbo].[UserRole]
ADD CONSTRAINT [PK_UserRole] PRIMARY KEY CLUSTERED ([UserId] ASC, [RoleId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTI... |
<gh_stars>1-10
-- ----------------------------------------------------------------------
-- table network_filter
-- ----------------------------------------------------------------------
CREATE TABLE network_filter
(
filter_id UUID NOT NULL,
filter_name VARCHAR(50) NOT NULL PRIMARY KEY,
version VARCHAR(40) NOT ... |
-------------------------------------------------------------------------------
-- audit extra
-------------------------------------------------------------------------------
CREATE TABLE AUDIT_EXTRA(
ID BIGINT AUTO_INCREMENT,
NAME VARCHAR(200),
VALUE VARCHAR(200),
AUDIT_BASE_ID BIGINT,
... |
<gh_stars>1-10
--3.Which industry(SOC_NAME) has the most number of Data Scientist positions?
select lower(soc_name),count(lower(soc_name)) as count from h1b_final where job_title like '%DATA SCIENTIST%' group by lower(soc_name) order by count desc limit 5;
|
DROP TABLE IF EXISTS inventory_holdings;
CREATE TABLE inventory_holdings AS
SELECT
id::varchar(36),
jsonb_extract_path_text(jsonb, '_version')::bigint AS _version,
jsonb_extract_path_text(jsonb, 'acquisitionMethod')::varchar(65535) AS acquisition_method,
jsonb_extract_path_text(jsonb, 'callNumber')::va... |
<reponame>fkleedorfer/webofneeds<filename>webofneeds/won-owner/src/main/resources/db/migration/V8_0__add_privateid.sql
BEGIN;
ALTER TABLE wonuser ADD COLUMN private_id VARCHAR(255);
COMMIT; |
<gh_stars>1-10
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--
-- CK_SYNC1 RENAME TABLE
--
--
-- HEAP TABLE
--
CREATE TABLE ck_sync1_heap_alter_table_rename1(
text_col text,
bigint_col bigint,
char_vary_col character varying(30),
numeric_col numeric,
int_col int4,
float_col float4,... |
-- Author: <NAME>
-- Sample Call: SELECT detect_multiple_points('centroids_nearest_nodes_on_way_region'::text);
-- 6.605650734901433 min for ca 27000 Loops
-- Changelog:
-- 10.07.17 Added CASCADE to all DROP TABLE statements
CREATE OR REPLACE FUNCTION detect_multiple_points(
points_nearest_nodes text
) RETURNS VOID... |
<filename>equipment-datastore-rdbms/src/test/resources/schema-hsqldb-test.sql<gh_stars>1-10
drop table equipment if exists;
create table equipment (
-- hsqldb
id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
customerId int,
profileId bigint,
locationId bigint,
equipmentType int not nu... |
/******************************************************************************
### LineLabel ###
This function tries to estimate whether a line geometry would be long enough to
have the given text placed along it at the specified scale.
It is useful in vector tile queries to filter short lines from zoom levels
where... |
<reponame>plunix/identityserverv2<gh_stars>100-1000
CREATE TABLE [CodeToken] (
[Id] [int] NOT NULL IDENTITY,
[Code] [nvarchar](4000),
[ClientId] [int] NOT NULL,
[UserName] [nvarchar](4000),
[Scope] [nvarchar](4000),
[Type] [int] NOT NULL,
[TimeStamp] [datetime] NOT NULL,
CONSTRAINT [PK_... |
--combination with join statements
drop table if exists p_disc_int1, p_disc_int2;
create table p_disc_int1(id1 int not null, col1 char(20));
insert into p_disc_int1 values(1, 'aaa'), (2, 'bbb'), (3, 'ccc'), (4, 'ddd'), (5, 'eee'), (6, 'fff');
insert into p_disc_int1 values(1, 'fff'), (2, 'eee'), (3, 'ddd'), (4, 'ccc'... |
<gh_stars>1-10
-- create serial,alter this serial with an error like 'Syntax: Specify alter serial option'
CREATE SERIAL ddl_0001;
ALTER SERIAL ddl_0001
START WITH 1
INCREMENT BY 1
MINVALUE 1
MAXVALUE 10000000000
NOCYCLE;
drop serial ddl_0001; |
INSERT INTO department (name)
VALUES
('Sales'),
('Finance'),
('Egineering'),
('Legal');
INSERT INTO employeeroles (title, salary, department_id)
VALUES
('Salesperson', 80000, 1),
('Accountant', 125000, 2),
('Account Manager', 160000, 2),
('Software Engineer', 120000, 3),
('Lead Engi... |
Declare
nOrgDeoOd number := 1 ;
nOrgDeoDo number := 99999 ;
datumPS Date;
ZaMag Number;
nKolicina Number;
cProizvod VarChar2( 7 );
cOldProizvod Varchar2(7);
cNazivProizvoda VarChar2( 30 );
dDatumPS Date := to_date( '01.01.2008','dd.mm.yyyy');
cJedMere VarChar2( ... |
<reponame>yani-valeva/Databases-Basics-MySQL
CREATE TABLE `teachers` (
`teacher_id` INT NOT NULL,
`name` VARCHAR(50),
`manager_id` INT,
CONSTRAINT `pk_teacher_id` PRIMARY KEY (`teacher_id`),
CONSTRAINT `fk_teachers_teachers` FOREIGN KEY (`manager_id`)
REFERENCES `teachers` (`teacher_id`)
);
... |
<filename>mimic-iv/concepts/postgres/custom/enzyme.sql
-- THIS SCRIPT IS AUTOMATICALLY GENERATED. DO NOT EDIT IT DIRECTLY.
DROP TABLE IF EXISTS enzyme; CREATE TABLE enzyme AS
-- begin query that extracts the data
SELECT
MAX(subject_id) AS subject_id
, MAX(hadm_id) AS hadm_id
, MAX(charttime) AS charttime
, l... |
<reponame>apridiponegoro98/core_web
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 10, 2018 at 09:32 PM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... |
<reponame>zhoukuo/pms
CREATE TABLE 'tbl_softdeliverys' (
'guid' VARCHAR(64) PRIMARY KEY,
'date' VARCHAR(64) NOT NULL,
'model' VARCHAR(64) NOT NULL,
'count' VARCHAR(64) NOT NULL,
'version' VARCHAR(64) NOT NULL,
'project_id' ... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 21-02-2020 a las 19:44:32
-- Versión del servidor: 5.6.21
-- Versión de PHP: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... |
<filename>pacotedownload/certos/cursos.sql
show databases;
create database cursos;
use cursos;
create table cursospremium (id_cpremium int(3) primary key auto_increment, nome
varchar (100), criador varchar(100), datausada varchar(100));
insert into cursospremium ( nome, criador, datausada) values ("Algoritmos", "Curs... |
<filename>atwork.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 09, 2017 at 05:48 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
CREATE TABLE WORD (
ID NUMBER(10),
TEXT VARCHAR(1024)
)
|
CREATE TABLE [dbo].[HubChanged]
(
[HubChangedPK] [int] NOT NULL IDENTITY(1, 1),
[ChangeDatetime] [datetime] NOT NULL,
[ChangeType] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[HubPK] [int] NOT NULL,
[Creator] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CreateDate] [datetime... |
<reponame>Hybeecodes/transfer_system<filename>transfer_system.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 02, 2019 at 09:38 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = ... |
-- create db tables from scratch.
--drop if exist
DROP SEQUENCE IF EXISTS users_seq CASCADE;
DROP TABLE IF EXISTS users;
--create seq:
CREATE SEQUENCE users_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
--create tables:
CREATE TABLE users (
id numeric NOT NULL DEFAULT nextva... |
CREATE TABLE [Invalid].[LearnerFAM] (
[LearnerFAM_Id] INT NOT NULL,
[Learner_Id] INT NULL,
[UKPRN] INT NOT NULL,
[LearnRefNumber] VARCHAR (100) NULL,
[LearnFAMType] VARCHAR (1000) NULL,
[LearnFAMCode] BIGINT NULL,
CONSTRAINT [PK_L... |
<reponame>lgcarrier/AFW
SET DEFINE OFF;
CREATE INDEX AFW_12_HISTR_ACCES_FK3 ON AFW_12_HISTR_ACCES
(REF_UTILS_POUR)
LOGGING
/
|
CREATE PROCEDURE usp_GetHoldersWithBalanceHigherThan (@Money DECIMAL(16, 2))
AS
SELECT ah.FirstName AS [First Name],
ah.LastName AS [Last Name]
FROM AccountHolders AS ah
JOIN Accounts AS acc
ON acc.AccountHolderId = ah.Id
GROUP BY ah.FirstName, ah.LastName
HAVING SUM(acc.Balance) > @Money |
<reponame>tushartushar/dbSmellsData
CREATE TABLE x(input, token, start, end, position)
SELECT id FROM moz_bookmarks WHERE id = :item_id AND type = :type
CREATE TABLE x(term, col, documents, occurrences, languageid HIDDEN)
SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = :1
SELECT folder_id FROM moz_bookmarks_roots
SEL... |
CREATE TABLE [user](
[Id] INTEGER PRIMARY KEY AUTOINCREMENT,
[CPR] TEXT NOT NULL,
[NemID] TEXT NOT NULL,
[Password] TEXT NOT NULL
);
CREATE TABLE [auth_log](
[Id] INTEGER PRIMARY KEY AUTOINCREMENT,
[UserId] INTEGER NOT NULL,
[Code] TEXT NOT NULL,
[Timestamp] DATETIME DEFAULT CURRENT_TIM... |
<filename>testing(1).sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 15, 2021 at 06:35 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
<filename>src/__tests__/migrations-to-load/1_load_first.sql<gh_stars>1-10
CREATE TABLE load_first (
id integer
);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.