sql stringlengths 6 1.05M |
|---|
<gh_stars>1-10
DROP SCHEMA IF EXISTS `cupcake`;
CREATE SCHEMA IF NOT EXISTS`cupcake`;
USE `cupcake`;
DROP TABLE IF EXISTS `cupcake`.`ordertails`;
DROP TABLE IF EXISTS `cupcake`.`invoices`;
DROP TABLE IF EXISTS `cupcake`.`topping`;
DROP TABLE IF EXISTS `cupcake`.`bottom`;
DROP TABLE IF EXISTS `cupcake`.`users`;
CREAT... |
-- Create additional DB users
CREATE USER :PG_WRITE_USER WITH PASSWORD :'<PASSWORD>';
CREATE USER :PG_READ_USER WITH PASSWORD :'<PASSWORD>';
-- Revoke some default privileges
REVOKE TEMPORARY ON DATABASE :PG_DATABASE FROM PUBLIC;
REVOKE CREATE ON SCHEMA public FROM PUBLIC;
-- Grant privileges on schemas
GRANT USAGE... |
<filename>views/regional_statistics_view/20190916102330.sql
SELECT region_id, land_area, eez_area, ts_area,
(COALESCE(pa_land_area,0) + COALESCE(pa_marine_area,0)) AS pa_area,
pa_land_area, pa_marine_area, pa_eez_area, pa_ts_area, jrc_regional_area,
((COALESCE(pa_land_area,0) + COALESCE(pa_marine_area,0)) /
(... |
<reponame>cateto/WeCamp_Project<filename>src/main/webapp/WEB-INF/views/sql/WeCamp_createTables.sql
drop table AUTHORITY cascade constraints;
drop table I_STATE cascade constraints;
drop table B_STATE cascade constraints;
drop table HEART cascade constraints;
drop table OWNER cascade constraints;
drop table L_MEMBER cas... |
-- rename organisation.company_house_number -> companies_house_number
-- 1. expand: IFS-3195 duplicate the existing column
ALTER TABLE organisation ADD COLUMN companies_house_number VARCHAR(255);
-- 2. migrate: IFS-4194 copy everything from the old column (written to by v0, v1 of the services) to the new column
-- UP... |
<reponame>Synnotech-AG/Synnotech.EntityFrameworkCore<gh_stars>1-10
CREATE TABLE Contacts (
Id INT IDENTITY(1, 1) PRIMARY KEY CLUSTERED,
[Name] NVARCHAR(100) NOT NULL
);
INSERT INTO Contacts ([Name])
VALUES ('<NAME>');
INSERT INTO Contacts ([Name])
VALUES ('<NAME>'); |
select c_name,
(select count(O.o_orderkey)
from orders O
where O.o_custkey = 37) as OrderCount
from customer C
where exists
(
select *
from nation N
where C.c_nationkey=N.n_nationkey
and N.n_regionkey=0
)
order by c_name |
<reponame>jdkoren/sqlite-parser<gh_stars>100-1000
-- wal2.test
--
-- execsql { INSERT INTO t1 VALUES('abc') }
INSERT INTO t1 VALUES('abc') |
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:numeric_big.sql ln:256 expect:true
INSERT INTO num_exp_add VALUES (5,5,'-1305511260.86912143656097667105187670102899690968579124221579164162420806975946192322298144755910384776938712225011087241390006873062785578059026760203327501250049706526689818710354560323008... |
-- Foreign Keys missing indexes
-- Cкрипт работает только для создания индексов по одному столбцу
-- Внешние ключи, состоящие более чем из одного столбца, не отслеживаются
SELECT DB_NAME() AS DBName ,
rc.Constraint_Name AS FK_Constraint ,
-- rc.Constraint_Catalog AS FK_Database,
-- rc.Constraint_Schema AS... |
<reponame>coverwallet/pysoni<gh_stars>1-10
SELECT 1 as mynum, date '2001-09-28' AS test_date; |
--This file is licensed under the University of Illinois/NCSA Open Source License. See LICENSE.TXT for details.
/*
The following sections contain the functions that we are using. We are using a
SqlTool specific feature: Raw Mode
<http://hsqldb.org/doc/guide/ch08.html#raw-section>. The symbols "\." and ".;"
begin and e... |
UPDATE creature_template SET ScriptName='npc_dalaran_guardian_mage' WHERE entry IN (29255, 29254);
|
-- Fixing bug 895 by making acs__remove_user do what the Oracle version already does, i.e.
-- remove records referencing the user record before attempting to delete it.
--
-- @author <NAME>
-- Should have been added earlier, at least now we save the 4.6.3 - 5.0 upgrade
create view all_users
as
select pa.*, pe.*, u.*
f... |
<reponame>ACassiusD/LoveXperts
-- Author: <NAME>
-- File name interests.sql
-- Date: 2015-12-06
-- Description: -- Creates the table for interests
-- Note that our composite primary key should work since someone should not be able to report the same user twice
DROP TABLE IF EXISTS interests;
-- A table to hold user ... |
<gh_stars>100-1000
-- 620 Number of procedure occurrence records by condition occurrence start month
--HINT DISTRIBUTE_ON_KEY(stratum_1)
WITH rawData AS (
SELECT
YEAR(po.procedure_date) * 100 + MONTH(po.procedure_date) AS stratum_1,
COUNT_BIG(po.person_id) AS count_value
FROM
@cdmDatabaseSchema.procedure_occurrenc... |
create table cm.external_info_modification_model
(
id int8 not null,
document_id character varying not null,
roistat_id character varying,
primary key (id)
);
alter table if exists cm.external_info_modification_model
add constraint modificat... |
-- --------------------------------------------------------
-- 主機: 127.0.0.1
-- 服務器版本: 10.3.7-MariaDB - mariadb.org binary distribution
-- 服務器操作系統: Win64
-- HeidiSQL 版本: 9.4.0.5125
-- --------------------------------------------... |
<reponame>jhueichan/PublicacionesV2<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 10-05-2016 a las 11:30:51
-- Versión del servidor: 5.5.32
-- Versión de PHP: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
... |
<filename>site/app/config/schema/sql/f.funcs.sql
-- -----------------------------------------------------
-- function createSafeTitle
-- -----------------------------------------------------
DROP function IF EXISTS `createSafeTitle`;
DELIMITER $$
CREATE FUNCTION `createSafeTitle`(actualName VARCHAR(255)) RETURNS varch... |
##根据学校ID,状态获取对应的school_book count
#macro($getSchoolBookByStatus(schoolId,status))
SELECT count(*) FROM school_book where school_id =:schoolId and status =:status
#end
|
<reponame>ge-enrique-cano/uaa
ALTER TABLE user_google_mfa_credentials
ADD COLUMN encryption_key_label VARCHAR(255)
ALTER TABLE user_google_mfa_credentials
ADD COLUMN encrypted_validation_code VARCHAR(255) NULL
ALTER TABLE user_google_mfa_credentials
ALTER COLUMN validation_code SET NULL |
BEGIN;
CREATE TABLE resource_pins (
resource_id INTEGER NOT NULL PRIMARY KEY
REFERENCES resources(id) ON DELETE CASCADE,
version jsonb NOT NULL,
comment_text text NOT NULL
);
INSERT INTO resource_pins (
SELECT
id AS resource_id,
api_pinned_version AS version,
COALESCE (pin... |
<filename>doc/sql/gen_table.sql
/*
Navicat Premium Data Transfer
Source Server : 腾讯云mysql
Source Server Type : MySQL
Source Server Version : 50728
Source Host :
Source Schema : mate
Target Server Type : MySQL
Target Server Version : 50728
File Encoding : 65001
Date: ... |
<reponame>welaw/go-usa
CREATE TABLE items (
uid UUID NOT NULL DEFAULT gen_random_uuid() PRIMARY KEY,
ident varchar(255) NOT NULL,
bioguide_id varchar(255) NOT NULL,
loc varchar(255) NOT NULL,
last_mod TIMESTAMP WITHOUT TIME ZONE NOT NULL,
created_at TIMESTAMP WITHOUT TI... |
INSERT INTO ML_TEST_RESULTS VALUES(4,'weka.classifiers.bayes.NaiveBayes','Test','combined_createFullKdd99TestDatasetForBinary.arff-311029',311029,'weka.classifiers.bayes.NaiveBayes-K.weka',59906.0,687.0,224030.0,26406.0,'2015-04-30 18:46:57','2015-04-30 18:46:57',0,11526993448,14496038912,30541873152,2969045464,'atiMin... |
drop table if exists t1;
create table t(i int);
update t set i=1;
drop t;
|
--[er]test ceil function with set type as its operand
select ceil({1,2,3}) from db_root order by 1; |
-- @testpoint:opengauss关键字first(非保留),作为数据库名
--关键字不带引号-成功
drop database if exists first;
create database first;
drop database first;
--关键字带双引号-成功
drop database if exists "first";
create database "first";
drop database "first";
--关键字带单引号-合理报错
drop database if exists 'first';
create database 'first';
--关键字带反引号-合理报错
d... |
use final_project;
CREATE TABLE `final_project`.`country` (
`country_id` INT NOT NULL,
`country_name` VARCHAR(45) NOT NULL,
PRIMARY KEY (`country_id`),
UNIQUE INDEX `country_name_UNIQUE` (`country_name` ASC) VISIBLE,
UNIQUE INDEX `country_id_UNIQUE` (`country_id` ASC) VISIBLE);
INSERT INTO `country` (`count... |
<filename>res/database/students.sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- 主機: 127.0.0.1
-- 產生時間: 2019 年 04 月 25 日 16:39
-- 伺服器版本: 10.1.38-MariaDB
-- PHP 版本: 7.1.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 ... |
<filename>extractor/sql/metadata/redshift/postgres.sql
SELECT * FROM (
SELECT DISTINCT
0 AS ordinal_position,
CASE WHEN '${CUSTOM_PRIMARY_KEY}' != '' THEN CONCAT('CONCAT(','${CUSTOM_PRIMARY_KEY}',')', ' AS custom_primary_key') ELSE CONCAT( STRING_AGG( (a.attname||'::varchar'), '||' ), ' as custom_p... |
<reponame>jwent/SQLTestAdapter<gh_stars>0
/*
??????????????????????????????????????????????????????????????????????
?|
?| Procedure Name: ag_test_run_ins
?|
?| Description: Inserts new rows into the table test_run
?|
?| @Author: <NAME>
?| @Createdate: 2/13/2018
?|
?| @Input Param: @test_plan_id int = TestPlanId
?|... |
-- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 17, 2018 at 12:58 PM
-- Server version: 10.1.33-MariaDB
-- PHP Version: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 09, 2018 at 02:53 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
DELETE FROM a30_event;
ALTER TABLE a30_event AUTO_INCREMENT = 0;
INSERT INTO a30_event (event_id, project_idref, name, description) VALUES (1, 1, '010', 'Stop Look and Listen');
INSERT INTO a30_event (event_id, project_idref, name, description) VALUES (2, 1, '020', 'Walk Around the Block');
INSERT INTO a30_event (event... |
create table Account (
accountId BIGINT IDENTITY PRIMARY KEY,
name VARCHAR(40) not null,
email VARCHAR(25) UNIQUE NOT NULL,
rating float(24) default(0.0),
password VARCHAR(100) NOT NULL,
accountType VARCHAR (3) not null,
version bigint default 1,
CHECK (rating >= 0.0 AND rating <= 10.0),
CHECK (accou... |
<gh_stars>1-10
DROP TABLE IF EXISTS `character_logs`;
CREATE TABLE `character_logs` (
`obj_Id` int(11) NOT NULL,
`HWID` varchar(35) DEFAULT NULL,
`action` text,
`time` bigint(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
<filename>sqitch/revert/data/managing-a-remote-team.sql
-- Revert ovid:data/managing-a-remote-team to sqlite
BEGIN;
DELETE FROM articles WHERE slug = 'managing-a-remote-team';
COMMIT;
|
<filename>db/sqlite/word/up.sql<gh_stars>1-10
-- 表:word
CREATE TABLE word
(
id SERIAL PRIMARY KEY,
sn INTEGER NOT NULL ,
book INTEGER NOT NULL,
paragraph INTEGER NOT NULL,
wordindex INTEGER NOT NULL,
bold INTEGER NOT NULL DEFAULT (0),
weight INTEGER NOT NULL DEFAULT (1),
created_at TIMESTAMP NOT NULL... |
<gh_stars>10-100
USE DemoDB
GO
-- テストデータの確認
INSERT INTO TemporalTable (Col2, Col3, Col4)
VALUES(NEWID(), NEWID(), N'AAAAAA'),
(NEWID(), NEWID(), N'AAAAAA'),
(NEWID(), NEWID(), N'AAAAAA'),
(NEWID(), NEWID(), N'AAAAAA')
WAITFOR DELAY '00:00:01'
BEGIN TRAN
INSERT INTO TemporalTable (Col2, Col3, Col4) VALUES (NEWID... |
<reponame>joaobertacchi/restful-clojure
CREATE OR REPLACE FUNCTION update_updated_at_column()
RETURNS TRIGGER AS '
BEGIN
NEW.updated_at = NOW();
RETURN NEW;
END;
' LANGUAGE 'plpgsql';
CREATE TABLE users (
id serial PRIMARY KEY,
name varchar(40) NOT NULL CHECK (na... |
do $$
begin
if not exists (
select 1
from information_schema.columns
where table_name = 'tokens' and column_name = 'reason'
) then
alter table tokens
add column reason varchar(100) not null;
end if;
end$$;
|
<filename>src/main/resources/dbmigrate/mysql/humantask/V1_6_0_3__task_def_user.sql
-------------------------------------------------------------------------------
-- task def user
-------------------------------------------------------------------------------
CREATE TABLE TASK_DEF_USER(
ID BIGINT AUTO_INCREME... |
-- database: presto; requires: com.facebook.presto.tests.ImmutableTpchTablesRequirements; tables: nation; groups: union;
SELECT *
FROM nation
UNION ALL
SELECT *
FROM nation
|
CREATE OR REPLACE FUNCTION core.tf_i_src_vtiger_trg_party_i()
RETURNS INTEGER AS $$
/*
=====================================================================================================================
DESCRIPTION: Insert data from stage 'vtiger_*' tables into core input table party_i
AUTHOR:... |
<filename>src/main/resources/resources/cohortanalysis/heraclesanalyses/sql/1860_numberOfPersonsByDurationFromCohortStartToFirstOccurrenceOfConditionEra.sql
-- 1860 Number of persons by duration from cohort start to first occurrence of condition era, by condition_concept_id
--insert into @results_schema.h... |
<gh_stars>10-100
ALTER TABLE state_of_land ADD COLUMN legal_description_land varchar; |
<reponame>pdv-ru/ClickHouse
DROP TABLE IF EXISTS table_with_enum_column_for_tsv_insert;
CREATE TABLE table_with_enum_column_for_tsv_insert (
Id Int32,
Value Enum('ef' = 1, 'es' = 2)
) ENGINE=Memory();
SET input_format_tsv_enum_as_number = 1;
INSERT INTO table_with_enum_column_for_tsv_insert FORMAT TSV 102 2
... |
<filename>127_0_0_1.sql
-- phpMyAdmin SQL Dump
-- version 4.1.4
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1
-- Время создания: Янв 30 2015 г., 20:38
-- Версия сервера: 5.6.15-log
-- Версия PHP: 5.4.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
-- Schema for binary clone detection output
-- SQL contained herein should be written portably for either SQLite3 or PostgreSQL
-- Clean up. Tables need to be dropped in the opposite order they're created.
drop table if exists semantic_funcsim;
drop table if exists semantic_aggprops;
drop table if exists semantic_func... |
<reponame>Zhaojia2019/cubrid-testcases<filename>sql/_01_object/_08_primary_foreign_key/_002_alter/cases/1039.sql
-- create class and add FOREIGN key on nchar data type
create class aoo ( a nchar(10) primary key, b int, c int );
select attr_name, is_nullable from db_attribute where class_name = 'aoo' order by 1,2;
se... |
CREATE FUNCTION FN_EmailDeEstudiantes_VerificaExistenciaPorId(@Identificacion VARCHAR(20))
RETURNS BIT AS
BEGIN
DECLARE @ExisteEmailDeEstudiante BIT;
SET @ExisteEmailDeEstudiante =(SELECT COUNT(Identificacion) FROM EmailDeEstudiantes WHERE Identificacion = @Identificacion)
RETURN @ExisteEmailDeEstudiante
END |
<filename>CRUD/CRUD.11.sql
-- 11
USE SoftUni
GO
SELECT [FirstName], [LastName]
FROM [dbo].[Employees]
WHERE [ManagerID] IS NULL |
SET ECHO OFF
SET MARKUP HTML ON SPOOL ON
SPOOL emploiTemps.HTML
SELECT DISTINCT T.jourCoursDate as jours ,
C.intituleCourt ||'('||C.codeCours||')' as cours_classe ,
C.credits as credits_cours,
'Trimestre'|| C.periodeAcademiqueIdTrim as periode_Trimestriel... |
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 06, 2021 at 06:01 PM
-- Server version: 10.3.28-MariaDB-cll-lve
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... |
<reponame>arischanurfadilah/ukk_ArsipSurat
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 15, 2018 at 09:38 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SE... |
<reponame>borisbotev/SoftUni
CREATE TRIGGER t_CancelTrip ON Trips INSTEAD OF DELETE
AS
BEGIN
UPDATE Trips
SET CancelDate = GETDATE()
WHERE Id IN (SELECT Id FROM deleted)
AND CancelDate IS NULL
END |
<reponame>jcmorais-araujo/exercicioMySQL
--create database secao03;
-- create table tipos_produto(
-- id SERIAL PRIMARY KEY,
-- descricao character varying(50) not null
-- );
-- create table produtos(
-- id SERIAL PRIMARY KEY,
-- descricao character varying(50) not null,
-- preco money not null,
-- id_tipo_produto i... |
<filename>basededatos/2018_05_19_emunicach.sql
-- MySQL dump 10.13 Distrib 5.6.39, for Linux (x86_64)
--
-- Host: localhost Database: emunicach
-- ------------------------------------------------------
-- Server version 5.6.39-cll-lve
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @... |
/*
Author: This code was generated by DALGen version 1.1.0.0 available at https://github.com/H0r53/DALGen
Date: 12/16/2017
Description: Creates the eventcomment table and respective stored procedures
*/
USE cory2v;
-- ------------------------------------------------------------
-- Drop existing objects
-- ---... |
SELECT name FROM people
INNER JOIN stars ON people.id = stars.person_id
INNER JOIN movies ON movies.id = stars.movie_id WHERE movies.title = "Toy Story"; |
-- To demonstrate the use of AND statement.
use 30daysSQL;
SELECT NAME FROM Students WHERE ROLL_NO>1 AND age>10; -- will print Student name for given condition |
<reponame>jkvetina/BUG<filename>tables/roles.sql
--DROP TABLE roles PURGE;
CREATE TABLE roles (
app_id NUMBER(4) CONSTRAINT nn_roles_app_id NOT NULL,
role_id VARCHAR2(30) CONSTRAINT nn_roles_role_id NOT NULL,
--
description_ VARCHAR2(1000),
--
is... |
-- ----------------------------------------------------------------
--
-- This is a script to add the eICU-CRD constraints for Postgres.
--
-- ----------------------------------------------------------------
-- If running scripts individually, you can set the schema where all tables are created as follows:
-- SET sear... |
<gh_stars>0
-- Data Analysis
-- 1. List the following details of each employee: employee number, last name, first name, sex, and salary.
select employees.emp_no, employees.last_name, employees.first_name, employees.sex, salaries.salary
from employees
join salaries on employees.emp_no = salaries.emp_no;
-- 2. List fi... |
CREATE TABLE tw_task
(
id BINARY(16) PRIMARY KEY NOT NULL,
status ENUM('NEW', 'WAITING', 'SUBMITTED', 'PROCESSING', 'DONE', 'ERROR', 'FAILED'),
-- Microsecond precision (6) is strongly recommended here to reduce the chance of gap locks deadlocking on tw_task_idx1
next_event_t... |
CREATE TABLE IF NOT EXISTS `wp_ask` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`keyword` varchar(100) NOT NULL COMMENT '关键词',
`keyword_type` tinyint(2) NOT NULL DEFAULT 0 COMMENT '关键词类型',
`title` varchar(255) NOT NULL COMMENT '标题',
`intro` text NULL COMMENT '封面简介',
`mTime` int(10) NULL... |
{%- test expect_column_to_exist(model, column_name, column_index=None, transform="upper") -%}
{%- if execute -%}
{%- set column_name = column_name | map(transform) | join -%}
{%- set relation_column_names = dbt_expectations._get_column_list(model, transform) -%}
{%- set matching_column_index = relation_co... |
<reponame>kainsk/kratos<filename>persistence/sql/migrations/sql/20210913095309000012_identity_recovery_tokens.sqlite3.up.sql<gh_stars>10-100
DELETE FROM identity_recovery_tokens WHERE identity_recovery_address_id IS NULL AND identity_id = ''; |
<reponame>sul-dlss-labs/spoc
CREATE TABLE IPAddresses (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
address VARCHAR NOT NULL
);
CREATE TABLE Papers (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
filename VARCHAR NOT NULL
);
CREATE TABLE Occurrences (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
cre... |
select
e.id as id1_1_,
e.department_id as departme3_1_,
e.username as username2_1_
from
Employee e
where
e.id = 1
select
d.id as id1_0_0_
from
Department d
where
d.id = 1 |
<reponame>vorburger/flowsim
-- create an enumerated type for the account status
CREATE TYPE SUBSCRIBERS_STATUS AS ENUM (
'CREATED', -- registered but not verified, logins should not be possible
'ACTIVE', -- verified and can actively login
'RESET', -- password reset, no logins possible only pwd reset proced... |
<reponame>dhenhugie/toko-api
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 100414
Source Host : localhost:3306
Source Schema : toko_api
Target Server Type : MySQL
Target Server Version : 100414
File Encoding ... |
<filename>LinkStore/src/main/resources/schema.sql
CREATE TABLE links(
id INT PRIMARY KEY NOT NULL,
url TEXT NOT NULL,
added LONG NOT NULL,
title TEXT,
description TEXT
); |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-09-2021 a las 23:13:41
-- Versión del servidor: 10.4.17-MariaDB
-- Versión de PHP: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
<filename>hongs-wms/web/WEB-INF/bin/serve/02.master.sql
--DB=module
--DT=-3M
DELETE FROM `a_master_user` WHERE (`state` = 0 AND `mtime` < '{{t}}');
|
<filename>db/seeds.sql
INSERT INTO `burgers_db`.`burgers` (`burger_name`, `devoured`) VALUES ('Spicy chicken burger', '0');
INSERT INTO `burgers_db`.`burgers` (`burger_name`, `devoured`) VALUES ('Mexican beef burger', '0');
INSERT INTO `burgers_db`.`burgers` (`burger_name`, `devoured`) VALUES ('Italian pizza burger', '... |
Select * from nacin_fakt
Where tip > 699
|
CREATE DEFINER=`apiuser`@`localhost` PROCEDURE `EventAddOrEdit`(
IN _id INT(11),
IN _date varchar(11),
IN _name varchar(255),
IN _birthday tinyint(1),
in _content mediumtext
)
BEGIN
IF _id = 0 THEN
insert into events(date, name, birthday, content)
values (_date, _name, _birthday, _content);
... |
--
-- Name: spreadsheet_reports flood_report_tg; Type: TRIGGER; Schema: public; Owner: -
--
-- DROP TRIGGER IF EXISTS flood_report_tg ON public.spreadsheet_reports;
-- CREATE TRIGGER flood_report_tg BEFORE INSERT ON public.spreadsheet_reports FOR EACH ROW EXECUTE PROCEDURE public.kartoza_generate_excel_report_for_floo... |
<reponame>q2kPetrov/SoftUni
-- *********************** Problem 1 - DDL ***********************
--CREATE DATABASE Airport
CREATE TABLE Planes (
Id INT PRIMARY KEY IDENTITY,
[Name] NVARCHAR(30) NOT NULL,
Seats INT NOT NULL,
[Range] INT NOT NULL
)
CREATE TABLE Flights(
Id INT PRIMARY KEY IDENTITY,
Depa... |
<reponame>zachlatta/southbayfession
-- +goose Up
ALTER TABLE Tweet
ALTER COLUMN TwitterId SET DATA TYPE bigint;
-- +goose Down
ALTER TABLE Tweet
ALTER COLUMN TwitterId SET DATA TYPE integer;
|
select * from PROJECT_A.DATASET_A.TABLE_A
-- if the table already exists and `--full-refresh` is
-- not set, then only add new records. otherwise, select
-- all records.
|
<gh_stars>10-100
--akaz, 06.10.2014, v1.1
--depa, 06.04.2015, v1.2
use [work]
go
declare @time_format varchar(20) = 'H:mm:ss';
declare @date_locale varchar(5) = 'ru-ru';
declare @date_null datetime = {d '1901-01-01'};
WITH DM_EXEC_SESSION_PARSE (session_id, ax_user, ax_s)
AS (
SELECT
session_id,
SUBSTRING(CAST(ss.C... |
<reponame>jdkoren/sqlite-parser<filename>src/test/resources/fkey2.test_49.sql
-- fkey2.test
--
-- execsql {
-- DELETE FROM up WHERE c34 = 'possibly';
-- SELECT c34, c35 FROM up;
-- SELECT c39, c38 FROM down;
-- }
DELETE FROM up WHERE c34 = 'possibly';
SELECT c34, c35 FROM up;
SELECT c39, c38 FROM down; |
--
-- Throttle current query by periodically sleeping throughout its execution.
-- This function sleeps an amount of time proportional to the time the query executes,
-- on a per-lap basis. That is, time is measured between two invocations of this function,
-- and that time is multiplied by throttle_ratio to conclude ... |
<reponame>Taxuexun/mei<filename>doc/db.sql
/*Table structure for table `admin_log` */
DROP TABLE IF EXISTS `admin_log`;
CREATE TABLE `admin_log` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`controller_id` VARCHAR(20) DEFAULT NULL COMMENT '控制器ID',
`action_id` VARCHAR(20) DEFAULT NULL COMMENT '方法ID',
`u... |
declare
v_object_id varchar2(100):=apex_application.g_x01;
v_refresh_object AMB_OBJECT%ROWTYPE;
v_output CLOB;
--v_object_info_url varchar2(4000):='';
begin
IF NOT AMB_UTIL_OBJECT.is_validate(v_object_id,:CURRENT_VERSION) THEN
raise_application_error( -20001, 'NOT VALID OBJECT ID.' );
END IF;
AMB_UTIL... |
create or replace package body pkg_OAuthTest is
/* package body: pkg_OAuthTest( ReserveDb)::body */
/* group: Константы */
/* iconst: None_Integer
Число, указываемая в качестве значения параметра по умолчанию, позволяющая
определить отсутствие явно заданного значения.
*/
None_Integer constant integer... |
<reponame>donbellamy/ContentBox<filename>tests/resources/sql/mssql/contentbox-autoincrement.sql
/*
Navicat SQL Server Data Transfer
Source Server : contentbox-mssql
Source Server Type : SQL Server
Source Server Version : 14000800
Source Host : localhost:1433
Source Catalog : contentbo... |
<reponame>sergeev-ms/cuba-component-default-values<gh_stars>1-10
alter table DDCDV_ENTITY_ATTRIBUTE_DEFAULT_VALUE alter column VALUE_ set data type longvarchar ;
|
<filename>fixtures/doctests/ecpg/010/input.sql<gh_stars>0
EXEC SQL INSERT INTO foo (number, ascii) VALUES (9999, 'doodad');
EXEC SQL COMMIT;
|
INSERT INTO "public"."citys" VALUES ('1', '全国', '100010000', '全国', '全国');
INSERT INTO "public"."citys" VALUES ('2', '北京', '101010100', '北京', '北京');
INSERT INTO "public"."citys" VALUES ('3', '上海', '101020100', '上海', '上海');
INSERT INTO "public"."citys" VALUES ('4', '广州', '101280100', '广州', '广州');
INSERT INTO "public"... |
DECLARE @name VARCHAR(max) -- database name
declare @i int --counter for while loop
declare @maxIdid int --for while loop
declare @sql nvarchar(max) --for dynamic sql
DECLARE @Return INT --for error handling
set nocount on
if object_id('tempdb..#tempDBName') is not null
drop table #tempDBName
if objec... |
;
WITH
-- ------------------------------------------------------------------------------------------------------------------------------------
ones AS ( SELECT * FROM (VALUES (0), (1), (2), (3), (4),(5), (6), (7), (8), (9)) AS numbers(x) )
-- -----------------------------------------------------------------------------... |
<reponame>CBranagan/Employee-Tracker
USE employee_DB;
INSERT INTO department (name)
VALUES ('Engineer'), ('Manager'), ('Legal'), ('Sales');
INSERT INTO employeerole (employeerole, department_id)
VALUES ('Lawyer', 3),
('Lead Engineer', 1),
('Manager', 2),
('Lead Salesman', 4),
('Lawyer', 3),
('Software Engineer', ... |
-- 1.5.5 Consultas multitabla (Composición interna)
# 1. Devuelve un listado con los datos de todas las alumnas que se han matriculado alguna vez en el Grado en Ingeniería Informática (Plan 2015).
select p1.* from persona p1
inner join alumno_se_matricula_asignatura m1 on m1.id_alumno = p1.id
inner join asignatura... |
INSERT INTO `supplier` (name) VALUES
('SUPPLIER1'),
('SUPPLIER2'),
('SUPPLIER3');
INSERT INTO `product_category` (name, description) VALUES
('NAME1', 'DESCRIPTION1'),
INSERT INTO `product` (name) VALUES
('PRODUCT1'),
('PRODUCT2'),
INSERT INTO `location` (name) VALUES
('HERE'),
('THERE... |
CREATE VIEW [dbo].[ViewDebtsTransactions]
AS SELECT
dbo.Transactions.Id as TransactionId,
dbo.Transactions.Type as TransactionType,
dbo.Transactions.Date as TransactionDate,
dbo.Transactions.Amount as TransactionAmount,
dbo.Debts.Id as DebtId,
dbo.Contracts.Id as ContractId,
dbo.Contracts.Name as Contrac... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.