sql stringlengths 6 1.05M |
|---|
select name, unit from parameters where id='%s'
select * from filters;
select unit from parameters where id='%s'
|
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 20, 2019 at 03:18 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 = "+00:00";
/*!40101 SET @OLD... |
ALTER TABLE "machines" DROP CONSTRAINT IF EXISTS "machines_fk0";
ALTER TABLE "collections" DROP CONSTRAINT IF EXISTS "collections_fk0";
ALTER TABLE "units" DROP CONSTRAINT IF EXISTS "units_fk0";
DROP TABLE IF EXISTS "machines";
DROP TABLE IF EXISTS "collections";
DROP TABLE IF EXISTS "collection to units";
DROP T... |
-- This file should undo anything in `up.sql`
DROP INDEX streamer_recent_chatting_keywords_streamer_id_idx;
DROP TABLE streamer_recent_chatting_keywords;
|
-- MySQL dump 10.16 Distrib 10.2.13-MariaDB, for osx10.13 (x86_64)
--
-- Host: localhost Database: joker
-- ------------------------------------------------------
-- Server version 10.2.13-MariaDB-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARAC... |
-- P31C. HOUSEHOLD TYPE BY RELATIONSHIP FOR THE POPULATION UNDER 18 YEARS (AMERICAN INDIAN AND ALASKA NATIVE ALONE)
-- designed to work with the IRE Census bulk data exports
-- see http://census.ire.org/data/bulkdata.html
CREATE TABLE ire_p31c (
geoid VARCHAR(11) NOT NULL,
sumlev VARCHAR(3) NOT NULL,
state VARCHAR... |
<filename>assets/1.sql
CREATE TABLE IF NOT EXISTS accounts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
email TEXT UNIQUE,
password BLOB NOT NULL,
form_data BLOB
);
CREATE INDEX IF NOT EXISTS email_idx ON accounts (email);
CREATE TABLE IF NOT EXISTS keys (
id INTEGER PRIMARY KEY AUTOINCREMENT,
key BLOB NOT NUL... |
<filename>configs/db/postgres/000002_scheduler_operations.up.sql
--DDL for scheduler operations:
CREATE TABLE IF NOT EXISTS scheduler_operations (
"scheduling_id" uuid NOT NULL,
"correlation_id" uuid NOT NULL,
"config_version" int NOT NULL,
"component" varchar(255) NOT NULL,
"state" varchar(255) NOT... |
<filename>5/check_validity_of_canceldate_change_5_2.sql
CREATE FUNCTION public.check_validity_of_canceldate_change_5_2()
RETURNS trigger
LANGUAGE 'plpgsql'
COST 100
VOLATILE NOT LEAKPROOF
AS $BODY$
BEGIN
IF (SELECT find_hotel_manager((SELECT find_hotel_ofbooking(OLD."idhotelbooking"))) = (SELECT find_b... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 15-Jan-2018 às 12:15
-- Versão do servidor: 10.1.28-MariaDB
-- PHP Version: 7.1.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
INSERT INTO t_s_territory VALUES ('110000', '', '1', '北京', null, '2', '0', '0', '1');
INSERT INTO t_s_territory VALUES ('110100', '', '2', '北京市', null, '0', '0', '0', '110000');
INSERT INTO t_s_territory VALUES ('110101', '', '0', '东城区', null, '', '0', '0', '110100');
INSERT INTO t_s_territory VALUES ('110102', '', '0'... |
-- Revert ggircs-portal:types/application_revision_fuel_carbon_tax from pg
begin;
drop type ggircs_portal.application_revision_fuel_carbon_tax;
commit;
|
DROP TABLE IF EXISTS test.primary_key;
CREATE TABLE test.primary_key (d Date DEFAULT today(), x Int8) ENGINE = ReplicatedMergeTree('/clickhouse/tables/test/primary_key', 'r1', d, -x, 1);
INSERT INTO test.primary_key (x) VALUES (1), (2), (3);
INSERT INTO test.primary_key (x) VALUES (1), (3), (2);
INSERT INTO test.prima... |
CREATE STREAM R(A int, B int)
FROM FILE 'examples/data/simple/r.dat' LINE DELIMITED
CSV ();
CREATE STREAM S(B int, C int)
FROM FILE 'examples/data/simple/s.dat' LINE DELIMITED
CSV ();
SELECT * FROM R NATURAL JOIN S WHERE R.A < S.C
|
DB.DBA.VHOST_REMOVE (
lhost=>'*ini*',
vhost=>'*ini*',
lpath=>'/work'
);
DB.DBA.VHOST_DEFINE (
lhost=>'*ini*',
vhost=>'*ini*',
lpath=>'/work',
ppath=>'/DAV/',
is_dav=>1,
is_brws=>0,
def_page=>'',
vsp_user=>'dba',
ses_vars=>0,
opts=>vector ('browse_sheet', '', 'cors', '*', 'cors_restricted', 0, 'url_rewrite', 'http_rule... |
DROP TABLE IF EXISTS auth.account_roles;
|
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Waktu pembuatan: 22 Bulan Mei 2021 pada 02.37
-- Versi server: 5.7.24
-- Versi PHP: 7.3.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... |
/*
IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID(N'[eventLogs].[DatabaseErrorLog]') AND type in (N'U'))
DROP TABLE [eventLogs].[DatabaseErrorLog]
GO
*/
CREATE TABLE [eventLogs].[DatabaseErrorLog]
(
[ErrorLogId] INT NOT NULL IDENTITY(1,1)
,[RowStatus] TINYINT NULL
,[CreatedBy... |
CREATE TABLE benchmark_index_member (
index_id BIGINT NOT NULL,
ticker VARCHAR(50) NOT NULL,
exchange_code VARCHAR(50) NOT NULL,
date DATE NOT NULL,
last_update_date DATE NOT NULL /*,
PRIMARY KEY(ticker, exchange_code)*/
); |
<reponame>DFTF-PConsole/BD-PLs-PostgreSQL-LEI-2021<filename>PL5/4.sql
-- Encontre os empregados que ganham o maior salário em cada departamento. (dica: IN).
SELECT e1.nome, e1.sal, e1.ndep
FROM emp e1
WHERE (e1.ndep, e1.sal) IN (SELECT e2.ndep, MAX(e2.sal)
FROM emp e2
GROUP BY e2.ndep)
; |
USE `ims`;
INSERT INTO `ims`.`customers` (`first_name`, `surname`) VALUES
('Jordan', 'Harrison'),
('Asher', 'Newbigging'),
('Jane', 'Smith');
INSERT INTO `ims`.`items` (`name`, `price`) VALUES
("Bodyboard", 19.99),
("Surfboard", 24.99),
("Skateboard", 16.99);
INSERT INTO `ims`.`orders` (`customer_i... |
<reponame>GerMarS/gmk-user-role-test<filename>estructura_base_de_datos.sql<gh_stars>0
--Create users table
CREATE TABLE IF NOT EXISTS users (
user_id int(8) NOT NULL AUTO_INCREMENT,
name varchar(40) NOT NULL,
email varchar(60) NOT NULL,
phone int(16),
age int(3),
PRIMARY KEY (user_id)
);
--Create roles table
C... |
<filename>Daves.DeepDateUpdater.IntegrationTests.Database/Tables/Nations.sql
CREATE TABLE [dbo].[Nations] (
[ID] INT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (50) NOT NULL,
[FoundedDate] DATE NOT NULL,
CONSTRAINT [PK_Nations] PRIMARY KEY CLUSTERED ([ID] ASC)
);
|
insert into p_schedule (id, position, schedule_type_id, value) values
(1, 1, 1, 0)
, (1, 1, 1, 15)
, (1, 1, 1, 45)
;
insert into p_schedule (id, position, schedule_type_id, value) values
(1, 1, 2, 0)
, (1, 1, 2, 1)
, (1, 1, 2, 2)
, (1, 1, 2, 18)
;
insert into p_schedule (id, position, schedule_typ... |
CREATE TABLE irCMS_modules_irUserBuddy_relation (
relationId serial,
userId integer NOT NULL,
buddyId integer NOT NULL,
addDate timestamp with time zone DEFAULT now(),
confirmedDate timestamp with time zone,
CONSTRAINT "P... |
SELECT distinct artist_id, artist_name, artist_location, artist_latitude, artist_longitude
FROM staging_songs |
<reponame>HackGT/piranha
/*
Warnings:
- You are about to alter the column `unitCost` on the `LineItem` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `DoublePrecision`.
- You are about to alter the column `cost` on the `OperatingLineItem` table. The da... |
DROP DATABASE IF EXISTS or_dev;
CREATE DATABASE or_dev;
USE or_dev;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for sys_permission
-- ----------------------------
DROP TABLE IF EXISTS `sys_permission`;
CREATE TABLE `sys_permission`
(
`id` bigint(2... |
-- Подробная информация здесь:
-- https://sqlundercover.com/2019/02/19/7-more-ways-to-query-always-on-availability-groups/
SELECT DISTINCT
Groups.name AS AGname,
Replicas.replica_server_name,
States.role_desc,
States.synchronization_health_desc,
ISNULL(ReplicaStates.suspend_reason_desc,'N/A') AS su... |
IF (OBJECT_ID(N'[dbo].[tbl_Sensor_DNS_Catalog]', 'U') IS NULL)
BEGIN
CREATE TABLE [dbo].[tbl_Sensor_DNS_Catalog]
(
[nvc_dns] [nvarchar](100) NOT NULL
,[nvc_configuration] [nvarchar](4000) NOT NULL
)
END
|
\echo 'Main Rivers - MakeValid'
CREATE TABLE fmp.main_rivers_10k_valid TABLESPACE fmp_tables AS WITH
make_valid (status,length_km,wkb_geometry) AS
(SELECT status,length_km,
(ST_Dump(ST_MakeValid(wkb_geometry))).geom AS wkb_geometry FROM fmp.main_rivers_10k
)
SELECT * FROM make_valid WHERE ST_GeometryType(wkb_geom... |
<filename>inst/sql/sql_server/analyses/108.sql
-- 108 Number of persons by length of observation period, in 30d increments
--HINT DISTRIBUTE_ON_KEY(stratum_1)
select 108 as analysis_id, CAST(floor(DATEDIFF(dd, op1.observation_period_start_date, op1.observation_period_end_date)/30) AS VARCHAR(255)) as stratum_1,
cast... |
<filename>MsSQL/RenamePrimaryRowGuidCol.sql
-- this script renames a column in a table.
-- the column has ROWGUIDCOL property so can not be renamed with the table designer.
-- works on primary keys.
-- resources:
-- https://code.google.com/p/migratordotnet/issues/detail?id=43
-- http://stackoverflow.com/questions/1629... |
Alter Session Set "_ORACLE_SCRIPT"=True;
--create user
--truong du an
Create User NV001 Identified By 111;
Create User Nv002 Identified By 111;
Create User Nv003 Identified By 111;
Create User Nv004 Identified By 111;
Create User Nv005 Identified By 111;
--truong phong
Create User Nv006 Identified By 111;
Create Us... |
<reponame>stanislawbartkowski/ParquetJDBC
CREATE TABLE TESTPAR (C1 INT, C2 VARCHAR(100)); |
<reponame>suryatmodulus/tidb
create table s1 (x real primary key); |
<reponame>thedarknet/daemon4<filename>daemon/db/dbusers.sql
create user darknet_user with nocreatedb nocreaterole nocreateuser LOGIN password '<PASSWORD>';
grant connect on database daemon to darknet_user;
grant connect on database daemon to daemon_admin;
grant create on database daemon to daemon_admin;
select * from ... |
SELECT * FROM cdm_v1.header_1971_land_2 WHERE report_id LIKE 'AG000060390-6-1971-%';
|
--Create trigger with insert tigger event type
CREATE CLASS ddl_0001( n int );
CREATE CLASS ddl_0002( n int );
CREATE TRIGGER DCL1
BEFORE INSERT ON ddl_0001
EXECUTE INSERT INTO ddl_0002 values( 1 );
INSERT INTO ddl_0001 VALUES ( 1 );
SELECT * FROM ddl_0002;
DROP TRIGGER DCL1;
DROP CLASS ddl_0001;
DROP CLASS ddl_0... |
<reponame>opengauss-mirror/openGauss-graph
create schema nodegroup_setop_test;
set current_schema = nodegroup_setop_test;
set enable_nodegroup_explain=true;
set expected_computing_nodegroup='group1';
create node group ng0 with (datanode1, datanode2, datanode3);
create node group ng1 with (datanode4, datanode5, datano... |
<filename>exercise01/ex1part1.sql
-- Exercise 1 - Part 1
SELECT product_name FROM products;
SELECT COUNT(*) AS number_of_products FROM products;
SELECT * from products ORDER by list_price; |
USE [TelerikAcademy]
/*Task 01 Write a SQL query to find the names and salaries of the employees that take the minimal salary in the company.
Use a nested SELECT statement.*/
SELECT FirstName + ' ' + LastName AS [Name], Salary
FROM Employees
WHERE Salary =
(SELECT MIN(Salary) FROM Employees)
/*Task 02 Write a SQ... |
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.6.33)
# Database: hwdb
# Generation Time: 2017-12-06 03:18:10 +0000
# **************************************************... |
<filename>Baselining/What Was Running - BlockingTree (At Moment) - BareBone.sql
SET NOCOUNT ON
GO
DECLARE @p_collection_time datetime2
SET @p_collection_time = '2019-05-12 11:30:03.180';
;WITH T_BLOCKERS AS
(
-- Find block Leaders
SELECT [collection_time], [TimeInMinutes], [session_id],
[sql_text] = REPLACE(RE... |
<filename>sql/schema.sql
CREATE TABLE reading (
datetime text,
temperature real,
humidity real
);
|
-- 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... |
-- Use this script to create the database that will be used in this example.
CREATE KEYSPACE IF NOT EXISTS my_keyspace
WITH REPLICATION = {
'class' : 'SimpleStrategy',
'replication_factor' : 1
};
CREATE TABLE IF NOT EXISTS my_keyspace.table_one (
"id" uuid,
"first_name" text,
"last_name" tex... |
ALTER TABLE KEPZETTSEG ADD ERVENYESSEG_VEGE DATE
/
UPDATE KEPZETTSEG SET ERVENYESSEG_VEGE = STR_TO_DATE(CONCAT_WS(',', ERVENYESSEG_VEGE_NAP, ERVENYESSEG_VEGE_HO, ERVENYESSEG_VEGE_EV), '%e,%m,%Y') WHERE ERVENYESSEG_VEGE_NAP != -1
/
ALTER TABLE KEPZETTSEG DROP COLUMN ERVENYESSEG_VEGE_NAP
/
ALTER TABLE KEPZETTSEG DROP ... |
<reponame>NYCPlanning/civic-data-loader
-- create table to load csv from the nyc open data portal
DROP TABLE IF EXISTS dsny_facilities_specialdropoff;
CREATE TABLE dsny_facilities_specialdropoff (
Borough text,
DropOff_Site_Location text,
X_Coordinate double precision,
Y_Coordinate double precision
) |
<gh_stars>1-10
SELECT
DepositGroup,
MAX(MagicWandSize) AS [LongestMagicWand]
FROM WizzardDeposits
GROUP BY DepositGroup |
INSERT INTO tweb_apbd(`rangkuman`,`berkas_id`,`lembaga_id`, `lembaga_kode`,`pemda_kode`, `wilayah_kode`,`tahun`, `rekening_kode`,`rekening`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `updated_by`) VALUES
('0','378','178','1.03.02.00','1... |
<reponame>Shuttl-Tech/antlr_psql
-- file:horology.sql ln:402 expect:true
SELECT to_timestamp('15 "text between quote marks" 98 54 45',
E'HH24 "\\text between quote marks\\"" YY MI SS')
|
<filename>samples/databases/wide-world-importers/wwi-ssdt/wwi-ssdt/WebApi/Stored Procedures/InsertPaymentMethodsFromJson.sql
CREATE PROCEDURE [WebApi].[InsertPaymentMethodsFromJson](@PaymentMethods NVARCHAR(MAX), @UserID int)
WITH EXECUTE AS OWNER
AS BEGIN
INSERT INTO Application.PaymentMethods(PaymentMethodName,Last... |
<reponame>kyle125t/sql-challenge
-- Table drops
DROP TABLE IF EXISTS departments;
DROP TABLE IF EXISTS dept_emp;
DROP TABLE IF EXISTS dept_manager;
DROP TABLE IF EXISTS employees;
DROP TABLE IF EXISTS salaries;
DROP TABLE IF EXISTS titles;
-- Departments table
CREATE TABLE departments (
dept_no VARCHAR PRIMARY KEY NO... |
<gh_stars>0
DROP PROCEDURE sp_cond_qua_add;
DELIMITER //
CREATE PROCEDURE sp_cond_qua_add(
v_id_condicao INT,
v_Id_quarto INT,
v_id_perfil INT
)
BEGIN
DECLARE v_id_cond_qua INT;
DECLARE v_estado VARCHAR(15) DEFAULT 'Ativo';
SELECT COUNT(id_cond_qua) + 1 FROM tb_cond_qua INTO v_id_con... |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 17-Nov-2018 às 01:05
-- Versão do servidor: 5.7.21
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
<filename>oml.sql
# INSERT
INSERT INTO profile (profileId, profileActivationToken, profileAtHandle, profileEmail, profileHash) VALUES ('6a0d15248f72427183ef506c599f4c4e', 'nananananananananananananananana', 'myAtHandle', '<EMAIL>','*367');
INSERT INTO profile(profileId, profileActivationToken, profileAtHandle, profile... |
CREATE PROCEDURE dbo.spGetDataSourceList
@Type Varchar(10),
@ScheduleType Varchar(10) = 'Daily'
AS
BEGIN
/**********************************************************************************
THE BELOW LOGIC OF QUERY IS WRITTEN BASED ON CURRENT PROJECT REQUIRMENT,
PARAMETER TYPES AND NUMBERS. THE ... |
<gh_stars>1-10
delete from
public.bedes_term_sector_link
where
id = ${_id}
;
|
GO
-- #1 drop constraints
if exists(select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where CONSTRAINT_NAME = 'fk_vehicles_customer_id')
alter table vehicles drop constraint fk_vehicles_customer_id
--#2 drop table
--drop table/ // to insert or
drop table if exists customers
drop table if exists vehicles
-- #3 cr... |
<filename>cool_chat.sql
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 22, 2021 at 10:15 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... |
ALTER TABLE songs
ADD CONSTRAINT songs_filename_unique UNIQUE (base_path, relative_path);
|
CREATE VIEW [dbo].[vRandomCustomer]
AS
select TOP 1 Cus_Id from Customer WITH (NOLOCK)
ORDER BY NEWID() |
<gh_stars>0
CREATE VIEW TSBCreditTransactionView
AS
SELECT TSBCreditTransaction.*
, TSB.TSBNameEN, TSB.TSBNameTH
, TSB.MaxCredit
, TSB.LowLimitST25, TSB.LowLimitST50
, TSB.LowLimitBHT1, TSB.LowLimitBHT2, TSB.LowLimitBHT5
, TSB.LowLimitBHT10, TSB.LowLimitBHT20, TSB.LowLimitBHT50
, TSB.LowLimitBHT1... |
CREATE TABLE products (
id SERIAL PRIMARY KEY,
name VARCHAR(64) NOT NULL,
price numeric NOT NULL,
description VARCHAR(255),
url VARCHAR(255),
category_id bigint REFERENCES product_categories(id));
|
<gh_stars>0
SELECT S.USERNAME,
s.sid,
s.serial#,
t.used_ublk,
t.used_urec,
rs.segment_name,
r.rssize,
R.STATUS
FROM v$transaction t,
v$session s,
v$rollstat r,
dba_rollback_segs rs
WHERE S.SADDR ... |
prompt .. Creating table QUILT_RUN
@@quilt_run.tab
prompt .. Creating table QUILT_REPORTED_OBJECT
@@quilt_reported_object.tab
prompt .. Creating table QUILT_LOG
@@quilt_log.tab
prompt .. Creating table QUILT_REPORT_LINE
@@quilt_report_line.tab
prompt .. Creating table QUILT_REPORTED_OBJECT_SOURCE
@@quilt_reported_o... |
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.16-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... |
delete from civicrm_cache
-- From advanced export page
SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`,
contact_a.contact_sub_type as `contact_sub_type`,
contact_a.sort_name as `sort_name`,
contact_a.display_name as `display_name`,
contact_a.do_not_email as `do_not_email`,... |
<reponame>PacktPublishing/learn-sql-database-programming
CREATE DATABASE IF NOT EXISTS `lahmansbaseballdb` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `lahmansbaseballdb`;
-- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64)
--
-- Host: localhost ... |
--------------------------------------------------------
-- DDL for Table USERS
--------------------------------------------------------
CREATE TABLE USERS
(
USR_ID NUMBER(10) CONSTRAINT PK_USERS PRIMARY KEY,
USR_EMAIL NVARCHAR2(60) CONSTRAINT NN_UN_USR_EMAIL NOT NULL UNI... |
<gh_stars>1-10
insert into state(id, name)
values(UUID_TO_BIN('a56f8933-1ffc-4ad1-a42a-f0aa0c4a865e'), 'Quintana Roo');
|
CREATE TABLE mileage (
length_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
miles VARCHAR(30) NOT NULL,
kilometers VARCHAR(50) ,
date_modified TIMESTAMP
)
CREATE TABLE mileage (
id INT NOT NULL,
miles VARCHAR(50) NOT NU... |
DECLARE @jobId UNIQUEIDENTIFIER = ??jobId??;
SELECT id = CAST(id AS VARCHAR(10)),
name = name,
isSelected = CAST(IIF(job_id = @jobId, 1, 0) AS BIT),
isEnabled = CAST(CASE
WHEN job_id = @jobId THEN 1
WHEN job_id = '00000000-00... |
<filename>src/main/resources/dbmigrate/hsql/disk/V1_10_0_4__disk_share.sql
ALTER TABLE DISK_SHARE ADD COLUMN CATALOG VARCHAR(50);
COMMENT ON COLUMN DISK_SHARE.CATALOG IS '类型';
|
<gh_stars>100-1000
SELECT COUNT(*) FROM LDAP_CONFIGS
WHERE DELETE_FLAG = 0;
|
-- This file and its contents are licensed under the Timescale License.
-- Please see the included NOTICE for copyright information and
-- LICENSE-TIMESCALE for a copy of the license.
-- test LATERAL with ordered append in the outer query
:PREFIX
SELECT time,
pg_typeof(l)
FROM :TEST_TABLE,
LATERAL (
SELECT *
... |
INSERT INTO document_template
(document_template_code, form_spec_json, template_file_path, active_ind, create_user, update_user)
VALUES
('NPR', '' , 'templates/now/No Permit Required Letter.docx', true, 'system-mds', 'system-mds'),
('NPI', '' , 'templates/now/No Permit Required IP Letter.docx', true, 'system-mds', ... |
CREATE TABLE IF NOT EXISTS `project_version_control` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键', `version` varchar(63) DEFAULT NULL COMMENT '版本号', `component_name` varchar(255) DEFAULT NULL COMMENT 'sql名', `component_version_hash` varchar(255) DEFAULT NULL COMMENT 'sql哈希值', `additional` text COMMENT '额外注释', ... |
<filename>ddl/crs.ddl
CREATE TABLE __INSERT_SCHEMA__.crs (
crs INT,
description VARCHAR,
PRIMARY KEY(crs)
);
|
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 10, 2014 at 09:43 AM
-- Server version: 5.1.66
-- PHP Version: 5.3.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `LSF`
--
-- --------------------------------------... |
<reponame>hotstone-seo/hotstone-server
CREATE TABLE tags (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
rule_id INTEGER NOT NULL,
locale VARCHAR (255) NOT NULL,
`type` VARCHAR (255) NOT NULL,
attributes JSON NOT NULL DEFAULT '{}'::JSONB,
`value` VARCHAR (255) NO... |
<reponame>Xiaoyu-Xing/Toy-Projects
create table customers(
id INT auto_increment primary key,
first_name VARCHAR(100),
last_name vARCHAR(100),
email varchar(100)
);
create table orders(
id INT auto_increment primary key,
order_date DATE,
amount decimal(8, 2),
customer_id INT,
forei... |
insert into [chat]
(chatname,chatCreatorUserId)
values ('Indtast chat navn',1) -- change 1 to user id |
<reponame>sazzad7299/laravel-eCommerce
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Nov 04, 2021 at 05:01 AM
-- Server version: 5.7.26
-- PHP Version: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_z... |
load data local infile 'Hosts.csv' into table Hosts
fields terminated by ','
enclosed by '"'
lines terminated by '\n'
(serial_no, station_ID);
select * from Hosts;
|
create table Logs
(
Id int identity(1,1) not null primary key,
UserId int not null,
EventName varchar(50) not null,
EventDate varchar(50) not null
) |
INSERT INTO department (dep_id, dep_name)
VALUES (1, "Sales"), (2, "Engineering"), (3, "Legal"), (4, "Finance");
INSERT INTO roles (id, title, salary, department_id)
VALUES (001, "Sales Lead", 80000, 1), (002, "Salesperson", 50000, 1), (003, "Lead Engineer", 120000, 2),
(004, "Software Engineer", 95000, 2), (005, "L... |
<filename>src/main/resources/db/migration/V2__add_name_to_member.sql<gh_stars>0
alter table member
add name varchar(255) null;
|
CREATE DATABASE IF NOT EXISTS `smart_school` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `smart_school`;
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: localhost Database: smart_school
-- ------------------------------------------------------
-- Server version 5.7.20
/*!40101 SET @OLD_CHA... |
<reponame>drexler/opentelemetry-demo-metrics<filename>databases/employee/data.sql<gh_stars>1-10
drop table if exists employee;
create extension if not exists "uuid-ossp";
create table employee (
id uuid primary key default uuid_generate_v4 (),
name varchar(100),
address varchar(100),
ssn varchar(11),
... |
alter table md_item add ContainerDesc varchar(50) null
go
insert into ACC_Permission values('Url_Production_ForceResume','强制恢复','Production')
go
insert into SYS_Menu values('Url_OrderTrace_View','物料拉动日志','Menu.Procurement.Info',420,'物料拉动日志','~/OrderTrace/Index','~/Content/Images/Nav/Default.png',1)
go
insert into ACC... |
<reponame>ken0x0a/postgraphile-examples
select app_private.link_or_register_user(
null,
'github',
'6413628',
'{}'::json,
'{}'::json
);
select app_private.link_or_register_user(
null,
'github',
'222222',
'{"name":"<NAME>"}'::json,
'{}'::json
);
select app_private.link_or_register_user(
null,
'git... |
-- Юзер логинится в систему
SELECT
`users` .*
FROM
`users`
WHERE
`users`.`username` = 'tyashin'
LIMIT 1;
BEGIN;
UPDATE `users` SET `remember_created_at` = '2021-06-04 15:15:24', `updated_at` = '2021-06-04 15:15:24' WHERE `users`.`id` = 1;
COMMIT;
BEGIN;
UPDATE
`users`
SET
`sign_in_count` = 4,
`current_sign_in... |
--5575960_sys_gh10446_AD_Column_IsRangeFilter_drop_DDL.sql - Not dropping the column yet,
--because it is still present in many customer branches;
--metas-ts made a reminder for 2021-06-01 to drop it then
-- this SQL is to "repair" DBs where it was already dropped
--thanks to/further reading: https://stackoverflow.... |
DROP TABLE IF EXISTS user_info;
CREATE TABLE user_info(
id varchar(20),
encrypt_pw varchar(255),
name varchar(20),
email varchar(50),
phone_number varchar(20),
role varchar(20),
PRIMARY KEY (id)
);
|
ALTER TABLE datavariable ADD COLUMN factor BOOLEAN;
|
CREATE TABLE IF NOT EXISTS `address_prefectures` (
`prefecture_id` int(11) NOT NULL COMMENT '都道府県ID',
`prefecture_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '都道府県名',
PRIMARY KEY (`prefecture_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='都道府県テーブル' |
<gh_stars>0
-- ----------------------------------------------------------------------
-- 10. removes any tables from the DB that are not required as final outputs
-- ----------------------------------------------------------------------
use data_extracts;
drop procedure if exists BFB_output_file_clean_up;
DELIMITER /... |
<gh_stars>1-10
BEGIN;
ALTER TABLE campaigns DROP COLUMN IF EXISTS branch;
ALTER TABLE changeset_jobs DROP COLUMN IF EXISTS branch;
COMMIT;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.