sql stringlengths 6 1.05M |
|---|
# Author: <NAME>
select name from students where marks > 75 order by right(name,3),id asc;
|
-- AlterTable
ALTER TABLE "Business" ADD COLUMN "status" "WhitelistStatus";
-- AlterTable
ALTER TABLE "cad" ADD COLUMN "businessWhitelisted" BOOLEAN NOT NULL DEFAULT false;
|
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 13, 2020 at 05:30 PM
-- Server version: 5.7.32
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!401... |
<gh_stars>1-10
SELECT ca.name, SUM(pr.amount) AS SUM
FROM products pr
LEFT JOIN categories ca ON ca.id = pr.id_categories
GROUP BY ca.name |
<reponame>dram/metasfresh<filename>backend/de.metas.swat/de.metas.swat.base/src/main/sql/postgresql/system/40-sw01_swat/5499270_sys_gh4450_M_InventoryLine_LineCounting_Window.sql
-- 2018-08-13T18:56:45.972
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD... |
<reponame>Gigelf-evo-X/evo-X<gh_stars>1-10
--
-- Table structure for table `vehicle_data`
--
DROP TABLE IF EXISTS `vehicle_data`;
CREATE TABLE `vehicle_data` (
`entry` mediumint(5) unsigned NOT NULL,
`flags` mediumint(8) unsigned NOT NULL default '0',
`Spell1` mediumint(8) unsigned NOT NULL default '0',
`Spell... |
<reponame>alexavila150/luciddb<filename>farrago/initsql/createSalesSchema.sql
-- $Id$
-- This script creates a simple schema used by some of the unit tests.
!set verbose true
-- create local sales schema
create schema sales;
set schema 'sales';
create table depts(
deptno integer not null primary key,
name va... |
<gh_stars>1-10
-- Use this as a template to inject configurations for your publish API endpoint.
INSERT INTO apiconfig (app_package_name, platform, cts_profile_match, basic_integrity, allowed_past_seconds, allowed_future_seconds, allowed_regions, all_regions, ios_devicecheck_team_id_secret, ios_devicecheck_key_id_sec... |
DROP TABLE IF EXISTS `pre__lakecms_ext_case`;
CREATE TABLE `pre__lakecms_ext_case` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`content` varchar(250) NOT NULL COMMENT '案例详情',
`views` varchar(10) DEFAULT NULL COMMENT '浏览量',
`cover` varchar(32) NOT NULL COMMENT '封面',
`description` varchar(250) DEFAULT ... |
-- =================== --
-- Grant Privs --
-- =================== --
GRANT ALL PRIVILEGES ON guid.* TO GUIDAdmin@'localhost' identified by 'GUIDAdminPassword';
GRANT ALL PRIVILEGES ON guid.* TO GUIDAdmin@'%' identified by 'GUIDAdminPassword';
GRANT SELECT,INSERT ON guid.* TO GUIDClient@'localhost' identified ... |
<reponame>lokal-profil/isfdb_site
/*
create_most_reviewed_table.sql is a MySQL script intended to
create a table of most reviewed titles
Version: $Revision: 15 $
Date: $Date: 2017-10-31 16:32:38 -0400 (Tue, 31 Oct 2017) $
(C) COPYRIGHT 2018 Ahasuerus
ALL RIGHTS RESERVED
The copyri... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: mysqlhost.com
-- Generation Time: Apr 05, 2020 at 05:21 PM
-- Server version: 5.7.28-log
-- PHP Version: 7.1.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
/* Create database burgers_db */
DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
/* create burgers_db table */
CREATE TABLE burgers (
/* ID */
id INT NOT NULL AUTO_INCREMENT,
/* Name */
burger_name VARCHAR(200) NOT NULL,
/* Condition */
devoured BOOLEAN NOT NULL DEFAULT FALS... |
CREATE PROCEDURE [dbo].[select_options_upd]
(
@tt select_options_tt READONLY
,@user_id int
)
AS
-- Update Process
UPDATE a
SET code = b.code
,table_name = b.table_name
,condition_text = b.condition_text
,order_by = b.order_by
,text = b.text
,value = b.value
... |
<reponame>lapc506/proyecto-bd1-parque-la-libertad
DELETE FROM TIPOACTIVIDAD;
DELETE FROM ACTIVIDAD;
DELETE FROM CUENTAUSUARIO;
DELETE FROM IMPARTE;
DELETE FROM CURSOXPERIODO;
DELETE FROM PERIODO;
DELETE FROM CURSO;
DELETE FROM TIPODOCUMENTOIDENTIDAD;
DELETE FROM DOCUMENTOIDENTIDAD;
DELETE FROM MATRICULA;
DELE... |
CREATE PROC usp_GetEmployeesSalaryAbove35000
AS
SELECT FirstName, LastName FROM Employees
WHERE Salary>35000 |
<filename>Dataware house Database SQL Files/Facts/Second Loads/Lendings/DW_Fact_Tran_BorrowedBooks_Second_SP.sql<gh_stars>1-10
-----------------###### DW Fact Tran BorrowedBooks Second SP ######---------------
USE LibraryDW
GO
CREATE OR ALTER PROCEDURE DW_Fact_Tran_BorrowedBooks_Second_SP
AS
BEGIN
CREATE TABLE ... |
INSERT INTO `icasus_entidad` (`id`, `orden`, `nombre`, `etiqueta`, `etiqueta_mini`, `web`, `id_madre`, `codigo`, `anotaciones`, `objeto`, `ict`, `frecuencia`, `inicio`, `fin`, `es_organica`, `mapa`)
VALUES
(1, NULL, 'Biblioteca Galáctica', 'BG00', 'BibGal', NULL, 0, 'B00', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NU... |
/* ================================================
* Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restric... |
<gh_stars>100-1000
-- fts3near.test
--
-- db eval {
-- INSERT INTO t1(content) VALUES('A X B C D A B');
-- }
INSERT INTO t1(content) VALUES('A X B C D A B'); |
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:lock.sql ln:31 expect:true
LOCK TABLE lock_tbl1 IN SHARE UPDATE EXCLUSIVE MODE NOWAIT
|
<reponame>kira-oussama/futurelab
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 28, 2020 at 12:12 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
<reponame>MessageCloud/jasmin
CREATE TABLE IF NOT EXISTS submit_log (
`msgid` VARCHAR(45) PRIMARY KEY,
`source_connector` VARCHAR(15),
`routed_cid` VARCHAR(30),
`source_addr` VARCHAR(40),
`destination_addr` VARCHAR(40) NOT NULL CHECK (`destination_addr` <> ''),
`rate` ... |
create table person
(
id SERIAL PRIMARY KEY,
login character varying(255) NOT NULL UNIQUE,
password character varying(255) NOT NULL
);
insert into person (login, password)
values ('Peter', '<PASSWORD>');
insert into person (login, password)
values ('Ivan', '<PASSWORD>');
insert into person (login... |
<reponame>perspective-Alex/lexibot
create table links
(
id serial primary key, /* todo: consider making id non-numeric, so it would be harder to manually change statistics */
chat_id varchar(20) not null,
word varchar(50) not null,
start_date date not null,
end_date date... |
<reponame>ssisme2019/hugegraph-loader<filename>assembly/static/example/mysql/example.sql
-- MySQL dump 10.13 Distrib 5.6.39, for macos10.13 (x86_64)
--
-- Host: localhost Database: example
-- ------------------------------------------------------
-- Server version 5.6.39
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<reponame>prigaux/esup-signature<filename>src/main/resources/update_1.14.4.sql
-- ajouter une signature favorite pour tout le monde
update user_account set default_sign_image_number = 0 where default_sign_image_number is null;
|
<filename>jdbc/deployment/src/test/resources/custom_import.sql
CREATE TABLE IF NOT EXISTS custom_config (a varchar(255), b varchar(255));
INSERT INTO custom_config (a, b)
VALUES ('greeting.message', 'hello from custom table');
|
-- | after: ddli_a.sql |
<gh_stars>0
/*
Warnings:
- Added the required column `from` to the `Salary` table without a default value. This is not possible if the table is not empty.
- Added the required column `to` to the `Salary` table without a default value. This is not possible if the table is not empty.
- Added the required column ... |
<reponame>adithyack1995/Employee-Management-System<filename>database/employe.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.3.11
-- Generation Time: Jun 08, 2021 at 03:37 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"... |
<filename>ClimateChangeAnalysis/sql/Scripts/Insert_CityResponses.sql
insert into city_responses (
question_id,
city_id,
survey_year,
response,
comments
)
select cq.id,
csv.account_number,
csv.year_reported_to_cdp,
csv.response_answer,
csv.comments
from city_questions_csv as csv
left outer join city_questions a... |
<reponame>eugene-mindset/Poli-Interactive<filename>queries/q6.sql<gh_stars>0
-- How many times has a vote been entirely partisan?
With PartyBill AS
(
SELECT bill_num, congress, party
FROM (Bill JOIN Sponsor USING (bill_num, congress)) JOIN Role USING (member_id, congress)
),
PartyVote AS
(
SELECT bill_num,... |
<reponame>Raniel-Ferreira/SQL-Training
CREATE TABLE pessoas {
id INT NOT NULL PRIMARY KEY AUTOINCREMENT;
nome VARCHAR (50) NOT NULL;
nascimento DATE;
}
INSERT INTO pessoas (nome,nascimento) VALUES ("Raniel", "1993 05 11")\
INSERT INTO pessoas (nome,nascimento) VALUES ("Luana", "1990 10 17")\
INSERT... |
select concat('insert into maw.login_history (
id,
user_id,
username,
attempt_time,
login_activity_type_id,
login_area_id
)
values (',
id, ', ',
COALESCE(user_id, 'NULL'), ', ',
COALESCE(CONCAT('''', REPLACE(LOWER(username), '''', ''''''), ''''), 'NULL'), ', ',
'''', attempt_t... |
/*
Object: dbo.Tran_STA
Description: Process all STA records for of a given transaction.
STA:STN
*/
CREATE PROCEDURE [dbo].[Tran_STA]
@HeaderID AS bigint
AS
SET NOCOUNT ON;
BEGIN TRY
EXEC dbo.Query_210 @HeaderID;
END TRY
BEGIN CATCH
DECLARE @e nvarchar(MAX),@v int,@s int; SELECT @e = ERROR_MESSAGE(),@v =... |
INSERT INTO departments (name)
VALUES
('Sales'),
('Engineering'),
('Finance'),
('Legal');
INSERT INTO roles (title, salary, departments_id)
VALUES
('Sales Lead', 80000, 1),
('Salesperson', 75000, 1),
('Lead Engineer', 100000, 2),
('Software Engineer', 90000, 2),
('Accountant', 110000, 3),
('Legal Team Lead', 200000, 4... |
CREATE TABLE IF NOT EXISTS `sessions` (
`id` VARCHAR(32) NOT NULL DEFAULT '',
`data` MEDIUMTEXT NULL,
`last_activity` BIGINT(20) UNSIGNED NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE INDEX `id` (`id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;
|
CREATE PROCEDURE [dbo].[UpdateSchedule] @id int, @judge int, @startTime smalldatetime, @minutes smallint, @classType char(1), @prefHighLow char(1)
AS
BEGIN
update schedule set judge=@judge, starttime=@starttime, minutes=@minutes, classtype=@classtype, prefHighLow=@prefHighLow
where id=@id
if @@rowcount=0
inse... |
<filename>Exam 16.04.2019/12. Wrong Data.sql<gh_stars>1-10
/*
Create a user defined stored procedure, named usp_CancelFlights
The procedure must cancel all flights on which the arrival time is before the departure time.
Cancel means you need to leave the departure and arrival time empty.
*/
create procedure us... |
# case_exercises.sql
# 1. Write a query that returns all employees (emp_no), their department number, their start date, their end date, and a new column 'is_current_employee' that is a 1 if the employee is still with the company and 0 if not.
USE employees;
SELECT emp_no, dept_no, hire_date, to_date,
IF(to_date > c... |
CREATE TABLE PERSON (
id int ,
first_name text,
last_name text
);
insert into PERSON (first_name, last_name) values ('first', 'Second');
insert into PERSON (first_name, last_name) values ('roger', 'federer');
insert into PERSON (first_name, last_name) values ('rafal', 'nadal'); |
alter table intervention
add column incoming_referral_distribution_email text not null default '__no_data__';
update intervention i
set incoming_referral_distribution_email = p.incoming_referral_distribution_email
from service_provider p join dynamic_framework_contract c on p.id = c.prime_provider_id
where i.dynam... |
-- Drop old address import table
DROP TABLE HPA.ADDRESSES;
GO
-- Also drop the old OIC table which was superseded
DROP TABLE HPA.OFFENCES_IN_CUSTODY;
GO
------------------------------------------------------------------------------------------------------------------------
-- Recreate a new address import table
CREA... |
-- file:rowsecurity.sql ln:610 expect:true
EXPLAIN (COSTS OFF) UPDATE t1 SET b = b || b WHERE f_leak(b)
|
CREATE TABLE IF NOT EXISTS public.parameter_instance
(
id UUID NOT NULL,
data_processor_instance_id UUID,
name VARCHAR(255),
type INTEGER,
value VARCHAR(255),
parameter_id UUID,
CONSTRAINT ... |
<filename>db/migrations/bcda/000001_initial_schema.up.sql<gh_stars>10-100
--
-- bcda schema as of 2020-10-01
--
BEGIN;
--
-- PostgreSQL database dump
--
--
-- Name: acos; Type: TABLE; Schema: public;
--
CREATE TABLE IF NOT EXISTS public.acos (
uuid uuid NOT NULL,
name text NOT NULL,
created_at timestam... |
DELIMITER /
DROP PROCEDURE IF EXISTS p
/
CREATE PROCEDURE p ()
BEGIN
DECLARE version INT;
SELECT VER_NBR INTO version FROM KRIM_PERM_T WHERE NMSPC_CD = 'KC-PD' AND NM = 'Maintain Questionnaire Usage';
IF version <= 0 THEN
SET @alter_ver_nbr := 'UPDATE KRIM_PERM_T SET VER_NBR = 1 WHERE NMSPC_CD = '... |
ALTER TABLE character_db_version CHANGE COLUMN required_11391_01_characters_auction required_11436_01_characters_character_queststatus bit;
ALTER TABLE character_queststatus
ADD COLUMN itemcount5 int(11) unsigned NOT NULL default '0' AFTER itemcount4,
ADD COLUMN itemcount6 int(11) unsigned NOT NULL default '0' AFT... |
-- 2100 Number of persons with at least one device exposure , by device_concept_id
--HINT DISTRIBUTE_ON_KEY(stratum_1)
SELECT
2100 AS analysis_id,
CAST(de.device_concept_id AS VARCHAR(255)) AS stratum_1,
CAST(NULL AS VARCHAR(255)) AS stratum_2,
CAST(NULL AS VARCHAR(255)) AS stratum_3,
CAST(NULL AS VARCHAR(255)) ... |
<filename>doc/181111.sql
/*
Navicat MySQL Data Transfer
Source Server : 本地
Source Server Version : 50553
Source Host : localhost:3306
Source Database : tpauth
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-11-01 19:27:22
*/
... |
INVALID TEST
Functions are not supported by Cockroach DB
-- https://www.cockroachlabs.com/docs/stable/sql-feature-support.html |
<gh_stars>0
PROMPT Does not invoke setup procedure when setup procedure name for a test is null
--Arrange
declare
simple_test ut_test := ut_test(
a_object_name => 'ut_example_tests'
,a_name => 'ut_passing_test'
);
begin
simple_test.before_test_list := ut_executables(ut_executable(user, 'ut_example_tests... |
INSERT INTO taskrunner_test2_test2 VALUES (1,2);
INSERT INTO taskrunner_test2_test2 VALUES (1,1);
|
BEGIN;
ALTER TABLE blocks
ALTER COLUMN block_gaslimit TYPE BIGINT USING block_gaslimit :: BIGINT;
ALTER TABLE blocks
ALTER COLUMN block_gasused TYPE BIGINT USING block_gasused :: BIGINT;
ALTER TABLE blocks
ALTER COLUMN block_time TYPE BIGINT USING block_time :: BIGINT;
ALTER TABLE blocks
ALTER COLUMN block_r... |
CREATE TABLE tasks (
"_id" INTEGER PRIMARY KEY,
"title" TEXT NOT NULL,
"interval" INTEGER NOT NULL,
"flags" INTEGER NOT NULL,
"next_fire_at" INTEGER,
"last_started_at" INTEGER,
"display_order" INTEGER)
|
<reponame>resultdoo/planning-poker<gh_stars>1-10
CREATE TABLE "public"."scrum_cards"("id" bigserial NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "card_value" bpchar, PRIMARY KEY ("id") ); COMMENT ON TABLE "public"."scrum_cards" IS E'Values for game.';
|
-- Revert cif:util_functions/verify_function_not_present from pg
begin;
drop function cif_private.verify_function_not_present(text);
commit;
|
-- Google login has used 131 characters. 64 is not enough.
ALTER TABLE oauth2tokendata ALTER COLUMN accesstoken TYPE text;
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2018-06-30 08:06:02
-- 服务器版本: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40... |
<gh_stars>0
-- @testpoint:指定REPLACE,参数个数变化,不会替换原有函数,而是会建立新的函数
--预置条件,创建函数
drop function if exists func_add_sql0(integer, integer);
CREATE FUNCTION func_add_sql0(integer, integer) RETURNS integer
AS 'select $1 + $2;'
LANGUAGE SQL
IMMUTABLE
RETURNS NULL ON NULL INPUT;
/
--指定REPLACE,参数个数为1,原有函数不会替换,会创建... |
prompt --application/pages/page_00125
begin
-- Manifest
-- PAGE: 00125
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2021.04.15'
,p_release=>'21.1.6'
,p_default_workspace_id=>123132524645685789
,p_default_application_id=>666
,p_default_id_offset=>0
,p_default_owner=>'DEV'
);
wwv_flow_ap... |
START TRANSACTION;
CREATE TABLE "Educations" (
"Id" integer GENERATED BY DEFAULT AS IDENTITY,
"Description" text NULL,
"Name" character varying(100) NOT NULL,
"Skill" integer NULL,
"WealthMultiplier" integer NULL,
"WorldId" integer NOT NULL,
"CreatedAt" timestamp with time zone NOT NULL DE... |
/* creating tables */
CREATE TABLE Cliente (
CPF varchar(11) unique,
CNH varchar(11) unique,
Nome varchar(255),
Endereco varchar(255),
CreditCard varchar(16),
DataDeNascimento varchar(10),
NecessidadesEspeciais tinyint(1) default null,
DataDeCadastro varchar(10),
DataDeAlteracao varc... |
<filename>u6228414.sql
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 27, 2022 at 03:51 AM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
CREATE USER "idos-api" WITH NOSUPERUSER PASSWORD '<PASSWORD>';
CREATE DATABASE "idos-api" WITH OWNER "idos-api";
GRANT ALL ON DATABASE "idos-api" TO "idos-api";
|
DROP TABLE books;
CREATE TABLE IF NOT EXISTS books (
id SERIAL PRIMARY KEY,
title VARCHAR(255),
author VARCHAR(255),
isbn VARCHAR(255),
image_url VARCHAR(255),
description TEXT
);
INSERT INTO books (title, author, isbn, image_url, description)
VALUES('feed Sherry','Razan','do immediately after getting hom... |
CREATE DATABASE employees;
USE employees;
DROP TABLE IF EXISTS department;
DROP TABLE IF EXISTS role;
CREATE TABLE department
(
id INTEGER NOT NULL
AUTO_INCREMENT,
name VARCHAR
(30) NOT NULL,
PRIMARY KEY
(id)
);
CREATE TABLE role
(
id INTEGER NOT NULL
AUTO_INCREMENT,
... |
SET foreign_key_checks = 0;
#-------------------------------------------------------------------------------
# omega_addresses table
#-------------------------------------------------------------------------------
DROP TABLE IF EXISTS omega_addresses;
CREATE TABLE omega_addresses (
id BIGINT UNSIGNED NOT NULL AUTO_I... |
<filename>dbo/Views/ViewSettings.sql
CREATE VIEW dbo.ViewSettings
AS
SELECT [SettingID],
[Name],
[Value],
[Description],
[Modified]
FROM [dbo].[Setting]; |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 27, 2016 at 05:54 AM
-- Server version: 5.6.25
-- PHP Version: 5.6.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 27, 2019 at 01:41 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
DELETE
FROM `{table}`
WHERE `{column}` NOT IN (SELECT `hUserId` FROM `hUsers`)
|
<filename>src/test/resources/walthread.test_19.sql
-- walthread.test
--
-- db eval { INSERT INTO t1 VALUES(nextwrite, sum1, sum2) }
INSERT INTO t1 VALUES(nextwrite, sum1, sum2)
|
-- file:privileges.sql ln:718 expect:true
drop table mytable
|
<gh_stars>1000+
update users set age = 11 where id = 1;
update users set age = 22 where id = 2;
update users set age = 33 where id = 3;
CREATE TABLE t(x INTEGER, y, z, PRIMARY KEY(x ASC)); |
<reponame>Control-Alt-Sistemas/sqlserver-kit
/*
Original link: https://www.sqlskills.com/blogs/jonathan/tracking-problematic-pages-splits-in-sql-server-2012-extended-events-no-really-this-time/
Author: <NAME>
*/
-- If the Event Session exists DROP it
IF EXISTS (SELECT 1
FROM sys.server_event_sessions
... |
DROP TABLE IF EXISTS emails;
DROP TABLE IF EXISTS members;
|
<gh_stars>0
-- TENANT1
SUDO USE TENANT 'tenant1';
-- database check.
CREATE DATABASE IF NOT EXISTS tenant1_db;
SHOW DATABASES;
-- TENANT2
SUDO USE TENANT 'tenant2';
SHOW DATABASES;
-- TENANT1
SUDO USE TENANT 'tenant1';
DROP DATABASE tenant1_db;
|
<gh_stars>1-10
-- NB: Incompatible schema change. Normally we would follow a more incremental
-- process (as exemplified in users/db/migrations/006 to 010), but currently
-- there are no data in production and only one row in dev.
-- The existing id, type columns are the id & type of the entity that owns the
-- config... |
DROP TABLE IF EXISTS OFFENDER_EVENT;
CREATE TABLE OFFENDER_EVENT
(
OFFENDER_EVENT_ID BIGSERIAL NOT NULL,
OFFENDER_NO VARCHAR( 10) NOT NULL,
EVENT_ID BIGINT NOT NULL,
EVENT_DATE DATE NOT NULL,
EVENT_TYPE... |
--
-- osm_poi_point
--
INSERT INTO osm_poi_point (
osm_id, level, indoor, layer, sport, name, subclass, mapping_key,
geometry, tags
) VALUES
-- POI located at lon=1, lat=1
(
5589618289,
14,
TRUE,
0,
'sport',
'Ocean Studio',
'cafe',
'amenit... |
<filename>bam/oracle_v2/mod_bam_boolean.sql
--
-- BAM boolean expressions.
--
CREATE TABLE mod_bam_boolean (
boolean_id int NOT NULL,
name varchar(255) NOT NULL,
expression text NOT NULL,
bool_state boolean NOT NULL default 1,
comments text default NULL,
activate boolean NOT NULL default 0,
PRIMARY KEY ... |
-- 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 not... |
<gh_stars>100-1000
DROP TABLE IF EXISTS events CASCADE;
DROP TABLE IF EXISTS events_source CASCADE;
CREATE TABLE events (
uuid UUID NOT NULL PRIMARY KEY,
timestamp TIMESTAMP WITH TIME ZONE NOT NULL,
archived BOOLEAN DEFAULT FALSE,
escalated BOOLEAN DEFAULT FALSE
);
CREATE TABLE event... |
autocommit off;
select product.product_code, product.descr, quantity, expiry_date
from joe.dated_inventory_c d order by 1,2,3,4;
delete from joe.dated_inventory_c
where expiry_date < '1/1/1993';
select product.product_code, product.descr, quantity, expiry_date
from joe.dated_inventory_c d order by 1,2,3,4;
rollbac... |
<filename>Database/SetVacancy.sql
-- -------------------------------------------------------------
-- TablePlus 3.11.0(352)
--
-- https://tableplus.com/
--
-- Database: HeadHunter
-- Generation Time: 2021-05-08 16:11:39.3250
-- -------------------------------------------------------------
CREATE PROCEDURE [dbo].[SetVa... |
-- MySQL Script generated by MySQL Workbench
-- Sat May 23 10:20:58 2020
-- Model: New Model Version: 1.0
-- 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='TR... |
<filename>src/test/regress/data/pgbench.sql
\setrandom aid 1 1000
\setrandom anum 1 1000
START TRANSACTION;
insert into lightcn_t1 values (:aid, :anum);
select * from lightcn_t1 where id = :aid;
update lightcn_t1 set num = num+1 where id = :aid;
delete from lightcn_t1 where id = :aid;
COMMIT TRANSACTION;
|
-----------------------------------------------------
-- Schema UniversoLeitura
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema UniversoLeitura
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `UniversoLeit... |
CREATE TABLE IF NOT EXISTS `#__gals` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`alias` varchar(255) NOT NULL,
`mainphoto` text NOT NULL,
`state` tinyint(3) NOT NULL DEFAULT '0',
`language` varchar(7) NOT NULL,
`ordering` int(11) NOT NULL,
`checked_out` int(10) unsigned NOT N... |
create or alter procedure mmsdm_proc.InsertParticipantRegistrationParticipantcategory1
@file_log_id bigint,
@data nvarchar(max)
as begin
insert into mmsdm.ParticipantRegistrationParticipantcategory1(
file_log_id,
[participantcategoryid],
[description],
[lastchanged]
)
select
@file_log_id,
d.[participantcatego... |
<filename>bin/starttm.sql
create database starttm;
use starttm;
insert into tipo_evento(nome,cbtm,peso)values ("Escolar", true,0);
insert into tipo_evento(nome,cbtm,peso)values ("Estadual", true,1);
insert into tipo_evento(nome,cbtm,peso)values ("Copa das Federações", true,2);
insert into tipo_evento(nome,cbtm,peso)v... |
<gh_stars>1-10
DROP TABLE IF EXISTS trades;
DROP TABLE IF EXISTS currencies;
DROP TABLE IF EXISTS origins;
DROP TABLE IF EXISTS traders;
CREATE TABLE traders (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
ext_id INT UNSIGNED NOT NULL,
PRIMARY KEY( id ),
UNIQUE( ext_id ) ) ENGINE=InnoDB CHARSET=utf8;
CREA... |
<filename>practicas/practica-1/bastidas_rojas_sanchez_practica_1.sql
DROP TABLE LUGAR;
DROP TABLE CONTRATO;
DROP TYPE coordenadas;
DROP TYPE fecha_inc_fin;
CREATE OR REPLACE TYPE fecha_inc_fin AS OBJECT(
fecha_inicio DATE,
fecha_fin DATE,
total NUMBER(10,2),
STATIC FUNCTION validar_fecha_final(fech... |
<reponame>hhudson/code_standard_tracking<gh_stars>0
prompt --application/pages/page_00027
begin
-- Manifest
-- PAGE: 00027
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2021.10.15'
,p_release=>'21.2.2'
,p_default_workspace_id=>9690978936188613
,p_default_application_id=>130
,p_default_i... |
CREATE TABLE [dbo].[TBL_CONFIGURACION_TERMINAL]
(
[TERMINAL_ID] INT NOT NULL,
[CANTIDAD_QUEJAS_SANCION] INT NOT NULL DEFAULT 5,
[COSTO_PARQUEO_HORA] DECIMAL(18, 2) NOT NULL DEFAULT 500,
[COSTO_PARQUEO_DIA] DECIMAL(18, 2) NOT NULL DEFAULT 4000,
[MONTO_INICIAL_TARJETA] DECIMAL(18, 2) NOT NULL DEF... |
insert into Recipe_table values(10,'Indian','Some direction here','some ingredient','Chicken'); |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50644
Source Host : localhost:3306
Source Database : douyin_com
Target Server Type : MYSQL
Target Server Version : 50644
File Encoding : 65001
Date: 2020-02-27 14:33:08
*/
SET FOREIGN_KEY_CHECKS=0;
-... |
<reponame>OurRootsOrg/cms-server<filename>db/create_db.sql<gh_stars>1-10
create database cms;
create user ourroots with encrypted password 'password';
create user ourroots_schema with encrypted password 'password';
grant all privileges on database cms to ourroots_schema;
-- grant all privileges on database ourroots to ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.