sql stringlengths 6 1.05M |
|---|
create table server_instances
(
id integer not null
constraint server_instances_pk
primary key,
app_name varchar(128) not null,
host_name varchar(64) not null,
host_address varchar(64) not null,
os_name varchar(64),
... |
<reponame>RTR-Netztest/open-rmbt
BEGIN;
CREATE TABLE "cov_bb_fixed" (uid serial,
"raster" varchar (50),
"operator" varchar (200),
"technology" varchar (50),
"dl_max_mbit" real,
"ul_max_mbit" real,
"date" varchar (50)
);
ALTER TABLE "cov_bb_fixed" ADD PRIMARY KEY (uid);
CREATE INDEX cov_bb_fixed_raster_idx
ON cov_... |
insert into shops(name, shop_id) values
('Shop One', '00000000-0000-0000-0000-000000000000'),
('Shop Two', '00000000-0000-0000-0000-000000000001')
|
<gh_stars>0
-- --------------------------------------------------------
-- Хост: 127.0.0.1
-- Версия сервера: 5.5.27 - MySQL Community Server (GPL)
-- ОС Сервера: Win32
-- HeidiSQL Версия: 7.0.0.4390
-- ------------------------------------------------... |
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
DROP TABLE AR_EC_TMP CASCADE CONSTRAINTS PURGE
/
--
-- AR_EC_TMP (Table)
--
CREATE TABLE AR_EC_TMP ( PROBE_SET_ID VARCHAR2(100 BYTE) NOT NULL, EC VARCHAR2(20 BYTE) NOT ... |
INSERT INTO public.rol(nombre_rol)
VALUES ('Tecnico recursos hidricos');
INSERT INTO public.rol( nombre_rol)
VALUES ('Coordinador recursos hidricos');
INSERT INTO public.rol( nombre_rol)
VALUES ('Consulta recursos hidricos');
INSERT INTO public.rol( nombre_rol)
VALUES ('Tecnico riego y drenaje');
INS... |
# Data
SELECT DATE_FORMAT(t.trans_date, "%Y-%m") AS "month", t.country,
COUNT(DISTINCT t.id) AS "trans_count",
COUNT(DISTINCT CASE WHEN t.state = "approved" THEN t.id END) AS "approved_count",
SUM(t.amount) AS "trans_total_amount",
SUM(CASE WHEN t.state = "approved" THEN t.amount ELSE 0 END... |
/*Select all the cities that ends with vowels*/
SELECT DISTINCT CITY FROM STATION
WHERE CITY REGEXP "^.*[aeiou]$"
|
<gh_stars>0
create Database hotel;
create table roombooking (RoomNo varchar(10), Roomtype varchar(10), fare varchar(10),arrivaldate date,departuredate date,booked varchar(5));
create table CustomerRegistration (CustomerId varchar(10), name varchar(30),number varchar(15),email varchar(40),country varchar(40));
create ta... |
SELECT id, name
FROM departments
WHERE EXISTS
(SELECT *
FROM sales
WHERE sales.price > 98 AND departments.id = sales.department_id ); |
<gh_stars>0
-- who2g.sql
-- <NAME>
-- <EMAIL>
-- show user sessions for all instances
-- included PDB/CDB/ROOT for 12c
@clears
@oversion_major
define v_10gopts = ''
var v_10gopts varchar2(10)
define v_12copts = ''
var v_12copts varchar2(10)
declare
i_oversion integer := '&&v_oversion_major';
begin
if i_oversio... |
<reponame>NikolaNikushev/SQL-NoSQL-comparison
select project_number, max(overspentamount)
from (
select project_number, sum((replace(overspentamount, ',', '.') || 0)::float) as overspentamount
from bpi_final.permit_entity pe2
group by 1
) as result
group by 1
order by 2 DESC limit 1
|
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 17, 2020 at 10:45 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<filename>data/open-source/extracted_sql/TeenQuotes_website.sql
create index favorite_quotes_quote_id_index on "favorite_quotes
create index password_reminders_email_index on "password_reminders
CREATE TABLE IF NOT EXISTS `quote_tag` ( `quote_id` int(10) unsigned NOT NULL, `tag_id` int(10) unsigned NOT NULL, KEY `quote... |
<reponame>tushartushar/dbSmellsData
CREATE TABLE test_authors ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, email TEXT NOT NULL, password TEXT DEFAULT '', test_position_id INTEGER NOT NULL)
CREATE TABLE `test_videos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `file` varchar(255) NOT NULL, `test_holder_id` int(11) DEFAULT ... |
<reponame>WalterWillis/BRCTC_GraphingProgram_2017-2018<gh_stars>1-10
declare @dataPerSecond int = 7775; --7775 is the calculate amount of data per second
declare @currentPos int = @dataPerSecond;
declare @endPos int = (select max(ID) FROM [Main].[dbo].[June21LaunchData] );
declare @count int = 1;
while @currentPos < @... |
#
# TABLE STRUCTURE FOR: user
#
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL,
`email` varchar(128) NOT NULL,
`image` varchar(128) NOT NULL,
`password` varchar(256) NOT NULL,
`role_id` int(11) NOT NULL,
`is_active` int(1) NOT NULL,
... |
<reponame>IGandarillas/cuba
-- $Id$
-- Description: drop SALT column in SEC_USER
alter table SEC_USER drop column SALT^ |
<filename>tables.pg.sql
create table slow_sql.slow_sql
(
id int not null auto_increment
primary key,
user varchar(200) null,
host varchar(100) null,
query_time double null,
lock_time double null,
rows_sent int null,
rows_examined int null,
`sql` text null,
`when` datetime default CURRENT_TIMESTAMP not null,
... |
<gh_stars>1-10
-- auto-generated definition
CREATE TABLE sensor_data
(
sensor_id VARCHAR(255) NULL,
output FLOAT NULL,
server_timestamp DATETIME NULL,
CONSTRAINT FK_sensor_data_sensor_id
FOREIGN KEY (sensor_id) REFERENCES sensors (sensor_id)
)
ENGINE = InnoDB;
CREATE INDEX FK_se... |
<reponame>ZiCheng-Web/springboot-shiro<filename>sql/testshiro.sql
CREATE TABLE t_user(
id INT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(20),
password VARCHAR(50),
perms VARCHAR(50)
);
insert into t_user(username, password,perms) values('admin','123','user:add),('zhangsan','123','user:update'),('lisi','123'... |
TRUNCATE TABLE sdd.sources;
INSERT INTO sdd.sources (id, desc_short, desc_long, contributors, unit, unit_long, unit_agg_long, sample_interval, agg_mode, has_reference_values)
VALUES(
"score_lemgodigital_passerby",
"Passantenfrequenz in Lemgo",
"Entspricht der Anzahl an Passanten in Lemgo",
"Fraunhofer IOSB-IN... |
<gh_stars>10-100
WITH CTE_VOCAB_MAP AS (
SELECT c.concept_code AS SOURCE_CODE, c.concept_id AS SOURCE_CONCEPT_ID, c.concept_name AS SOURCE_CODE_DESCRIPTION, c.vocabulary_id AS SOURCE_VOCABULARY_ID,
c.domain_id AS SOURCE_DOMAIN_ID, c.CONCEPT_CLASS_ID AS SOURCE_CONCEPT_CLASS_ID,
... |
<reponame>bongani-m/chatengine
ALTER TABLE `chat_participants` ADD `groupcall_default_join_as_peer_type` INT NOT NULL DEFAULT '0' AFTER `left_at`, ADD `groupcall_default_join_as_peer_id` BIGINT NOT NULL DEFAULT '0' AFTER `groupcall_default_join_as_peer_type`;
ALTER TABLE `dialogs` ADD `theme_emoticon` VARCHAR(64) NOT N... |
<reponame>iuskye/SREWorks
drop index uk_deploy_config on am_deploy_config;
alter table am_deploy_config
add constraint uk_deploy_config
unique (api_version, app_id, env_id, type_id);
|
-- @testpoint: 插入特殊字符
drop table if exists test_clob_055;
create table test_clob_055(c_clob clob);
insert into test_clob_055 values('$@#%……&*()');
select * from test_clob_055;
drop table test_clob_055;
|
CREATE TABLE IF NOT EXISTS `season` (
`id` INT NOT NULL auto_increment,
`createdAt` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`season` INT,
`startedAt` INT,
`endedAt` INT,
PRIMARY KEY (`id`)
); |
<reponame>got-git-group/SproutSpy
insert into sproutspy_db.PlantZone (plant_id, zone_id, created_at, updated_at) values (26, 3, '2022-03-31 16:37:08', '2022-03-31 16:37:08');
insert into sproutspy_db.PlantZone (plant_id, zone_id, created_at, updated_at) values (1, 19, '2022-03-31 16:37:08', '2022-03-31 16:37:08');
inse... |
with cte as (
select id,number, row_number() over (PARTITION BY "number" order by id) as e
from comics.information
)
delete from comics.information inf
using cte
where cte.id = inf.id
and cte.e = 2 |
<reponame>lasyard/coding<filename>sql/sql-test-data-mysql.sql
-- tbl_course
DROP TABLE IF EXISTS tbl_course;
CREATE TABLE tbl_course (
c_id int NOT NULL AUTO_INCREMENT,
c_name varchar(60) DEFAULT NULL,
PRIMARY KEY (c_id)
);
INSERT INTO tbl_course
VALUES (1, 'English'),
(2, 'Chinese'),
(3, 'Maths'),
... |
CREATE TABLE language_phoneme_tbl
(
id bigint NOT NULL,
version bigint NOT NULL DEFAULT 1,
createdwhen timestamp without time zone NOT NULL DEFAULT now(),
modiwhen timestamp without time zone NOT NULL DEFAULT now(),
language_id bigint ... |
<filename>database/database.sql
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 08, 2015 at 09:53 AM
-- Server version: 5.6.17
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `ticket`
--
-- --... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 08, 2022 at 05:44 AM
-- Server version: 5.5.68-MariaDB
-- PHP Version: 7.4.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 11, 2019 at 12:00 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<filename>simulation/0-Configuracion/create.sql
CREATE TABLE Configuracion (
id NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY,
nombre_variable VARCHAR2(50) NOT NULL,
valor_numerico NUMBER,
valor_string VARCHAR2(200),
valor_fecha TIMESTAMP,
CONSTRAINT configuracion_pk PRIMARY KEY (id)
); |
<reponame>jamesfulford/tutoring-database-scripts
DROP ROLE accountant;
DROP ROLE administrator;
DROP ROLE marketer;
DROP ROLE researcher;
DROP ROLE tutor;
|
<filename>SQL/Task1/SQLQuery_9.sql
/*1
SELECT name,
surname,
university,
bdate,
address
FROM Students
WHERE course=3 and faculty='IAM' and (University='YSU' or University='AUA') and bdate ='1999-09-28' and address like '%Yerevan%'
*/
/*3
SELECT stud_num,
name,
surname,
bdate
FROM Students
WHERE bdate betw... |
<reponame>linkian209/ian-card
ALTER TABLE card ADD COLUMN color VARCHAR(32) NOT NULL DEFAULT 'light'; |
<filename>installer/imports/ads.sql
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 14, 2019 at 06:37 PM
-- Server version: 5.7.25-0ubuntu0.16.04.2
-- PHP Version: 7.0.33-0ubuntu0.16.04.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_... |
<gh_stars>1-10
{{ config(
materialized = 'table',
indexes=[
{'columns': ['today','row_id'], 'type': 'brin'},
]
)}}
with tmp as (select *
from {{ref('train_2_raw')}}
),
tmp_1 as (
select
row_id,
tsv.key::date as date,
tsv.value::float4 as nclick
from
tmp,jsonb_each_text(ts) as tsv
)
selec... |
CREATE PROCEDURE [ZFP_DEL_WORK_FLOWS]
@P_PRIMARY_KEY int,
@P_ErrorCode int OUTPUT
AS
SET NOCOUNT ON
-- DELETE an existing row from the table.
DELETE FROM ZOP_WORK_FLOWS
WHERE
WORK_FLOW_ID = @P_PRIMARY_KEY
-- Get the Error Code for the statement just executed.
SELECT @P_ErrorCode=@@ERROR
|
-- exclusive.test
--
-- execsql {
-- ATTACH 'test3.db' as aux2;
-- }
ATTACH 'test3.db' as aux2; |
delimiter $$
CREATE TABLE `quest_completer` (
`Entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`Enabled` mediumint(1) unsigned DEFAULT '1',
`Commenti` text,
PRIMARY KEY (`Entry`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1$$;
delimiter $$
CREATE TABLE `quest_completer_logs` (
`guidPlayer` int(11) unsigned N... |
-- Then update all tables
ALTER TABLE `areatrigger_involvedrelation`
CHANGE COLUMN `id` `id` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Identifier',
CHANGE COLUMN `quest` `quest` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Quest Identifier';
ALTER TABLE `areatrigger_tavern`
CHANGE COLUMN `id` `id` me... |
<filename>037_odbc_adapters_for_solid_db_at_work/create_037_solid_db_tables.sql
-- =========================================================================================
-- This SQL file creates the tables required for testing an SPL example that
-- shows the odbc adapters connectivity to the SolidDB tables.
--
-- ... |
ALTER TEXT SEARCH CONFIGURATION pg
DROP MAPPING FOR email, url, url_path, sfloat, float;
|
CREATE TABLE group_in_curated_list (
curated_list_id INTEGER NOT NULL,
group_id INTEGER NOT NULL,
added_by_user_account_id INTEGER NOT NULL,
added_at timestamp without time zone NOT NULL,
removed_by_user_account_id INTEGER NULL,
removed_at timestamp without time zone NULL,
PRIMARY KEY(curated_list_id,group_id,a... |
--combination with join statements
create table stddev_int1(id1 int not null, col1 char(20));
insert into stddev_int1 values(1, 'aaa'), (2, 'bbb'), (3, 'ccc'), (4, 'ddd'), (5, 'eee'), (6, 'fff');
insert into stddev_int1 values(1, 'fff'), (2, 'eee'), (3, 'ddd'), (4, 'ccc'), (5, 'bbb'), (6, 'aaa');
create table stdd... |
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字left(保留),作为数据库名
--关键字不带引号-失败
create database left;
--关键字带双引号-成功
create database "left";
drop database if exists "left";
--关键字带单引号-合理报错
create database 'left';
--关键字带反引号-合理报错
drop database if exists `left`;
create database `left`;
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 06 Apr 2019 pada 09.16
-- Versi server: 10.3.13-MariaDB
-- Versi PHP: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.127.12
-- Generation Time: Sep 20, 2020 at 12:42 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... |
use masksmalldb
ALTER TABLE dbo.Customer
ALTER COLUMN LastName ADD MASKED WITH (FUNCTION = 'partial(2,"XXX",0)');
CREATE USER [devlogin] FOR LOGIN [devlogin]
GRANT SELECT ON dbo.customer TO devlogin;
|
<reponame>userid/acoustid-server
ALTER TABLE track_mbid_source ALTER submission_id DROP NOT NULL;
|
<reponame>DonColon/Yummy-Yogurt<filename>docs/SQL Files/dropSequence.sql
drop sequence AddressSequence;
drop sequence UserSequence;
drop sequence CategorySequence;
drop sequence IngredientSequence;
drop sequence YogurtSequence;
drop sequence RatingSequence;
drop sequence OrderSequence;
drop sequence OrderItemSequence; |
<reponame>getwasim/egov-smartcity-suites-test
INSERT INTO eg_action (id, name, url, queryparams, parentmodule, ordernumber, displayname, enabled, contextroot, version, createdby, createddate, lastmodifiedby, lastmodifieddate, application)
VALUES (nextval('seq_eg_action'), 'advertisementrenewalcreate', '/advertisement/... |
<filename>4-Sum-and-Count.sql
-- Question 1
SELECT SUM(population)
FROM world
-- Question 2
SELECT DISTINCT continent FROM world
-- Question 3
SELECT SUM(gdp) FROM world WHERE continent = 'Africa'
-- Question 4
SELECT COUNT(name) FROM world WHERE area >= 1000000
-- Question 5
SELECT SUM(population) FROM world
WHER... |
<filename>scripts/presto/query/query_09.sql
EXPLAIN ANALYZE WITH countries AS (
SELECT
ne_id,
ST_GeomFromBinary(geometry) AS geometry
FROM
${NE_TABLE_NAME}
), points AS (
SELECT
ST_Point(lon, lat) AS point
FROM
${GDELT_TABLE_NAME}
WHERE (-85 < lat) AND (lat < 85)
)
SELECT
countri... |
<gh_stars>1-10
begin
for rec in (select table_name
from user_tables
where regexp_like(table_name, '^(BADGE|DEPARTMENT|JOB_TITLE|EMPLOYEE)')
)
loop
execute immediate 'drop table '||rec.table_name||' CASCADE CONSTRAINTS PURGE';
end loop;
end;
/
CREATE TABLE "BADGE" (... |
<reponame>fffy2366/image-processing
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50623
Source Host : localhost
Source Database : images
Target Server Version : 50623
File Encoding : utf-8
Date: 06/20/2016 16:54:03 PM
*/
SET NAMES utf8;
SET ... |
exec sspm.CreatePF
@PFName = 'pf_int',
@Start = '2020-01-01 00:00:00',
@Stop = '2020-01-02 06:00:00',
@Step = '30 minutes',
@DataType = 'datetime',
@PSName = 'ps_int',
@PSAllTo = 'PRIMARY',
@PrintOnly= 1
select *
from sspm.PS_Layout
delete from sspm.PS_Layout where LayoutName = 'test_2... |
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<PASSWORD>';
DROP DATABASE IF EXISTS tracker_db;
CREATE DATABASE tracker_db;
USE tracker_db;
CREATE TABLE employee(
id INT AUTO_INCREMENT NOT NULL,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
role_id INT,
ma... |
<filename>src/object_is_rotating.function.sql
DROP FUNCTION IF EXISTS conreality.object_is_rotating(text) RESTRICT;
-- Determines whether this object has a nonzero angular velocity.
--CREATE FUNCTION conreality.object_is_rotating(object_uuid text) RETURNS boolean AS $$
-- return nil -- unknown
--$$ LANGUAGE pllua STA... |
# --- !Ups
alter table ride add column rating int;
# --- !Downs
alter table ride drop column rating;
|
drop schema app_private;
|
-- Table: public.pacient
-- DROP TABLE public.pacient;
CREATE TABLE public.pacient
(
id integer NOT NULL DEFAULT nextval('pacient_id_seq'::regclass),
id_card_pacient character varying(20) COLLATE pg_catalog."default",
name_pacient character varying(50) COLLATE pg_catalog."default",
lastname_pacient ch... |
<reponame>v1rusr0ck/inventario
/*
-- Query:
-- Date: 2016-04-25 14:49
*/
INSERT INTO `producto` (`cod_producto`,`nom_producto`,`des_producto`,`tipo_producto`) VALUES ('2160','AGUILA LIG R 330 CC X 30','CANASTA AGUILA LIGHT',1);
INSERT INTO `producto` (`cod_producto`,`nom_producto`,`des_producto`,`tipo_producto`) VALUE... |
<reponame>TheWizardAndTheWyrd/ArcanaERP<gh_stars>0
CREATE TABLE [dbo].[OrderLineItem] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[OrderTransactionId] INT NULL,
[OrderLineItemTypeId] INT NULL,
[ProductInstanceId] INT ... |
<reponame>strk/nz-buildings
-- Deploy nz-buildings:buildings_bulk_load/functions/added to pg
BEGIN;
--------------------------------------------
-- buildings_bulk_load.added
-- Functions:
-- added_delete_bulk_load_outline (delete from added by bulk_load_outline_id)
-- params: integer bulk_load_outline_id
--... |
--change the type of a blob column to other types
create class coo(
col1 blob,
col2 blob,
col3 blob,
col4 blob,
col5 blob,
col6 blob,
col7 blob,
col8 blob,
col9 blob,
col10 blob,
col11 blob,
col12 blob,
col13 blob,
... |
<filename>Mercury.Database/Mercury.Database.Environment/Schema Objects/Schemas/dbo/Tables/Indexes/LabResult.LabResult_ReportedDateLoinc.index.sql
CREATE INDEX [LabResult_ReportedDateLoinc]
ON [dbo].[LabResult] ([ReportedDate],[Loinc])
INCLUDE ([LabResultId],[MemberId],[ProviderId]) |
-- DROP DATABASE IF EXISTS freqtable;
CREATE DATABASE freqtable OWNER = postgres
ENCODING = 'UTF8' TABLESPACE = pg_default CONNECTION LIMIT = -1;
|
<filename>sql/interpolation_method-data.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.4
-- Dumped by pg_dump version 13.3
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT ... |
<gh_stars>0
UPDATE `[db_prefix]countries` SET `lat` = 41.4097, `lng` = 21.687, `failed` = 0 WHERE `country` = 'MK';
UPDATE `sys_modules` SET `version` = '1.0.1' WHERE `uri` = 'map_profiles' AND `version` = '1.0.0';
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 11, 2020 at 03:01 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
<filename>ta_zulfikar.sql
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Generation Time: Sep 21, 2021 at 01:08 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
--:CONNECT SERVER3
--USE master
--GO
--SET NOCOUNT ON
--------------------------------------------------------------------------------------------------------------------
----[ CHANGE DATABASE RECOVERY MODEL TO FULL
--ALTER DATABASE [AdventureWorks] SET RECOVERY FULL WITH NO_WAIT
--GO
-------------------------------... |
--------------------------------------------------------------------------------------------------
-- Role
--------------------------------------------------------------------------------------------------
IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'Role')
BEGIN
CREATE TABLE Role (
... |
<filename>test/integration/sql/prepare.oracle.sql
BEGIN
BEGIN
EXECUTE IMMEDIATE 'DROP TABLE "MovieCast"';
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
BEGIN
EXECUTE IMMEDIATE 'DROP TABLE "MovieDetails"';
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
... |
<reponame>PikachuPikachuHAHA/leetcode-2
use leetcode;
drop table if exists Employee;
create table Employee(Id int, Name varchar(20), Salary int, DepartmentId int);
insert into Employee values
(1, "Joe", 70000, 1),
(2, "Henry", 80000, 2),
(3,"Sam", 60000, 2),
(4,"Max", 90000, 1),
(5, "Janet", 69000, 1),
(6, "Randy", 850... |
USE [WaitCollect]
GO
/****** Object: StoredProcedure [dbo].[TrendBytesReadPrSec] Script Date: 28-09-2014 14:41:10 ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TrendBytesReadPrSec]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[TrendBytesReadPrSec]
GO
/****** Object: Store... |
<reponame>danieldiamond/gitlab-analytics<gh_stars>1-10
{{ config({
"unique_key": "event_surrogate_key"
})
}}
{%- set event_ctes = ["project_created",
"user_created"
]
-%}
WITH project_created AS (
SELECT
creator_id AS user_id,
TO_DATE(p... |
alter table pluginrepository
add unique index (name); |
<reponame>nickaiva/Eshop
begin
momnpop.update_product(
28,
'Leather coat',
189,
4,
'<product>
<summary>Made of fine velvet and silk!</summary>
<description>Available colours are brown, black and white</description>
<dimensions>
<long-val>0,35</long-val>
<long-unit>metres</long-unit>
... |
<filename>sql/biginttest.sql
CREATE FUNCTION int64_minus_one(value bigint)
RETURNS bigint AS $$
return value - 1;
$$ LANGUAGE pllua;
select int64_minus_one(9223372036854775807);
|
<gh_stars>0
select COUNT(DISTINCT c_boolean), 100 from alltypes;
|
DELETE FROM tickets;
DELETE FROM events;
DELETE FROM visitors;
DELETE FROM sponsors;
DELETE FROM admins;
INSERT INTO admins(
id, email, name, password, role, status)
VALUES (1, '<EMAIL>', 'Supper Admin', 'supper', 'ROLE_SUPPER', 'enable');
INSERT INTO sponsors(
id, contact_person, email, name, password, phone, status)... |
<reponame>BHFDSC/CCU002_03<gh_stars>0
-------------------------------------------------------
SELECT
2 AS step,
'vaccine records and event post 8th Dec 2020' AS criteria,
COUNT(*) AS n_alf,
SUM(out_any_my... |
use acid_${HIVE_USER};
drop table if exists raw_3_dataset;
drop table if exists acid_3_ymd_dataset;
drop table if exists acid_3_ym_dataset;
create external table if not exists raw_3_dataset (
event_load_time STRING,
filename STRING,
id STRING,
status STRING,
status_comment STRING,
event_real_start STRING,... |
<reponame>pacitu/springBootExample
CREATE TABLE user (
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
date_of_birth VARCHAR(255) NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL... |
<reponame>ViktorPet/ogledit
UPDATE `blog_categories` SET `name` = 'Новини' WHERE `blog_categories`.`name` = 'Дизайн';
UPDATE `blog_categories` SET `name` = 'Лукс' WHERE `blog_categories`.`name` = 'Изкуство';
UPDATE `blog_categories` SET `name` = 'Фотографски истории' WHERE `blog_categories`.`name` = 'Иновации';
DELETE... |
UPDATE button SET flavor_text=CONCAT("One of the best known and most respected mathematicians of the 20th century, <NAME>rdő", CHAR(59), "s (air-dish) wrote or co-authored 1,475 papers. As he put it, \"A mathematician is a machine for turning coffee into theorems.\"") WHERE name="<NAME>";
UPDATE button SET flavor_t... |
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/KEYWORDS/both/Opengauss_Function_Keyword_Both_Case0022.sql
-- @testpoint:opengauss关键字Both(保留),作为用户组名
--关键字不带引号-合理报错
drop group if exists Both;
create group Both with password '<PASSWORD>';
--关键字带双引号-成功
drop group if exists "Both";
create group "Both" wi... |
<gh_stars>0
CREATE TABLE [Users]
(
[Id] BIGINT PRIMARY KEY IDENTITY,
[Username] VARCHAR(30) UNIQUE NOT NULL,
[Password] VARCHAR(26) NOT NULL,
[ProfilePicture] VARBINARY(MAX),
CHECK (DATALENGTH([ProfilePicture])<=900000),
[LastLoginTime] DATETIME2,
[IsDeleted] BIT NOT NULL
)
... |
CREATE TABLE comments (
comment_id SERIAL PRIMARY KEY,
comment text
)
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 04, 2019 at 12:24 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 5.6.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<filename>src/main/resources/db/migration/V1_18__LAA_CASELOAD_DATA.sql
insert into LAA_CASELOADS (CASELOAD_ID, LOCAL_AUTHORITY_CODE, ACTIVE_FLAG) values ('ACI', 'ACI', 'Y');
insert into LAA_CASELOADS (CASELOAD_ID, LOCAL_AUTHORITY_CODE, ACTIVE_FLAG) values ('ADMINI', 'ADMINI', 'Y');
insert into LAA_CASELOADS (CASELOAD_I... |
<gh_stars>0
CREATE TABLE `iwalker_activity` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_name` varchar(20) NOT NULL,
`content` varchar(200) NOT NULL,
`location` varchar(50) NOT NULL COMMENT '地理位置经纬度字符串',
`location_name` varchar(50) NOT NULL,
`like_num` int(11) DEFAULT '0',
`extra` text DEFAULT N... |
<reponame>gustavodomina/bibliotecaLaravel<filename>script_bd/biblioteca-20200622-1450.sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jun 22, 2020 at 05:52 PM
-- Server version: 5.7.24
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO... |
<gh_stars>0
USE bew_db;
INSERT INTO products (product_name, department_name, price, stock_quantity) VALUES
("The Meaning of Life", "Necessities", 42, 0),
("Fluffy Towel", "Toiletries", 9.99, 5453),
("BEW T-Shirt", "Apparel", 19.99, 45312),
("Teddy Bear (18 in.)", "Toys", 14.99, 4823),
("Banana", "Produce", .50, 435),
... |
-- phpMyAdmin SQL Dump
-- version 4.7.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 03, 2018 at 06:16 PM
-- Server version: 10.1.26-MariaDB-0+deb9u1
-- PHP Version: 7.0.27-0+deb9u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.