sql stringlengths 6 1.05M |
|---|
SELECT * FROM "monsters" |
RENAME TABLE menu TO menu_items;
|
<filename>db.sql
CREATE TABLE user (
id INT AUTO_INCREMENT,
username VARCHAR(32) DEFAULT NULL,
password VARCHAR(32) DEFAULT NULL,
PRIMARY KEY (id)
);
INSERT INTO user (username, password) VALUES ('root', '<PASSWORD>');
|
\. ./../../current_mysql/4.0/dml/KRC_DML_31001_KRNS_DOC_HDR_T_0TSD.sql
commit;
exit
|
--
-- Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
--
-- Licensed under the Universal Permissive License v 1.0 as shown
-- at http://oss.oracle.com/licenses/upl
--
Rem
Rem NAME
Rem pls_sample3.sql - <one-line expansion of the name>
Rem DESCRIPTION
Rem <short description ... |
<gh_stars>0
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1)
-- Dumped by pg_dump version 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standar... |
CREATE KEYSPACE indexes WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
CREATE TABLE indexes.meta (
id text PRIMARY KEY,
root text,
num_leaf_entries int,
num_meta_entries int
) WITH default_time_to_live = 0
AND transactions = {'enabled': 'false'... |
<filename>src/main/bd/script.sql
create table usuario(
id serial,
login varchar(30),
senha varchar(30),
primary key (id)
); |
select count(*) from no_nulls3 where rowid > 1
98
|
# Update moved sources
# --- !Ups
update sources set url = 'http://gizmodo.com/rss' where url = 'http://feeds.gawker.com/gizmodo/full';
update sources set url = 'http://lifehacker.com/rss' where url = 'http://feeds.gawker.com/lifehacker/full';
update sources set url = 'https://medium.freecodecamp.org/feed' where url ... |
CREATE TABLE IF NOT EXISTS N_CASES (
CASE_ID INTEGER PRIMARY KEY AUTOINCREMENT,
UUID CHAR(36) NOT NULL,
STATUS_ID INTEGER NOT NULL,
EXECUTION_CONDITION_TYPE VARCHAR(20) NULL,
EXECUTION_CONDITION_DIGEST VARCHAR(4000) NOT NULL,
EXEC_COND_FULFIL... |
<reponame>tharangar/k8s-webserver
DROP TABLE `security_user_logins`;
-- db_patches
DELETE FROM `db_patches` WHERE `issue` = 'POCOR-3396';
|
DROP table IF EXISTS global_charsets;
DROP VIEW IF EXISTS global_charsets;
CREATE VIEW global_charsets AS select * from appshore_global_v23.charsets;
DROP table IF EXISTS global_countries;
DROP VIEW IF EXISTS global_countries;
CREATE VIEW global_countries AS select * from appshore_global_v23.countries;
DROP table ... |
<filename>fixtures/doctests/array/015/input.sql
SELECT array_upper(schedule, 1) FROM sal_emp WHERE name = 'Carol';
array_upper
-------------
2
(1 row)
|
<reponame>Ryan-Fitchett/Test
CREATE PROCEDURE [dbo].[UpdateApprenticeshipStatuses]
@id BIGINT,
@paymentStatus SMALLINT,
@agreementStatus SMALLINT,
@agreedOn DATETIME
AS
UPDATE [dbo].[Apprenticeship]
SET PaymentStatus = @paymentStatus,
AgreementStatus = @agreementStatus,
AgreedOn = @agreedOn
WHERE Id = @id |
<filename>172/n13e5.sql
--Do the following using the database movies:
--use LEFT JOIN to
--return the first name of all customers, the rental id of any rental transaction they're associated with, and also show the name of the movie they rented if applicable.
--can you use a subquery to get the same result?
SELECT
... |
<reponame>radytrainer/magic<filename>smile_db.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 20, 2020 at 08:13 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET ... |
DROP TABLE IF EXISTS location;
CREATE TABLE location (
id SERIAL PRIMARY KEY,
search_query VARCHAR(255),
formatted_query VARCHAR(255),
latitude VARCHAR(255),
longitude VARCHAR(255)
);
DROP TABLE IF EXISTS weather;
CREATE TABLE weather (
id SERIAL PRIMARY KEY,
time VARCHAR(30),
forecast VARCHAR(255)
);... |
SELECT
CountryName,
CountryCode,
CASE
WHEN CurrencyCode = 'EUR' THEN 'Euro'
ELSE 'Not Euro'
END AS Currency
FROM Countries
ORDER BY CountryName |
<gh_stars>0
-- delivery_item_kits --
CREATE TABLE `phppos_delivery_item_kits` (
`delivery_item_kits_id` int(11) NOT NULL AUTO_INCREMENT,
`delivery_id` int(11) DEFAULT NULL,
`item_kit_id` int(11) DEFAULT NULL,
`quantity` decimal(23,10) DEFAULT NULL,
PRIMARY KEY (`delivery_item_kits_id`),
KEY `delivery_id` (`... |
<filename>SQL/functions.sql
CREATE OR REPLACE FUNCTION regAccount(Login VARCHAR(30), Name VARCHAR(30),
Surname VARCHAR(30),
Birth DATE,
Password VARCHAR(50),
Blocked BOOLEAN = FALSE)
RETURNS INTEGER AS $$
DECLARE numOfDublicates INTEGER;
DECLARE accId_ret INTEGER;
BEGIN
SELECT COUNT(accId) Into numOfDublica... |
<reponame>Geodan/gtfs2postgres
/**
Match stations and stops to all routes that fall within xx distance of the route
Runs surprisingly fast! (+- 1 min.)
**/
DROP TABLE IF EXISTS osmosis_nl.stations_on_routes;
CREATE TABLE osmosis_nl.stations_on_routes As
SELECT a.id, upper(a.tags -> 'name') stationname, b.routeid, b.... |
CREATE DOMAIN smalls as varchar(20);
CREATE DOMAIN mediums as varchar(100);
CREATE DOMAIN bigs as varchar(1000);
CREATE DOMAIN int_positive as Integer check (value > 0);
CREATE DOMAIN real_positive as Real check (value > 0);
CREATE TABLE Email (
value mediums not null,
primary key (value)
);
CREATE TABLE Img ... |
<gh_stars>1-10
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='Project' and xtype='U')
BEGIN
CREATE TABLE Project (
ProjectId UNIQUEIDENTIFIER PRIMARY KEY
, ProjectCode NVARCHAR(20) NOT NULL
, Name NVARCHAR(256) NOT NULL
, Description NVARCHAR(1024) NOT NULL
, Status NVARCHAR(2... |
<gh_stars>1-10
DROP TABLE IF EXISTS `XXX_content_manipulator_tabelle`; ##b_dump##
CREATE TABLE `XXX_content_manipulator_tabelle` (
`cm_id` int(11) NOT NULL auto_increment ,
`cm_zahl` int(11) NULL ,
`cm_string` varchar(255) NULL ,
`cm_text` text NULL ,
PRIMARY KEY (`cm_id`)
) ENGINE=MyISAM ; ##b_dump## |
BEGIN;
CREATE TABLE IF NOT EXISTS settings (
usertype text,
userid text,
settings jsonb,
PRIMARY KEY(usertype, userid)
);
CREATE TABLE IF NOT EXISTS auditlog (
entitytype text,
entityid text,
metadata jsonb,
PRIMARY KEY(entitytype, entityid)
);
CREATE INDEX IF NOT EXISTS auditlog_teamid ON auditlog (... |
<filename>data/en/postgres/subdivisions_TV.postgres.sql<gh_stars>10-100
CREATE TABLE subdivision_TV (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_TV" ("id", "name", "level") VALUES (E'TV-FUN', E'Funafuti', E'island council');
INSERT INTO "subdivision... |
CREATE TABLE subdivision (country VARCHAR(2) NOT NULL, id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision" ("country", "id", "name", "level") VALUES (E'AD', E'AD-07', E'Andorra la Vella', E'parish');
INSERT INTO "subdivision" ("country", "id", "name", "lev... |
CREATE TABLE tbl_user (
UserId uniqueidentifier NOT NULL PRIMARY KEY,
UserName nvarchar(255) NOT NULL,
PasswordHash varbinary(1024),
PasswordSalt varbinary(1024),
Email varchar(255),
PhoneNo varchar(16),
Role varchar(255)
);
|
<reponame>sldevand/activapi.fr
DROP TABLE IF EXISTS 'thermostat_modes';
CREATE TABLE IF NOT EXISTS 'thermostat_modes' (
'id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
'nom' TEXT,
'consigne' INTEGER,
'delta' INTEGER
);
|
<gh_stars>10-100
-- file:privileges.sql ln:1138 expect:true
REVOKE SELECT ON lock_table FROM regress_locktable_user
|
<filename>exercise1/sql/athena_create_table.sql
-- Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
-- SPDX-License-Identifier: MIT-0
-- Demonstrates how to create a table in Athena that can be used
-- to query event data written to S3 by Segment's S3 destination.
-- This is helpful in exploring... |
<filename>sql/1_basic_select/13_weatherobservationstation8.sql
-- Solution to [Weather Observation Station 8](https://www.hackerrank.com/challenges/weather-observation-station-8/problem)
SELECT
DISTINCT CITY
FROM
STATION
WHERE
(CITY REGEXP '^[AEIOU]') AND
(CITY REGEXP '[AEIOU]$')
|
-- Inserindo dados na Tabela Anunciante --
desc Anunciante;
INSERT INTO Anunciante VALUES ('ANU001', 'Brahma');
INSERT INTO Anunciante VALUES ('ANU002', 'Gol');
INSERT INTO Anunciante VALUES ('ANU003', 'MasterCard');
INSERT INTO Anunciante VALUES ('ANU004', 'TCL'); |
-- One to Many mapping
create table student(
ID bigint(20) not null auto_increment,
student_name varchar(256) null default null,
guide_id bigint(20) not null,
primary key (ID)
);
create table guide(
ID bigint(20) not null auto_increment,
guide_name varchar(256) null default null,
primary key (ID)
);
ALTER TABLE stu... |
# -- !Ups
CREATE TABLE TaxPaymentHistory (
user_id INTEGER NOT NULL,
year INTEGER NOT NULL,
season INTEGER NOT NULL,
action INTEGER NOT NULL,
updater_user_id INTEGER NOT NULL,
when_ TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id, year) REFERENCES Tax(user_id, year),
FOREIGN KEY (upd... |
MERGE INTO [dbo].[ApiMetadata] AS Target
USING (VALUES
(1, 'Identity', 0, 1, 0, 'SQL Server', '', 'T4')
)
AS Source ([ApiMetadataId], [ApiName], [ApiMajorVersion], [ApiMinorVersion], [ApiPatchVersion], [ApiDatabaseServer], [ApiDatabaseName], [ApiDatabaseConnectionString], [ApiCodeGenerationTool])
ON Target.[ApiMetad... |
<reponame>itohiro73/reladomo-scala
drop table if exists OBJECT_SEQUENCE;
create table OBJECT_SEQUENCE
(
SEQUENCE_NAME varchar(64) not null,
NEXT_VALUE bigint
);
|
DELIMITER ;;
DROP PROCEDURE IF EXISTS `PresentationHistoryUpdate`;;
CREATE PROCEDURE `PresentationHistoryUpdate`(IN `p_resetStartYear` varchar(6) CHARACTER SET 'utf8mb4')
begin
DECLARE `v_startDate` bigint(10);
DECLARE `v_endDate` bigint(10);
DECLARE `v_period` varchar(6);
DECLARE `v_now` DATE;
DECLARE `v_p... |
<reponame>Alejandro-Fuste/Python_Javascript_ReimbursementApp
drop table if exists employee, manager, category,reimbursement;
create table employee(
employee_id serial not null primary key,
first_name varchar (30) not null,
last_name varchar (30) not null,
company_role varchar (30) not null,
user_name varchar (30)... |
-- @testpoint: opengauss关键字similar(保留),作为字段数据类型(合理报错)
--前置条件
drop table if exists similar_test cascade;
--关键字不带引号-合理报错
create table similar_test(id int,name similar);
--关键字带双引号-合理报错
create table similar_test(id int,name "similar");
--关键字带单引号-合理报错
create table similar_test(id int,name 'similar');
--关键字带反引号-合理报错
cre... |
-- @testpoint:opengauss关键字cursor(非保留),作为数据库名
--关键字不带引号-成功
drop database if exists cursor;
create database cursor;
drop database cursor;
--关键字带双引号-成功
drop database if exists "cursor";
create database "cursor";
drop database "cursor";
--关键字带单引号-合理报错
drop database if exists 'cursor';
create database 'cursor';
--关键字带反... |
<reponame>izabelacloud/Recipe-Parade<filename>db/schema.sql
DROP DATABASE IF EXISTS recipe_parade;
CREATE DATABASE recipe_parade; |
ALTER TABLE "scenes"
ADD COLUMN duration integer,
ADD COLUMN director TEXT;
ALTER TABLE "scene_fingerprints"
ADD COLUMN duration int;
|
<gh_stars>0
CREATE SEQUENCE MonitorAlwaysOnTimeSeries AS INT START WITH 1 INCREMENT BY 1 CYCLE CACHE 100;
GO
|
<gh_stars>0
create or replace function gera_log_produtos()
returns trigger as
$$
Begin
if TG_OP = 'INSERT' then
insert into logs_produtos (
alteracao
,data_alteracao
,id_new
,produto_codigo_new
,produto_nome_new
,produto_valor_new
,produto_situacao_new
,data_criacao_new
,data_atualizacao_new
,... |
<filename>create_database.sql
DROP TABLE IF EXISTS reservation_service;
DROP TABLE IF EXISTS reservation;
DROP TABLE IF EXISTS hotel_service;
DROP TABLE IF EXISTS hotel_room;
DROP TABLE IF EXISTS room;
DROP TABLE IF EXISTS hotel;
DROP TABLE IF EXISTS service;
DROP TABLE IF EXISTS person_permission;
DROP TABLE IF EXISTS... |
<filename>dbscripts/upgrades/10.0.0/mssql_upgrade_10.0.0.sql<gh_stars>0
/***************************************************************************************************
* Script : Update plugin-dossier-sql-store
*
* Author : Blueriq
* Date : 3-3-2017
* Release : 10.0.0
*
***************************... |
<reponame>abcdw/inno
SELECT m.moviename FROM Movies AS m
JOIN Inventory AS i ON m.movieid = i.movieid
JOIN Rentals AS r ON r.tapeid = i.tapeid
WHERE r.duration = (SELECT MAX(duration) FROM Rentals);
|
<reponame>lgcarrier/AFW
SET DEFINE OFF;
CREATE TABLE AFW_23_RECHR
(
SEQNC NUMBER(10),
REF_UTILS NUMBER(10),
DATE_EXECT DATE,
UTILS_CREAT VARCHAR2(123 BYTE),
DATE_CREAT DATE,
UTILS_MODFC VARCHAR2(123 BYTE),
DATE_MODFC DATE,
REF_MODL_RECHR NUMBER(10)
)
LOGGING
NOCO... |
USE [Campus6]
GO
/****** Object: StoredProcedure [custom].[DFinsAction] Script Date: 2021-07-09 12:20:48 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [custom].[DFinsAction] @action_id NVARCHAR(8)
,@action_name NVARCHAR(50) = NULL --Will default from Action Definition
,@people_code_i... |
<reponame>rGunti/DriverLog
-- DRIVER LOG DATABASE
-- Database Reset Script
-- Used to reset the login credentials for the super admin
-- NOTE: This script does not create a schema!
-- NOTE: This script is optimized for MySQL databases!
-- Default Login Credentials are:
-- admin : admin
START TRANSACTION;
UPDATE use... |
PRAGMA user_versi = 200;
PRAGMA secure_delete;
PRAGMA sUcure_delete= 1;
PRAGMA cache_size = 200;
PRAGMA secure_delete 8 200;
PR |
<filename>Chapter11/ch11_05_Multi_table_UPDATE.sql
USE test;
--disable_warnings
DROP TABLE IF EXISTS users;
--enable_warnings
CREATE TABLE users (user varchar(255) primary key, has_logged_in int not null);
INSERT INTO users VALUES ('jdoe', 0), ('monty', 0), ('sakila', 0);
UPDATE users u JOIN logincount l on u.user=... |
alter table "public"."comments" alter column "liked" drop not null;
alter table "public"."comments" add column "liked" bool;
|
/*
Warnings:
- Added the required column `email` to the `guestbook` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "guestbook" ADD COLUMN "email" VARCHAR(256) NOT NULL;
|
create database perfumaria;
use perfumaria;
create table usuario(
id_usuario serial primary key,
nome_usuario varchar(200) not null unique,
email varchar(200) not null unique,
palavra_passe varchar(200) not null,
data_criaccao date not null
);
create table produto (
id_produto serial primary key,
nome_produto ... |
-- MySQL dump 10.13 Distrib 5.5.40, for debian-linux-gnu (i686)
--
-- Host: localhost Database: rodan
-- ------------------------------------------------------
-- Server version 5.5.40-0ubuntu0.12.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARA... |
<reponame>cognizant-softvision/donate-to
INSERT INTO public."ControlType" ("Name", "CreatedBy", "CreatedDate", "UpdateBy", "UpdateDate")
VALUES
('Textbox', 'DataSeed', (SELECT now() at time zone 'utc'), 'DataSeed', (SELECT now() at time zone 'utc')),
('Radio', 'DataSeed', (SELECT now() at time zone 'utc'), 'DataSeed',... |
--
-- subquery tests (ANY and ALL subqueries)
--
CREATE FUNCTION ConsistencyChecker() RETURNS VARCHAR(128)
EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.ConsistencyChecker.runConsistencyChecker'
LANGUAGE JAVA PARAMETER STYLE JAVA;
autocommit off;
autocommit off;
-- create the all type tables
cr... |
# Create Database
# ------------------------------------------------------------
CREATE DATABASE IF NOT EXISTS db_tinyshorturl DEFAULT CHARACTER SET = utf8mb4;
Use db_tinyshorturl;
# Dump of table tb_raw_url
# ------------------------------------------------------------
DROP TABLE IF EXISTS `tb_raw_url`;
-- 原始UR... |
<filename>data-sync-tools-camel/src/test/resources/populate_stop_database_peerA.sql<gh_stars>0
insert into org.Contact (ContactId, DateOfBirth, FirstName, LastName, HeightFt, HeightInch, Picture, PreferredHeight)
values ('42FC5EBC-088D-4DC2-BDBD-D89FA170E5C6', '1992-1-23', 'John', 'Doe', 5, 9, null, 'Metric');
|
# Window options...
window-title Pirates Online Remake
icon-filename pirates.ico
model-path resources/
model-path resources/phase_2
model-path resources/phase_3
model-path resources/phase_4
model-path resources/phase_5
default-model-extension .bam
# Audio and Graphics
preferences-filename config/preferences.json
# ... |
<gh_stars>1-10
BEGIN;
-- With row-level security disabled, all rows in the repo table
-- will be accessible/visible to all roles.
DROP POLICY IF EXISTS sg_repo_access_policy ON repo;
ALTER TABLE repo DISABLE ROW LEVEL SECURITY;
COMMIT;
|
CREATE TABLE IF NOT EXISTS node_managers (
id TEXT NOT NULL,
name TEXT NOT NULL DEFAULT '',
type TEXT NOT NULL DEFAULT '',
credentials TEXT NOT NULL DEFAULT '',
status_type TEXT NOT NULL DEFAULT '',
status_message TEXT NOT NULL DEFAULT '',
PRIMARY KEY (id)
);
ALTER T... |
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 12-04-2016 a las 19:34:37
-- Versión del servidor: 5.6.26
-- Versión de PHP: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
<filename>openGaussBase/testcase/KEYWORDS/Else/Opengauss_Function_Keyword_Else_Case0023.sql
-- @testpoint: opengauss关键字else(保留),作为索引名,部分测试点合理报错
--前置条件,创建一个表
drop table if exists else_test;
create table else_test(id int,name varchar(10));
--关键字不带引号-失败
drop index if exists else;
create index else on else_test(id);
--... |
<reponame>mlegls/serenity
-- Add migration script here
CREATE TABLE todo (
task TEXT NOT NULL,
user_id INTEGER NOT NULL
)
|
select cast(
(
select
UKPRN
from
LearningProvider
for xml auto,
type,
elements
) as varchar(max)) |
<gh_stars>0
CREATE TABLE groups_currency
SELECT
continent_code,
currency_code,
count(currency_code) AS currency_usage
FROM countries
GROUP BY continent_code, currency_code
HAVING currency_usage > 1;
SELECT
allgr.continent_code,
allgr.currency_code,
allgr.currency_usage
FROM
groups_currency... |
-- #### MySQL
-- to create the database
create database calendarapp;
-- to create the table
create table events(
id serial primary key,
user varchar(40),
name varchar(100),
description varchar(255),
local varchar(60),
start_time timestamp,
end_time timestamp
);
create table user(
userId varchar(... |
DROP TABLE IF EXISTS follower;
DROP TABLE IF EXISTS comment;
DROP TABLE IF EXISTS split;
DROP TABLE IF EXISTS activity;
DROP TABLE IF EXISTS user;
CREATE TABLE user (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(30) UNIQUE NOT NULL,
email VARCHAR(50) UNIQUE NOT NULL,
password VARCHAR(30) NOT... |
<reponame>JigeeshaJain/CS532-Database_Management
select title from courses where course# in (select course# from classes where classid in (select classid from enrollments where sid = 'B004')) minus select title from courses where course# in (select course# from classes where classid in (select classid from enrollments ... |
INSERT INTO burgers (burger_name, devoured)
VALUES ('Bacon Cheeseburger', true);
INSERT INTO burgers (burger_name, devoured)
VALUES ('Turkey Burger', false);
INSERT INTO burgers (burger_name, devoured)
VALUES ('Impossible Burger', true); |
<filename>WebIOT/Database/dbo/Stored Procedures/MenuData/SP_MenuData_Get_ById.sql<gh_stars>0
CREATE PROCEDURE [dbo].[SP_MenuData_Get_ById]
@Id bigint
AS
select*from DataMenu
where idMenu = @Id |
-- 1. Create Database
--
-- Create a new (empty) database called "audioscrobbler"
--
CREATE ...
-- 2. Create Table "artist"
--
-- Inside the database "audioscrobbler", create a table called "artist". The table
-- should point to the directory 's3://dimajix-training/data/audioscrobbler/artist_data'
--
-- The table con... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-06-2019 a las 05:39:40
-- Versión del servidor: 10.3.15-MariaDB
-- Versión de PHP: 7.1.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... |
--
DO
$body$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM pg_type JOIN pg_namespace ON typnamespace=pg_namespace.oid WHERE nspname='pwaf' AND typname='http_response'
) THEN
CREATE TYPE pwaf.http_response AS
(content_type pwaf.http_response_content_type,
body text,
status_code pwaf.http_respons... |
<reponame>AlexRogalskiy/DevArtifacts<filename>master/php7/php7/php7-master/mysql/posts.sql
CREATE TABLE posts (
id INT(11) NOT NULL AUTO_INCREMENT,
name TINYTEXT,
url TEXT,
file TINYTEXT,
author TINYTEXT,
author_id INT(11) DEFAULT NULL,
hide ENUM('show','hide') NOT NULL DEFAULT 'show',
putdate DATETIME ... |
<gh_stars>1-10
-- MySQL dump 10.13 Distrib 5.5.46, for Linux (x86_64)
--
-- Host: xiaojoneslu.coplcfbocuwc.ap-southeast-1.rds.amazonaws.com Database: grocery
-- ------------------------------------------------------
-- Server version 5.6.27
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101... |
select id from Organization").and_return(["Id
SELECT Name FROM Account") #=> [#<Account @Id=nil, @Name="Foo", ...>, #<Account @Id=nil, @Name="Bar
SELECT Name FROM Whizbang WHERE Name='steve & me?'
SELECT Text_Label FROM Whizbang
select id from Organization")[0]["Id
SELECT Checkbox_Label FROM Whizbang WHERE Checkbox_Lab... |
<gh_stars>1-10
update eg_installment_master set description='2015-16' where ID_MODULE=(select id from eg_module where name = 'Advertisement Tax' and parentmodule is null) and description='ADTAX/15-16';
update eg_installment_master set description='2016-17' where ID_MODULE=(select id from eg_module where name = 'Adv... |
<gh_stars>1-10
Insert into EG_ACTION (id, name, url, queryparams, parentmodule, ordernumber, displayname, enabled,
contextroot, version, createdby, createddate, lastmodifiedby, lastmodifieddate, application)
values (nextval('SEQ_EG_ACTION'),'TradeLicense report viewer','/reportViewer',
null,(select id from eg_modu... |
<reponame>eddyzhang2018/SQL<gh_stars>1-10
# Problem Statement: https://www.hackerrank.com/challenges/weather-observation-station-2/problem
# Difficulty: Easy
# Score: 15
- # MySQL
SELECT CONCAT(ROUND(SUM(LAT_N),2), ' ', ROUND(SUM(LONG_W),2))
FROM STATION
|
<filename>resources/v1/03_oauth_access_tokens.sql
create table oauth_access_tokens (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
oauth_client_id INT NOT NULL,
access_token VARCHAR(64) NOT NULL,
expires_in MEDIUMINT UNSIGNED NOT NULL,
expires_on DATETIME NOT NULL,
metadata JSON NOT NULL,
created_at D... |
PREPARE createDB FROM CONCAT('CREATE DATABASE IF NOT EXISTS ', @DB);
EXECUTE createDB;
DEALLOCATE PREPARE createDB;
|
-- file:timestamptz.sql ln:278 expect:true
SELECT * FROM TIMESTAMPTZ_TST ORDER BY a
|
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:portals.sql ln:291 expect:true
drop function count_tt1_s()
|
<filename>containers/dotnet-mssql/.devcontainer/mssql/setup.sql
CREATE DATABASE ApplicationDB;
GO |
<reponame>windwiny/Oracle-DBA-tips-scripts
-- +----------------------------------------------------------------------------+
-- | <NAME> |
-- | <EMAIL> |
-- | www.idevelopment.info ... |
-- 2018-11-26T12:26:24.273
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET AD_Reference_ID=14,Updated=TO_TIMESTAMP('2018-11-26 12:26:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3331
; |
<filename>guideline-springboot-batch/src/main/resources/schema-h2.sql
DROP TABLE IF EXISTS people;
CREATE TABLE people
(
person_id BIGINT IDENTITY NOT NULL PRIMARY KEY,
first_name VARCHAR(20) NOT NULL,
last_name VARCHAR(20) NOT NULL,
email_address VARCHAR(20),
birth_day DATE
... |
create procedure ProcWithVariableThatIsWrittenToByAssignmentSet
as
begin
declare @A int -- @A is set. This should NOT be flagged as a problem
update a
set @A = 1
from Table1 a
print isnull(@A, -1)
end |
<filename>jsite-web/src/main/resources/db/sys/jsite_sys_oracle.sql
/* Drop Tables */
DROP TABLE sys_role_office CASCADE CONSTRAINTS;
DROP TABLE sys_user_role CASCADE CONSTRAINTS;
DROP TABLE sys_user CASCADE CONSTRAINTS;
DROP TABLE sys_office CASCADE CONSTRAINTS;
DROP TABLE sys_area CASCADE CONSTRAINTS;
DROP TABLE sys... |
-- Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved.
--
-- This program is licensed to you under the Apache License Version 2.0,
-- and you may not use this file except in compliance with the Apache License Version 2.0.
-- You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/li... |
SET search_path = pg_catalog;
ALTER SCHEMA test_schema OWNER TO fordfrog;
ALTER TYPE public.typ_composite OWNER TO fordfrog;
ALTER DOMAIN public.dom OWNER TO fordfrog;
ALTER SEQUENCE public.test_id_seq OWNER TO fordfrog;
ALTER TABLE public.test OWNER TO fordfrog;
ALTER FUNCTION public.test_fnc(arg character varyi... |
<filename>SQLscrpts/Modify_Table_Turbinerole-20120910.sql
use brihaspati;
insert into TURBINE_ROLE(ROLE_ID, ROLE_NAME,OBJECTDATA) values (8,'teacher_assistant','NULL');
|
<filename>Database/SetActiveUser.sql
-- -------------------------------------------------------------
-- TablePlus 3.11.0(352)
--
-- https://tableplus.com/
--
-- Database: HeadHunter
-- Generation Time: 2021-05-08 16:11:06.6660
-- -------------------------------------------------------------
CREATE PROCEDURE [dbo].[Se... |
-- @testpoint: 插入数据,字段值包含单引号,使用单引号转义,插入成功
--建表
drop table if exists COMPANY;
CREATE TABLE COMPANY(
ID INT PRIMARY KEY NOT NULL,
NAME TEXT NOT NULL,
AGE INT NOT NULL,
ADDRESS CHAR(50),
SALARY REAL,
JOIN_DATE DATE
);
--插入数据,字段值中包含单引号
insert into COMPAN... |
<filename>src/main/resources/db/migration/V20210425232329__First_Commit.sql
create table match_model
(
id varchar(255) not null,
email varchar(255),
game_name varchar(255),
player_one_name varchar(255),
player_two_name varchar(255),
score_left int4 not n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.