sql stringlengths 6 1.05M |
|---|
-- Assignment 03
-- <NAME>
-- Task 1 (ap DB IS USED)
use ap;
-- Q1.
INSERT INTO invoices VALUE
(NULL, 32, "AX-014-027", "2014-08-01", 434.58, 0.00, 0.00, 2, "2014-08-31", NULL);
SELECT ROW_COUNT();
-- Q2.
INSERT INTO invoice_line_items VALUE
(LAST_INSERT_ID(), 1, 160, 180.23, "Hard drive"),
(LAST_INSERT_ID(), 2... |
<reponame>dgsrdtsit/ct<gh_stars>0
CREATE TABLE ct_droit_ptac (
id INT AUTO_INCREMENT NOT NULL,
ct_motif_id INT DEFAULT NULL,
dp_prix_min DOUBLE PRECISION DEFAULT NULL,
dp_prix_max DOUBLE PRECISION DEFAULT NULL,
dp_droit DOUBLE PRECISION DEFAULT NULL,
INDEX IDX_DB918ADA45348DE0 (ct_motif_id), PRIMARY KEY(id))
DEFAULT CH... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 21 Sep 2021 pada 14.20
-- Versi server: 10.1.36-MariaDB
-- Versi PHP: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
<filename>hello-pg/fabriek.sql
DROP TABLE IF EXISTS Voorraad;
DROP TABLE IF EXISTS BesteldArtikel;
DROP TABLE IF EXISTS nl.tomkemper.bep3.helloneo.Bestelling;
DROP TABLE IF EXISTS nl.tomkemper.bep3.helloneo.Klant;
DROP TABLE IF EXISTS Fabriek;
DROP TABLE IF EXISTS nl.tomkemper.bep3.helloneo.Artikel;
CREATE TABLE n... |
USE test_cs;
DROP TABLE IF EXISTS test_script_foreach;
CREATE TABLE test_script_foreach (tbl VARCHAR(64) CHARSET ascii, scm VARCHAR(64) CHARSET ascii, engine VARCHAR(64) CHARSET ascii, create_options VARCHAR(1024) CHARSET ascii);
DROP DATABASE IF EXISTS test_cs_script_foreach;
CREATE DATABASE test_cs_script_foreach;
U... |
CREATE TABLE [tempSpeciesCover] (
[RiverSegment_ID] LONG ,
[CoverType] VARCHAR (3),
[LU_Code] VARCHAR (25),
[Utah_Species] VARCHAR (50),
[PercentCover] BINARY
)
|
<filename>src/test/resources/sql/delete/5ece94fb.sql
-- file:foreign_key.sql ln:544 expect:true
delete from pktable
|
CREATE SCHEMA stg;
-- #############################################################################
-- Importing and formatting data
-- #############################################################################
CREATE TABLE stg.rad_data (
id integer,
place text,
x text,
y text,
z text,
d... |
<filename>examples/tutorial/5/data_quality_rules.sql
SELECT
TRUE AS valid
,TO_JSON(
NAMED_STRUCT(
'count', COUNT(*),
'distance_without_charge', COALESCE(SUM(distance_without_charge), 0),
'charge_without_distance', COALESCE(SUM(distance_without_charge), 0),
'distance_without_pas... |
create table People (
Id int not null primary key,
[Name] nvarchar(200) not null,
Picture varBinary(MAX),
Height decimal(18, 2),
[Weight] decimal(18, 2),
Gender char (1) NOT NULL,
Birthdate date not null,
Biography nvarchar(MAX)
)
ALTER TABLE People ADD CONSTRAINT CHK_T_VarB__2MB CHECK (DATALENGTH(Picture) <= ... |
<reponame>conseilit/Events<gh_stars>1-10
select * from sys.conversation_endpoints
select * from sys.dm_broker_activated_tasks
select * from sys.dm_broker_connections
select * from sys.dm_broker_forwarded_messages
select * from sys.dm_broker_queue_monitors
select * from sys.transmission_queue
select * from sys.con... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 15, 2021 at 10:17 PM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.2.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
SELECT *
FROM "user"
WHERE username = ? AND password = ?; |
<reponame>XxTopShottaxX/SQL-challenge<filename>EmployeeSQL/EmployeeSQL_TableQ.sql
--CREATE DATABASE IF NOT EXISTS PH_employee_db
CREATE TABLE employees(
emp_no INT NOT NULL,
birth_date DATE NOT NULL,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
gender VARCHAR(1) NOT NULL,
hire_date DATE NO... |
CREATE TABLE IF NOT EXISTS cryptos (
id SERIAL PRIMARY KEY,
symbol TEXT NOT NULL UNIQUE,
name TEXT NOT NULL,
exchange TEXT NOT NULL,
shortable BOOLEAN NOT NULL
);
CREATE TABLE IF NOT EXISTS ohlc_data
(
id SERIAL PRIMARY KEY,
dt TIMESTAMP WITHOUT TIME ZONE NOT NULL,
crypto_id INTEGER NOT NUL... |
<reponame>frenkysina/owl<filename>dao/build_table.sql
DROP TABLE IF EXISTS `db_injection_task`;
CREATE TABLE IF NOT EXISTS `db_injection_task`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`name` VARCHAR(150) NOT NULL DEFAULT '' COMMENT '名称',
`status` VARCH... |
-- Verify org_user_invites
BEGIN;
SELECT id, org_id, user_id,
last_updated_by, created_at, updated_at
FROM org_user_invites
WHERE FALSE;
ROLLBACK;
|
<filename>WIKI/maintenance/archives/patch-user_last_timestamp.sql<gh_stars>10-100
-- For getting diff since last view
ALTER TABLE /*$wgDBprefix*/user_newtalk
ADD user_last_timestamp varbinary(14) NULL default NULL;
|
<reponame>UAMS-DBMI/PosdaTools
-- Name: StudySeriesForFile
-- Schema: posda_files
-- Columns: ['study_instance_uid', 'series_instance_uid']
-- Args: ['file_id']
-- Tags: ['activity_timepoint_support']
-- Description: Create An Activity Timepoint
--
--
select study_instance_uid, series_instance_uid from file_series n... |
/*
Navicat Premium Data Transfer
Source Server : linuxMysql
Source Server Type : MySQL
Source Server Version : 50734
Source Host : 192.168.145.132:3306
Source Schema : loafblog_admin
Target Server Type : MySQL
Target Server Version : 50734
File Encoding : 65001
Date:... |
<filename>quiz/quiz.sql
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 22. Feb 2021 um 19:50
-- Server-Version: 10.4.14-MariaDB
-- PHP-Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 20, 2019 at 06:31 PM
-- Server version: 5.7.26-0ubuntu0.18.04.1
-- PHP Version: 7.2.17-1+ubuntu18.04.1+deb.sury.org+3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET... |
<filename>schema/sdss5db/catalogdb/mwm_small/watchdog/watchdog.sql<gh_stars>1-10
/*
WATCHDOG Galactic Black Hole Binaries (<NAME> et al 2016 ApJS 222 15)
*/
CREATE TABLE catalogdb.watchdog (
name TEXT,
rastr TEXT,
decstr TEXT,
radeg DOUBLE PRECISION,
decdeg DOUBLE PRECISION,
ngaia REAL,
g... |
/*
* Copyright (C) 2019 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* Author: ddhawal
* Created: Sept 09, 2018
*/
ALTER TABLE mw_flavor ADD COLUMN label char(255) NOT NULL UNIQUE; |
DROP TRIGGER IF EXISTS {{ old_db_table_name }}_to_{{ new_db_table_name }}_insert_trigger
ON {{ old_db_table_name }};
DROP FUNCTION IF EXISTS {{ old_db_table_name }}_to_{{ new_db_table_name }}_insert();
|
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 26, 2021 at 12:43 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
-- 0.0.1
DROP TABLE IF EXISTS `#__egecalculator_directions`;
CREATE TABLE `#__egecalculator_directions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`published` tinyint(4) DEFAULT '1',
`fulltime_places` int(11) DEFAULT NULL,
`fulltime_score` int(11) DEFAULT NULL,
`distant_places` ... |
with event_and_query_string as
(
select
event_key,
split(page_query_string, '&') as qs_split
from {{ref('stg_ga4__events')}}
),
flattened_qs as
(
select
event_key,
params
from event_and_query_string, unnest(qs_split) as params
),
split_param_value as
(
select
... |
/* leave this
l:see LICENSE file
g:utility,script
v:120731\s.zaglio: list cols info; used by sp__script...
t:select * from fn__script_col(default) order by tablename,tableowner,columnid
*/
create function fn__script_col(@tbl_id int)
returns table
return
select top 100 percent
sysobjects.name ... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 15, 2016 at 10:47 PM
-- Server version: 5.5.50-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
-- <div class="itemTitle {{col.cssStat}}">{{col.name}}</div>
-- <div class="itemBody" ng-bind-html-unsafe="col.info"></div>
-- dn.runQuery ( stmt = ts0( 'select /*vPrepInfo.sql*/ * from "t_monitor_results" where "id" = \'%{it_work_id%}\' order by "seq" ', { "it_work_id":it_work_id } ), function ( err, result ) {
CREAT... |
<reponame>olavloite/spanner-jdbc<filename>src/test/resources/nl/topicus/jdbc/test/integration/ddl/AlterTableTestChildAddColumn.sql<gh_stars>10-100
ALTER TABLE TESTCHILD ADD COLUMN NEW_COLUMN STRING(50)
|
************************************************************
# Sequel Pro SQL dump
# Versão 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.5.5-10.1.38-MariaDB-0+deb9u1)
# Base de Dados: asterisk
# Tempo de Geração: 2019-05-28 18:18:55 +0000
# ******************... |
-- We define an employee's total earnings to be their monthly salary * months worked,
-- and the maximum total earnings to be the maximum total earnings for any employee in
-- the Employee table. Write a query to find the maximum total earnings for all employees
-- as well as the total number of employees who have m... |
\c postgres
DROP DATABASE IF EXISTS tffgodb;
CREATE DATABASE tffgodb;
\c tffgodb
CREATE TABLE IF NOT EXISTS artist (
artistid INT NOT NULL,
firstname VARCHAR(25) NOT NULL,
lastname VARCHAR(25) NOT NULL,
biography_eng VARCHAR(30),
biography_fin VARCHAR(30),
PRIMARY KEY (artistid)
);
CREATE ... |
USE [CSETWeb]
GO
/****** Object: Table [dbo].[SECTOR_INDUSTRY] Script Date: 11/14/2018 3:57:26 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SECTOR_INDUSTRY](
[SectorId] [int] NOT NULL,
[IndustryId] [int] NOT NULL,
[IndustryName] [varchar](150) NOT NULL,
CONSTRAINT [PK_SECTOR_I... |
<gh_stars>0
-------------------------------------
-- retrieve customer data using JSON
-------------------------------------
connect to sample;
set current_schema="DVDEMO";
select RESULTS.* from CUSTOMERS C,
JSON_TABLE( C.INFO, 'strict $'
COLUMNS(
CUSTID INT PATH '$.customerid',
FIRST_NAME VARCHAR(20) PATH '$.ide... |
-- Adding unique constraint on aws_resource table for columns arn_id, aws_account_id, aws_region_id
BEGIN;
ALTER TABLE aws_resource
DROP CONSTRAINT IF EXISTS aws_resource_arn_id_key;
ALTER TABLE aws_resource
ADD CONSTRAINT arn_account_region_id_unique UNIQUE (arn_id, aws_account_id, aws_region_id);
COMMIT; |
<filename>db/migrations/20161004140151_initial.sql
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE IF NOT EXISTS "runfiles" ("id" integer not null primary key, "filename" text, "filetype" text,"filecontent" blob, "timestamp" datetime );
-- +goose Down
-- SQL section 'Down' ... |
<reponame>sa363/sample-timesheets<gh_stars>10-100
alter table TS_TIME_ENTRY add column ACTIVITY_TYPE_ID uuid ;
|
<gh_stars>100-1000
INSERT INTO EMPLOYEE
(
EMPLOYEE_ID
, EMPLOYEE_NAME
, PASSWORD
, MAIL_ADRESS
, INSERT_USER
, INSERT_DATETIME
, UPDATE_USER
, UPDATE_DATETIME
) VALUES (
?
, ?
, ?
, ?
, ?
, ?
, ?
, ?
);
|
<reponame>nguyenppt/pubteller1
USE [bisolutions_vvcb]
GO
/****** Object: StoredProcedure [dbo].[BCASHWITHRAWAL_GetByID] Script Date: 21/11/2014 11:06:19 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[BCASHWITHRAWAL_GetByID](@ID nvarchar(50))
AS
SELEC... |
DROP TABLE IF EXISTS roles;
CREATE TABLE roles (
username VARCHAR(255) NOT NULL,
role VARCHAR(255) NOT NULL,
PRIMARY KEY ( username, role )
);
|
-- @testpoint: opengauss关键字not(保留),作为同义词对象名,部分测试点合理报错
--前置条件
drop table if exists not_test;
create table not_test(id int,name varchar(10));
--关键字不带引号-失败
drop synonym if exists not;
create synonym not for not_test;
--关键字带双引号-成功
drop synonym if exists "not";
create synonym "not" for not_test;
insert into "not" value... |
<filename>openGaussBase/testcase/KEYWORDS/bitvar/Opengauss_Function_Keyword_Bitvar_Case0027.sql
-- @testpoint:opengauss关键字bitvar非保留),作为序列名
--关键字不带引号-成功
drop sequence if exists bitvar;
create sequence bitvar start 100 cache 50;
--清理环境
drop sequence bitvar;
--关键字带双引号-成功
drop sequence if exists "bitvar";
create sequenc... |
GO
USE KAFBlackPortal
GO
/*
Creator : KAF
*/
ALTER PROCEDURE owin_userpasswordresetinfo_Ins
@Serial bigint = NULL,
@SessionID varchar (250) = NULL,
@UserID uniqueidentifier = NULL,
@MasterUserID bigint = NULL,
@SessionToken nvarchar (550) = NULL,
@UserName nvarchar (150) = NULL,
... |
<filename>cryptocollector_db/dwh/Tables/dim_exchange.sql
CREATE TABLE [dwh].[dim_exchange] (
[id_exchange] INT IDENTITY (1, 1) NOT NULL,
[name] VARCHAR (25) NOT NULL,
PRIMARY KEY CLUSTERED ([id_exchange] ASC)
);
|
<filename>system/database/db_sibuk.sql
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 17, 2020 at 01:33 PM
-- Server version: 5.7.30-0ubuntu0.16.04.1
-- PHP Version: 7.1.32-1+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON... |
<reponame>OpenAlcoholics/CockBot-OpenAPI
CREATE TABLE accessory_category
(
id integer DEFAULT nextval('accessory_category_id_seq'::regclass) PRIMARY KEY NOT NULL,
name varchar(255) NOT NULL,
description varchar(2048),
image_link varchar(512)
);
CREATE UNIQUE INDEX accessory_category_id_uindex ON ingredi... |
<filename>YammerApplication/YETIDatabase/dbo/Stored Procedures/Yammer_PurgeProcessedData.sql
CREATE PROCEDURE [dbo].[Yammer_PurgeProcessedData] (@Processed_By NVARCHAR(100))
AS
BEGIN
IF((SELECT COUNT(1) FROM YM_Messages WHERE processed_by = @Processed_By AND ISNULL(process_status,'') != 'FilesVerified') = 0)
BEGIN... |
<filename>trail_sharing_project_dump.sql
-- MySQL dump 10.16 Distrib 10.1.26-MariaDB, for Win32 (AMD64)
--
-- Host: localhost Database: trail_sharing_project
-- ------------------------------------------------------
-- Server version 10.1.26-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<filename>ttm.sql
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th10 01, 2020 lúc 08:27 AM
-- Phiên bản máy phục vụ: 10.4.14-MariaDB
-- Phiên bản PHP: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 29, 2021 at 04:23 AM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>01 - [MS SQL Problems]/[MS SQL Server Exams]/04 - [Databases MS SQL Server Exam 27 Jun 2020]/Section03_Querying.sql
-- 5. Mechanic Assignments
SELECT m.FirstName + ' ' + m.LastName AS Mechanic,
J.Status,
J.IssueDate
FROM Mechanics AS m
JOIN Jobs J
ON m.Mechanic... |
-- triggerA.test
--
-- db eval {
-- DELETE FROM result4;
-- CREATE TRIGGER r2u INSTEAD OF UPDATE ON v2 BEGIN
-- INSERT INTO result4(a,b,c,d) VALUES(old.y, old.x, new.y, new.x);
-- END;
-- UPDATE v2 SET y=y||'-extra' WHERE x BETWEEN 3 AND 5;
-- SELECT * FROM result4 ORDER BY a;
-- }
DELE... |
-- file:sequence.sql ln:83 expect:true
INSERT INTO serialTest2 (f1, f4)
VALUES ('bogus', -32769)
|
<reponame>danadel/sakai
--- alter table lesson_builder_items modify description clob;
alter table lesson_builder_items add temp clob;
update lesson_builder_items set temp=description;
alter table lesson_builder_items drop column description;
alter table lesson_builder_items rename column temp to description;
--- alter... |
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[GenerateRandomSubjects]
@SubjectsCount int
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result set... |
<gh_stars>1-10
-- this script sets the json usertype for existing users
update idm.users
set
user_data = user_data::jsonb|| '{"usertype":"internal"}'::jsonb|| '{"usertype":"external"}'::jsonb
where user_data not like '%{first%' and user_data != '{}'
;
update idm.users
set
user_data = user_data::jsonb|| '{"usertype":... |
<filename>job-server/src/main/resources/db/h2/migration/V0_7_2/V0_7_2__convert_binaries_table_to_use_milliseconds.sql
ALTER TABLE BINARIES ALTER COLUMN UPLOAD_TIME TIMESTAMP(3);
|
<filename>src/it/postgresql-18/verify/service/install_script_2_schema_AFTER_1.sql
\qecho Execute REUSABLE scripts with AFTER condition.
\qecho Execute /database_directory/schema_directory_second/script_directory_second/dummy_s2_reusable_after_a.sql
\include ./database_directory/schema_directory_second/script_directory_... |
-- Name: GoInServicePosdaImport
-- Schema: posda_files
-- Columns: []
-- Args: ['pid']
-- Tags: ['NotInteractive', 'PosdaImport']
-- Description: Claim control of posda_import
update import_control
set status = 'service process running',
processor_pid = ? |
<filename>CodePipeline-CodeBuild-CloudFormation/codebuild-cs-demo-project/objects/function/inventory_in_stock-36c990da.sql
CREATE OR REPLACE FUNCTION public.inventory_in_stock(p_inventory_id integer)
RETURNS boolean
LANGUAGE plpgsql
AS $function$
DECLARE
v_rentals INTEGER;
v_out INTEGER;
BEGIN
-- AN I... |
<reponame>Emzi0767/Devi-Discord-Selfbot
CREATE SEQUENCE devi_message_log_id_seq;
CREATE TABLE devi_message_log(
id BIGINT NOT NULL DEFAULT NEXTVAL('devi_message_log_id_seq'),
message_id BIGINT NOT NULL, -- snowflake
author_id BIGINT NOT NULL, -- snowflake
channel_id BIGINT NOT NULL, -- snowflake
... |
INSERT INTO transactions (TXN_ID, USERNAME, RECIPIENT, AMOUNT, TIMESTAMP) VALUES (9900, 'Abby Normal', 'Verizon', 22.0, '2020-10-20 13:05:36');
INSERT INTO transactions (TXN_ID, USERNAME, RECIPIENT, AMOUNT, TIMESTAMP) VALUES (12, '<NAME>', 'Tattered Cover', 7.0, '2020-10-20 13:07:59');
INSERT INTO transactions (TXN_ID,... |
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... |
# --- !Ups
CREATE TABLE roles (
id serial PRIMARY KEY,
name varchar(255) NOT NULL
);
CREATE TABLE users (
id bigserial NOT NULL PRIMARY KEY,
login varchar(255) NOT NULL,
password varchar(255) NOT NULL,
role_id int NOT NULL REFERENCES roles(id),
salt i... |
<gh_stars>10-100
DROP TABLE "public"."ContentItemPerson";
|
<filename>openGaussBase/testcase/KEYWORDS/parameter_name/Opengauss_Function_Keyword_Parameter_name_Case0035.sql
-- @testpoint:opengauss关键字parameter_name(非保留),自定义数据类型名为explain
--关键字explain作为数据类型不带引号,创建成功
drop type if exists parameter_name;
CREATE TYPE parameter_name AS (f1 int, f2 text);
select typname from pg_type whe... |
create table _2019_mayor_1_sections(
"section_id" text, -- 1) Пълен код на секция(код на район(2), община(2), адм. район(2), секция(3))
"district_id" text, -- 2) Идентификатор на административна единица, за която се гласува в секцията
"municipality_name" text, -- 3) Име на административна единица, за... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 25, 2022 at 06:17 AM
-- Server version: 5.7.37
-- PHP Version: 7.3.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... |
/* leave this
l:see LICENSE file
g:utility
k:is,console,ssms,app_name,test
v:131208\s.zaglio:added check of SSDT
v:130106.1000\s.zaglio:return 1 if app_name is a console like SSMS
t:select dbo.fn__isConsole()
*/
CREATE function fn__isConsole()
returns bit
as
begin
-- works only locally because... |
<gh_stars>0
CREATE OR REPLACE PROCEDURE Update_Employee(arg_employee_cod BIGINT, arg_json_data JSON)
LANGUAGE plpgsql
AS $$
BEGIN
IF(select exists(select 1 From employees where employees.employee_cod = arg_employee_cod)) THEN
-- GET JSON DATA
WITH source AS (SELECT first_name,last_name FROM json_populate_record(
... |
/*
Deployment script for ObservationsTest
This code was generated by a tool.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
*/
GO
SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER ON;
SET NUMERIC_ROUNDABORT OFF;
GO
:... |
<reponame>ionflux/mssql-telegramm-bot
use [YOUR_DATABASE]
go
/****** Object: SqlAssembly [ClrHttp] Script Date: 20.11.2017 19:55:38 ******/
create assembly [ClrHttp]
from 0x4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E0... |
create table question
(
id int auto_increment,
title varchar(50),
description text,
gmt_create bigint,
gmt_modified bigint,
creator int,
comment_count int default 0,
view_count int default 0,
like_count int default 0,
tag varchar(256),
primary key (id)
); |
CREATE SEQUENCE IF NOT EXISTS store_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
CREATE TABLE IF NOT EXISTS store (
store_id bigint NOT NULL PRIMARY KEY DEFAULT nextval('store_id_seq'),
name varchar(100) NOT NULL,
created TIMESTAMP WITHOUT TIME ZONE NOT NULL
); |
<filename>_example/05_rapidash_plugin/schema/skills.sql
CREATE TABLE `skills` (
`id` bigint(20) unsigned NOT NULL,
`skill_effect` varchar(30) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
<reponame>juliocesarfs/yourPet
-- DDL -- Data Definition Language
CREATE TABLE public.pet
(
id serial NOT NULL,
name character varying(40) NOT NULL,
race character varying(40) NOT NULL,
specie character varying(40) NOT NULL,
birth date NOT NULL,
gender character varying(1) NOT NULL
PRIMARY KEY (id)
)
|
select * from departments;
select * from dept_employees;
select * from dept_manager;
select * from employees;
select * from salaries;
select* from titles;
-- List the following details of each employee: employee number, last name, first name, gender, and salary.
SELECT
e.emp_no,
e.last_name,
e.first_name,
e.gender... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 10, 2021 at 12:17 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
DELETE FROM t_order;
DELETE FROM t_order_item;
DELETE FROM t_config;
INSERT INTO t_order VALUES(1000, 10, 'init');
INSERT INTO t_order VALUES(1001, 10, 'init');
INSERT INTO t_order VALUES(1100, 11, 'init');
INSERT INTO t_order VALUES(1101, 11, 'init');
INSERT INTO t_order_item VALUES(100000, 1000, 10, 'init');
INSERT I... |
<filename>DB/knowsong.sql
-- 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_DIVISIO... |
{{
config(
materialized='table'
)
}}
with trigger_ref as (
-- we should still be able to ref a model by its filepath
select * from {{ ref('foo_alias') }}
)
-- this name should still be the filename
select {{ string_literal(this.name) }} as tablename
|
USE [DeviceSQL]
GO
DECLARE @channelName nvarchar(512) = 'tcp://192.168.0.8:1000';
DECLARE @deviceName nvarchar(512) = 'FB107-01';
DECLARE @deviceAddress tinyint = 1;
DECLARE @deviceGroup tinyint = 2;
DECLARE @hostAddress tinyint = 3;
DECLARE @hostGroup tinyint = 1;
DECLARE @numberOfRetries int = 5;
DECLARE @waitToRetr... |
<reponame>loujine/musicbrainz-server<filename>admin/sql/updates/20150429-tag-upvote.sql
\set ON_ERROR_STOP 1
BEGIN;
ALTER TABLE area_tag_raw ADD COLUMN is_upvote BOOLEAN NOT NULL DEFAULT TRUE;
ALTER TABLE artist_tag_raw ADD COLUMN is_upvote BOOLEAN NOT NULL DEFAULT TRUE;
ALTER TABLE event_tag_raw ADD COLUMN is_upvote ... |
<filename>Database/Schema/Profile.Cache.Concept.Mesh.Person.Table.sql
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Profile.Cache].[Concept.Mesh.Person](
[PersonID] [int] NOT NULL,
[MeshHeader] [nvarchar](255) NOT NULL,
[NumPubsAll] [int] NULL,
[NumPubsThis] [int] NULL,
[Weight] [float] NULL,
[Fi... |
-- truncate tables
truncate table CANVAS_DATA_NIGHTLY_IMPORTS.ACCOUNT_DIM;
truncate table CANVAS_DATA_NIGHTLY_IMPORTS.ASSIGNMENT_GROUP_DIM;
truncate table CANVAS_DATA_NIGHTLY_IMPORTS.ASSIGNMENT_DIM;
truncate table CANVAS_DATA_NIGHTLY_IMPORTS.ASSIGNMENT_DIM;
truncate table CANVAS_DATA_NIGHTLY_IMPORTS.ASSIGNMENT_GRO... |
-----------------------------------
-- Gab Tidy Data metadata tables --
-----------------------------------
-- Metadata table for gab_tidy_data tool
create table _gab_tidy_data (
metadata_key text primary key on conflict fail,
metadata_value text
);
-- Update this whenever the schema is changed!!!
insert into... |
create database fifth31155;
use fifth31155;
create table Borrower(
Rollin int not null,
Name varchar(25) not null,
DateofIssue date,
NameofBook varchar(30),
Status varchar(5) default 'N',
primary key(Rollin)
);
create table fine(
Rollin int not null,
Date date,
Amt int default ... |
<filename>app/src/main/resources/setup/schema/schema.sql<gh_stars>0
-- This file creates the necessary tables for the jukebox application.
-- This file will be run during Spring's initialization process can run all
-- commands.
-- Create the user tables
CREATE TABLE if not exists users (
id serial PRIMARY KEY,
... |
<gh_stars>0
use cory2v;
INSERT INTO `eventtype` (`Id`, `Name`, `Description`) VALUES ('1', 'General', 'General Event.'); |
<gh_stars>0
# f_loginCheck
# Inputs: username, password
# Output: Bool
# Check if a username and password exist in users table
DROP FUNCTION IF EXISTS f_loginCheck;
DELIMITER //
CREATE FUNCTION f_loginCheck (username VARCHAR(24), password CHAR(64)) RETURNS Bool
BEGIN
DECLARE matched Bool;
SET matched = false;
... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 29 Jan 2021 pada 02.42
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... |
<gh_stars>0
CREATE SCHEMA `icm`;
use `icm`;
DROP TABLE IF EXISTS `icm`.`user`;
/* user table 생성 */
CREATE TABLE `user` (
`idx` INT NOT NULL AUTO_INCREMENT,
`id` VARCHAR(45) NOT NULL PRIMARY KEY,
`password` VARCHAR(45) NOT NULL,
`name` VARCHAR(45) NOT NULL,
`email` VARCHAR(45) NOT NULL,
`birthday` VARCHAR(45) NOT NU... |
<reponame>lgcarrier/AFW
SET DEFINE OFF;
CREATE INDEX AFW_21_PLUGN_ITEM_MENU_FK4 ON AFW_21_PLUGN_ITEM_MENU
(REF_DV_ALIGN)
LOGGING
/
|
CREATE TABLE [dbo].[LaunchCenter]
(
[Id] INT IDENTITY(100,1) NOT NULL,
[CommandName] NVARCHAR(30) NOT NULL,
[FullName] NVARCHAR(100) NOT NULL,
[Elevation] DECIMAL(8,1) NOT NULL,
[Lat] DECIMAL(18,7) NOT NULL,
[Long] DECIMAL(18,7) NOT NULL,
CONSTRAINT [PK_ProcessControl] PRIMARY KEY CLUSTERED
(
[Id] ... |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3307
Source Server Version : 50505
Source Host : localhost:3307
Source Database : mariadbtest
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2017-09-29 14:33:00
*/
SET FOREIGN_KEY_CHECKS... |
<gh_stars>1-10
insert into beneficiary(full_name, nationality) values ('kushal', '123');
insert into beneficiary(full_name, nationality) values ('ashim', '456');
|
<reponame>thylacine/websub-hub
-- Resetting verification attempts happens on publisher validation.
UPDATE verification SET
next_attempt = now(),
attempts = 0
WHERE id = $(verificationId)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.