sql stringlengths 6 1.05M |
|---|
<filename>scripts/fix_fishpond_url.sql
/*
fix_fishpond_url.sql is a MySQL script intended to fix FishPond URLs
Version: $Revision$
Date: $Date$
(C) COPYRIGHT 2015 Ahasuerus
ALL RIGHTS RESERVED
The copyright notice above does not evidence any actual or
intended publication of such ... |
CREATE DATABASE IF NOT EXISTS `zffsales_struct` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `zffsales_struct`;
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: 127.0.0.1 Database: zffsales_struct
-- ------------------------------------------------------
-- Server version 5.1.56-community
/*... |
<filename>sql-dump/43berega-2016-02-02-22_09_45.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.0.1
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Фев 02 2016 г., 22:09
-- Версия сервера: 5.7.9
-- Версия PHP: 5.6.15-1+deb.sury.org~trusty+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zo... |
<gh_stars>1-10
--use host vars in expressions
--+ holdcas on;
drop table if exists t1;
create table t1(e1 enum ('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday') collate utf8_en_cs, e2 enum('02/23/2012', '12/21/2012') collate utf8_en_cs, e3 enum('11:12:09', '13:13:13') collate utf8_en_cs, e... |
with c1 (n) as (
select 1
union all
select n+1 from (select 1 union all select 1 ) t, c1 where n<4
)
select * from c1 order by 1 asc;
|
<filename>openGaussBase/testcase/SQL/INNERFUNC/rpad/Opengauss_Function_Innerfunc_Rpad_Case0007.sql
-- @testpoint: rpad函数异常测试,合理报错
select rpad('dss','gogogo','111') from sys_dummy;
select rpad(ARRAY[1,2,3],'30','111') from sys_dummy;
select rpad('dss',13,raw) from sys_dummy;
select rpad(13) from sys_dummy; |
INSERT INTO courses (id, title) VALUES (1, 'Biology');
INSERT INTO courses (id, title) VALUES (2, 'Mathematics');
INSERT INTO courses (id, title) VALUES (3, 'Chemistry');
INSERT INTO courses (id, title) VALUES (4, 'Physics');
INSERT INTO courses (id, title) VALUES (5, 'Computer Science');
INSERT INTO courses (id, title... |
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.1.67, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: ird
-- ------------------------------------------------------
-- Server version 5.1.67-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARAC... |
delimiter $$
create trigger for_railway_zones before insert on railway_zones
for each row
begin
if new.zone_id = '' then
signal sqlstate '45000';
end if;
end;$$
delimiter ;
INSERT IGNORE INTO railway_zones (zone_id,zone_name) VALUES (1,"south");
INSERT IGNORE INTO railway_zones (zone_id,zone_name) VALUES (2,"north... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 29, 2021 at 11:44 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 26, 2017 at 11:17 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<gh_stars>0
INSERT INTO envio_comunicacao (id,data_hora_envio,destinatario,mensagem,tipo_comunicacao,status_envio) VALUES ('c68f204c-7d9b-47de-b2ad-c19da3db2a92','2016-01-25 21:34:55.000','<EMAIL>','Mensagem exemplo',1,1) |
<reponame>robert-solomon12/WebService-RMI<filename>SQL File/car_webservice.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 06, 2021 at 03:02 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START... |
CREATE TABLE `customer` (
`customer_name` varchar(50) NOT NULL,
PRIMARY KEY (`customer_name`),
UNIQUE KEY `customer_name_UNIQUE` (`customer_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
CREATE DATABASE TEST
WITH OWNER = postgres;
CREATE DATABASE LOL
WITH OWNER = postgres;
|
CREATE TABLE [adopters] (
[id] INTEGER NOT NULL PRIMARY KEY,
[name] NVARCHAR(55)
);
CREATE TABLE [adoptions] (
[id] INTEGER NOT NULL PRIMARY KEY,
[adopter_id] INTEGER,
[animal_id] INTEGER
);
CREATE TABLE [animals] (
[id] INTEGER NOT NULL PRIMARY KEY,
[specie] NVARCHAR(55),
[adopt... |
<gh_stars>0
-- +goose NO TRANSACTION
-- +goose Up
-- SQL in this section is executed when the migration is applied.
ALTER TABLE builds ADD triggers JSONB;
CREATE INDEX builds_triggers ON builds USING GIN (triggers);
-- +goose Down
-- SQL in this section is executed when the migration is rolled back.
DROP INDEX builds_... |
--
-- Creating a sample table.
--
--
-- Table Tag
--
DROP TABLE IF EXISTS Tag2Question;
CREATE TABLE Tag2Question (
"id" INTEGER PRIMARY KEY NOT NULL,
"questionid" INTEGER NOT NULL,
"tagname" INTEGER NOT NULL,
FOREIGN KEY(questionid) REFERENCES Question(id),
FOREIGN KEY(tagname) REFERENCES Tag(na... |
<filename>5.2.3/Database/Indexes/AFW_12_LIEN_ROLE_APROB_PK.sql
SET DEFINE OFF;
CREATE UNIQUE INDEX AFW_12_LIEN_ROLE_APROB_PK ON AFW_12_LIEN_ROLE_APROB
(SEQNC)
LOGGING
/
|
CREATE database Heroes;
USE Heroes;
CREATE table Users(
id varchar(20) not null,
name varchar(10) not null,
password varchar(50) not null,
point int,
primary key(id)
);
CREATE table Trys(
id varchar(50) not null,
userid varchar(20) not null,
champ varchar(15) not null,
win int not n... |
Use Gringotts
SELECT COUNT(*) as [Count]
FROM WizzardDeposits AS w
SELECT MAX(w.MagicWandSize) AS LongestMagicWand
FROM WizzardDeposits AS w
SELECT w.DepositGroup,
MAX(w.MagicWandSize) AS LongestMagicWand
FROM WizzardDeposits w
GROUP BY w.DepositGroup
SELECT TOP(2) w.DepositGroup
FROM WizzardDeposits w
GROUP BY w.D... |
-- MySQL dump 10.13 Distrib 5.5.52, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: testrail
-- ------------------------------------------------------
-- Server version 5.5.52-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@... |
CREATE TABLE `hFrameworkSites` (
`hFrameworkSiteId`
int(11)
NOT NULL
auto_increment,
`hFrameworkSite`
varchar(255)
NOT NULL
default '',
`hFrameworkSitePath`
varchar(255)
NOT NULL
default '',
`hFrameworkSiteIsDefault`
tin... |
COPY INTO dbo.orders
FROM 'https://feastonazuredatasamples.blob.core.windows.net/feastdatasamples/orders.csv'
WITH
(
FILE_TYPE = 'CSV'
,FIRSTROW = 2
,MAXERRORS = 0
)
|
insert into KRCR_PARM_T (APPL_ID,NMSPC_CD,CMPNT_CD,PARM_NM,PARM_TYP_CD,VAL,PARM_DESC_TXT,EVAL_OPRTR_CD,OBJ_ID)
values ('KC','KC-IP','Document','INSTITUTE_PROPOSAL_OTHER_GROUP','CONFG','OTHER','Other Group','A',sys_guid())
/
COMMIT
/
|
with last_restored as
(
select
databasename = sd.[name]
, sd.[create_date]
, sd.[compatibility_level]
, sd.[collation_name]
, rh.*
, rownum = row_number() over (partition by sd.name order by rh.[restore_date] desc) from
master.sys.databases sd left outer join msdb.dbo.[restorehistory] rh on rh.[destination_da... |
DROP VIEW v_Subj3Student CASCADE;
CREATE OR REPLACE VIEW v_Subj3Student AS
SELECT innerRel.x1 AS att1
FROM (
SELECT ca_0.individual AS x1
FROM concept_assertion ca_0
WHERE ca_0.concept=24
) as innerRel
|
CREATE TABLE apidb.SpliceSiteFeature (
splice_site_feature_id NUMBER(10),
protocol_app_node_id NUMBER(10) NOT NULL,
na_sequence_id NUMBER(10) NOT NULL,
segment_start NUMBER(10) NOT NULL,
segment_end NUMBER(10) NOT NULL,
type VARCH... |
-- ----------------------------
-- Table structure for user_address
-- ----------------------------
DROP TABLE IF EXISTS `user_address`;
CREATE TABLE `user_address` (
`address_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`email` varc... |
<gh_stars>0
postgres=# \d tab
Table "public.tab"
Column | Type | Modifiers
--------+---------+-----------
col | integer |
Indexes:
"idx" btree (col)
"idx_ccnew" btree (col) INVALID
|
ALTER TABLE addons DROP COLUMN app_slug;
ALTER TABLE files DROP COLUMN uses_flash;
ALTER TABLE file_uploads DROP COLUMN is_webapp;
|
<gh_stars>0
GRANT SELECT ON rs_contact_subject TO marketer;
GRANT SELECT ON rs_contact_subject TO tutor;
GRANT ALL ON rs_contact_subject TO administrator;
GRANT SELECT ON rs_contact_subject TO researcher;
|
<reponame>LeeKiri/handlebars-burger
INSERT INTO burgers (burger_name, devoured) VALUES ('Mushroom', false);
INSERT INTO burgers (burger_name, devoured) VALUES ('Curry', false);
INSERT INTO burgers (burger_name, devoured) VALUES ('Beetroot', false);
INSERT INTO burgers (burger_name, devoured) VALUES ('Falafel', false);
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 25-06-2019 a las 18:04:22
-- Versión del servidor: 10.2.25-MariaDB
-- Versión de PHP: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:... |
/* Create database objects for the Moip Integration Sample app (PostgreSQL). */
/* product table */
CREATE SEQUENCE product_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
CREATE TABLE product (
id integer NOT NULL DEFAULT NEXTVAL('product_id_seq'::regclass) PRIMARY K... |
DROP TABLE IF EXISTS `list_sesi`;
CREATE TABLE `list_sesi` (
`id` int NOT NULL AUTO_INCREMENT,
`kuota` int NOT NULL,
`tanggal` date NOT NULL,
`jam_mulai` varchar(6) NOT NULL,
`jam_selesai` varchar(6) NOT NULL,
`gender` char(1) NOT NULL,
`jadwal_mulai` datetime NOT NULL,
`jadwal_selesai` datetime NOT NUL... |
<gh_stars>0
DROP TABLE IF EXISTS `pair`;
CREATE TABLE `pair` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
`source` VARCHAR(64) NOT NULL,
`symbol_id` VARCHAR(64) NOT NULL UNIQUE,
`symbol` VARCHAR(64) NOT NULL,
`base_currency` VARCHAR(64) NOT NULL,
`traded_curr... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Июл 12 2019 г., 21:16
-- Версия сервера: 5.6.43
-- Версия PHP: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
<reponame>Manish-Kumar-Sadhu/health4all_today<filename>h4atoday_db.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jan 07, 2020 at 12:43 PM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZER... |
<filename>BIML.Framework.RDBMS/SemanticInsight.Weave/SemanticInsight.SSISDB/semanticinsight/Stored Procedures/delete_process.sql
create procedure [semanticinsight].[delete_process]
as
begin
delete from [semanticinsight].[process] where process_id > 0
end |
DROP TABLE IF EXISTS source_types;
|
DELETE FROM TEST WHERE ID=2;
|
-- CreateTable
CREATE TABLE `user` (
`id` VARCHAR(191) NOT NULL,
`name` VARCHAR(191) NOT NULL,
`email` VARCHAR(191) NOT NULL,
`password` VARCHAR(191) NOT NULL,
`stripe_customer_id` VARCHAR(191) NOT NULL,
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`updatedAt` DATETIME(3) ... |
-- triggerA.test
--
-- db eval {
-- DELETE FROM result2;
-- CREATE TRIGGER r5d INSTEAD OF DELETE ON v5 BEGIN
-- INSERT INTO result2(a,b) VALUES(old.x, old.b);
-- END;
-- DELETE FROM v5 WHERE x=5;
-- SELECT * FROM result2;
-- }
DELETE FROM result2;
CREATE TRIGGER r5d INSTEAD OF DELETE ON... |
INSERT INTO KRIM_PRNCPL_T (ACTV_IND,ENTITY_ID,LAST_UPDT_DT,OBJ_ID,PRNCPL_ID,PRNCPL_NM,VER_NBR) VALUES ('Y','1132',NOW(), UUID(), '2','kc',1);
|
/*
Navicat Premium Data Transfer
Source Server : 本地
Source Server Type : MySQL
Source Server Version : 50553
Source Host : localhost:3306
Source Schema : tp5
Target Server Type : MySQL
Target Server Version : 50553
File Encoding : 65001
Date: 11/04/2018 10:32:05
*/
... |
alter table three_ds_server_storage.challenge_flow_transaction_info
add column provider_id character varying;
alter table three_ds_server_storage.challenge_flow_transaction_info
add column message_version character varying;
alter table three_ds_server_storage.challenge_flow_transaction_info
add column acs_u... |
CREATE PROCEDURE SP465(OUT MYCOUNT INTEGER) SPECIFIC SP465_123024 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE265;SELECT COUNT(*)INTO MYCOUNT FROM TABLE217;SELECT COUNT(*)INTO MYCOUNT FROM TABLE449;SELECT COUNT(*)INTO MYCOUNT FRO... |
WITH upd AS (
UPDATE employees SET sales_count = sales_count + 1 WHERE id =
(SELECT sales_person FROM accounts WHERE name = '<NAME>')
RETURNING *
)
INSERT INTO employees_log SELECT *, current_timestamp FROM upd;
|
<reponame>brennentsmith/teletraan<filename>deploy-service/common/src/main/resources/sql/cleanup.sql
CREATE DATABASE IF NOT EXISTS deploy;
USE deploy;
/* This is for unit tests only - it will wipe all data - do NOT run it in prodution!*/
DROP TABLE IF EXISTS schema_versions;
DROP TABLE IF EXISTS agents;
DROP TABLE IF... |
<filename>ambassador-storage/src/main/resources/db/migration/V202111271402__add_language_source_columns.sql
ALTER TABLE project ADD COLUMN IF NOT EXISTS language text;
|
-- A test suite for GROUP BY in parent side, subquery, and both predicate subquery
-- It includes correlated cases.
-- Test aggregate operator with codegen on and off.
--CONFIG_DIM1 spark.sql.codegen.wholeStage=true
--CONFIG_DIM1 spark.sql.codegen.wholeStage=false,spark.sql.codegen.factoryMode=CODEGEN_ONLY
--CONFIG_DI... |
<gh_stars>1000+
-- Copyright (c) YugaByte, Inc.
alter table alert_definition add column if not exists target_type varchar(20);
update alert_definition set target_type = 'Universe' where target_type is null ;
alter table alert_definition alter column target_type set not null;
|
<reponame>Zhaojia2019/cubrid-testcases<gh_stars>1-10
create table t1 (s1 string collate utf8_en_ci);
create table t2 (s1 string collate utf8_tr_cs);
insert into t1 values ('2001-11-12'), ('2001-11-10');
insert into t2 values ('2001-11-12'), ('2001-11-10');
select date (s1) from t1 order by 1;
select date (s1) from ... |
<filename>hasura/migrations/1619819550025_run_sql_migration/up.sql
ALTER TABLE "ConferencePrepareJob" SET SCHEMA "conference";
|
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字prepared(非保留),作为模式名
--关键字不带引号-成功
drop schema if exists prepared;
create schema prepared;
drop schema prepared;
--关键字带双引号-成功
drop schema if exists "prepared";
create schema "prepared";
drop schema "prepared";
--关键字带单引号-合理报错
drop schema if exists 'prepared';
c... |
-- @testpoint: column_name:行存普通表各数据类型1列:合理报错
DROP TABLE if EXISTS test_index_table_056 CASCADE;
create table test_index_table_056(name1 TINYINT,name2 BIGINT,
name3 NUMERIC,name4 SMALLSERIAL,name5 SERIAL,name6 BIGSERIAL,name7 FLOAT,
name8 BINARY_DOUBLE,name9 DEC,name10 BOOLEAN,name12 CHAR,name13 CLOB,
name14 TEXT,name15... |
SELECT articles.page_url, articles.print_date, counts.body_counts, counts.headline_counts, counts.tease_counts
FROM articles
INNER JOIN counts ON articles.page_url=counts.page_url; |
<reponame>suxstellino/events
USE Samples;
GO
-- OPENJSON()
DECLARE @json_text nvarchar(2000) =
'{
"Students": [
{
"FirstName": "Alessandro",
"LastName": "Alpi",
"Age": 34
},
{
"FirstName": "Michael",
"LastName": "Denny",
"Age": 30
},
{
"FirstName": "Andr... |
with beatles as (
select row_number() over (
order by artist_alias.id desc
) as rank,
artist_alias.name as name
from artist_alias
inner join artist on artist_alias.artist = artist.id
where artist.name = "<NAME>"
),
cte(rank, name) as (
select rank,
name
fr... |
DELETE FROM `wniosek_status` where typWniosku = 'wniosekOUtworzenieZasobu'
and nazwaSystemowa in ('04_EDYCJA_ADMINISTRATOR_O_ZASOB', '05_EDYCJA_TECHNICZNY_O_ZASOB');
INSERT INTO `wniosek_status` (`deletedAt`, `nazwa`, `nazwaSystemowa`, `opis`, `viewers`, `editors`, `finished`, `typWniosku`) VALUES
( NULL, 'W edycji u ... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 10, 2021 at 04:37 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
WITH wscs AS
(SELECT sold_date_sk ,
sales_price
FROM
(
SELECT ws_sold_date_sk sold_date_sk ,
sum(ws_ext_sales_price) sales_price
FROM web_sales GROUP BY 1
UNION ALL
SELECT cs_sold_date_sk sold_date_sk ,
sum(cs_ext_sales_price) sales_price
FROM c... |
<gh_stars>0
/* Find the country that start with Y */
SELECT
name
FROM
world
WHERE
name LIKE 'Y%';
/* Find the countries that end with y */
SELECT
name
FROM
world
WHERE
name LIKE 'y%';
/* Find the countries that contain the letter x */
SELECT
name
FROM
world
WHERE
name LIKE '%x%';
... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 30, 2021 at 08:23 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- drop table account;
create table account (
user_key varchar(80) not null,
email varchar(80) not null,
first_name varchar(80) null,
last_name varchar(80) null,
regist_ymdt date null,
constraint pk_account primary key (user_key)
);
|
CREATE ROLE [aspnet_Roles_BasicAccess]
AUTHORIZATION [dbo];
GO
ALTER ROLE [aspnet_Roles_BasicAccess] ADD MEMBER [aspnet_Roles_FullAccess];
|
INSERT INTO schema_version(key, extra) values ('003', 'schema version');
-- Add a request rspec for a single node.
INSERT INTO rspec(name, schema, schema_version, description, rspec)
VALUES
('One compute node', 'GENI', '3',
'Any one compute node.',
'<?xml version="1.0" encoding="UTF-8"?>
<rspec xmlns="http:/... |
CREATE EXTENSION cidr;
SELECT cidr(inet '1.1.1.0', inet '1.1.1.255');
SELECT cidr(inet '1.1.1.0', inet '1.1.1.8');
SELECT cidr(inet '8.8.8.8', inet '192.168.3.11');
SELECT cidr(inet '0.0.0.0', inet '255.255.255.255');
SELECT cidr(inet '1::', inet '1:ffff:ffff:ffff:ffff:ffff:ffff:ffff');
SELECT cidr(inet '1::', in... |
CREATE TABLE IF NOT EXISTS VulnerabilitiesCCIs (
VulnerabilityCCI_ID INTEGER PRIMARY KEY,
Vulnerability_ID INTEGER NOT NULL,
CCI_ID INTEGER NOT NULL,
UNIQUE (Vulnerability_ID, CCI_ID) ON CONFLICT IGNORE,
FOREIGN KEY (Vulnerability_ID) REFERENCES Vulnerabilities(Vulnerability_ID),
FOREIGN KEY (CC... |
SELECT MIN(lt.link) AS link_type,
MIN(t1.title) AS first_movie,
MIN(t2.title) AS second_movie
FROM movie_link AS ml JOIN link_type AS lt ON lt.id = ml.link_type_id
JOIN title AS t2 ON ml.linked_movie_id = t2.id
JOIN (title AS t1 JOIN (movie_keyword AS mk JOIN keyword AS k ON mk.keyword_id = k.id)
ON t1... |
<filename>backend/de.metas.swat/de.metas.swat.base/src/main/sql/postgresql/system/40-sw01_swat/5480730_sys_gh751webui_WEBUI_PackingHUsView_AddHUsToShipperTransportation.sql
-- 2017-12-15T13:30:28.016
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Process (AD_Client_ID,IsActive,CreatedB... |
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/current_mysql/5.2.0/dml/KR_DML_01_KCINFR-906_B000.sql<gh_stars>0
DELIMITER /
Insert into KRCR_PARM_T (NMSPC_CD,CMPNT_CD,PARM_NM,OBJ_ID,VER_NBR,PARM_TYP_CD,VAL,PARM_DESC_TXT,EVAL_OPRTR_CD,APPL_ID) values
('KR-WKFLW','All','KIM_PRIORITY_ON_DOC... |
create table "Categoria"(
"Id" uuid Primary Key,
"Nome" varchar Unique not null
) |
<reponame>yathavsritechnology/spin_erp<filename>patches/11.sql<gh_stars>0
CREATE TABLE `mas_suppliercategory` (
`SupplierCategoryId` INT(11) NOT NULL AUTO_INCREMENT,
`SupplierCategory` VARCHAR(250) NULL DEFAULT NULL,
`IsActive` INT(1) NULL DEFAULT '1',
PRIMARY KEY (`SupplierCategoryId`)
)
COLLATE='latin1_swed... |
INSERT INTO products (id, name) VALUES
(1, 'binder'),(2, 'printer paper'),
(3, 'pencils'),(4, 'notepad'),
(5, 'pens'),(6, 'backpack'),
(7, 'envelopes'), (8, 'laptop');
INSERT INTO sales (id, dt, customer_id) VALUES
(101, '2015-08-31 01:48:46', 55),
(102, '2015-08-31 15:40:48', 36),
(103, '2015-08-31 17:58:23', 23),
(1... |
GRANT SELECT, DELETE ON TABLE diagnosis_key TO "cwa_submission";
GRANT SELECT, DELETE ON TABLE authorization_code TO "cwa_submission";
|
-- DROP any existing objects from previous runs
-- for Oracle only, this section is commented out for reference in case they need to be run manually
-- the other DBMS create scripts can dynamically drop objects instead
--
-- ALTER TABLE concept_set drop CONSTRAINT PK_concept_set;
-- DROP TABLE concept_set_generation_i... |
<reponame>devnw/aegis<filename>init/procedures/Vulnerability/CreateVulnRef.sql
DROP PROCEDURE IF EXISTS `CreateVulnRef`;
CREATE PROCEDURE `CreateVulnRef` (_VulnInfoID NVARCHAR(255), _SourceID NVARCHAR(36), _Reference NVARCHAR(2083), _RefType INT)
#BEGIN#
INSERT INTO Vulnerability_Reference (VulnInfoID, SourceID, R... |
<reponame>narendrant6/oracle-db-examples
-----------------------------------------------------------------------
-- Oracle Machine Learning for SQL (OML4SQL) 20c
--
-- Regression - Neural Networks Algorithm - dmnnrdem.sql
--
-- Copyright (c) 2020 Oracle Corporation and/or its affilitiates.
--
-- The Universa... |
BEGIN;
DROP TABLE IF EXISTS dashboard_grants;
DROP TABLE IF EXISTS dashboard;
DROP TABLE IF EXISTS dashboard_insight_view;
COMMIT;
|
def Main = { arr = ^ [1, 2, 4, 5, 6 : int]
; len = ^ length arr
}
|
<filename>OpenSim/Data/MySQL/Resources/009_RegionStore.sql
BEGIN;
ALTER TABLE primitems change itemID itemIDold varchar(255);
ALTER TABLE primitems change primID primIDold varchar(255);
ALTER TABLE primitems change assetID assetIDold varchar(255);
ALTER TABLE primitems change parentFolderID parentFolderIDold varchar(... |
<gh_stars>1-10
select CAST('30' AS NUMERIC(38, 0)) - CAST(1 AS NUMERIC(10,1)),
round(cast (1 as int),3)
from db_root;
select CAST('30' AS NUMERIC(38, 0)) - 1.0,
round(cast (1 as int),3)
from db_root;
select CAST(1 AS NUMERIC(10,1)) - CAST('30' AS NUMERIC(38, 0)),
round(cast (1 as int),3)
from db_root;
select round(... |
--combination with join statements
create table md_int1(id1 int not null, col1 char(20));
insert into md_int1 values(1, 'aaa'), (2, 'bbb'), (3, 'ccc'), (4, 'ddd'), (5, 'eee'), (6, 'fff');
insert into md_int1 values(1, 'fff'), (2, 'eee'), (3, 'ddd'), (4, 'ccc'), (5, 'bbb'), (6, 'aaa');
create table md_int2(id2 int ... |
INSERT INTO `clipbucket_svn`.`cb_pages` (`page_id`, `page_name`, `page_title`, `page_content`, `userid`, `active`, `delete_able`, `date_added`) VALUES (NULL, '403 Error', '403 Forbidden', '<h2>403 Access Denied</h2>
Sorry, you cannot access this page...', '1', 'yes', 'no', ''), (NULL, '404 Error', '404 Not Found', '<h... |
-- TAB-4544
ALTER TABLE RECIPIENTNOTIFICATIONINFO ADD (
attemptedAt TIMESTAMP
); |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 22, 2017 at 08:38 AM
-- Server version: 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_CL... |
CREATE OR REPLACE PACKAGE SOK_SIZE_RANGE_UTIL
AS
/* FUNCTION size_range_exists
** Check if current size_range already exists, e.g. does not exist
** return true if the size_range already exists, else return false;
*/
FUNCTION size_range_exists(
val_size_lower_value IN SOK_SIZE_RANGE_LU.size_lower_value... |
<filename>src/common/mysql/nodejsblog.sql<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: nodejsblog1
-- ------------------------------------------------------
-- Server version 5.7.16-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 S... |
-- @name: test
SELECT 1;
-- @name: test2
SELECT 2; |
DROP TABLE IF EXISTS `t_lp_result`;
CREATE TABLE `t_lp_result` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`report_date` date DEFAULT NULL COMMENT '报表日期',
`org_id` int(11) DEFAULT NULL COMMENT '项目id',
`org_name` varchar(255) DEFAULT NULL COMMENT '项目名称',
`transfer_type` varchar(255) DEFAULT NULL COM... |
CREATE TABLE appstore_src_refresh_audit
(
id serial NOT NULL,
appstore_category_id integer NOT NULL,
letter character(1) NOT NULL,
is_success boolean NOT NULL,
new_apps integer,
error_message text,
date_created timestamp without time zone NOT NULL,
CONSTRAINT appstore_src_refresh_audit_pkey PRIMARY KEY ... |
INSERT INTO m_post_tag (POST_TAG_ID, NAME, REGIST_TIME, UPDATE_TIME, DELETE_FLG, VERSION) VALUES
(1, '家族', now(), now(), 0, 1),
(2, '旅行', now(), now(), 0, 1),
(3, '仕事', now(), now(), 0, 1);
|
create table if not exists admin_boundary_global_key_mapping (
id bigint not null,
id_mapping bigint,
key character varying,
partition character varying,
partition_level int,
constraint admin_boundary_global_key_mapping_pkey primary key (id_mapping, key)
);
create sequence if not exists admin_b... |
-- https://www.hackerrank.com/challenges/weather-observation-station-13/problem
-- Weather Observation Station 13
select round(sum(LAT_N), 4)
from station
where LAT_N > 38.7880 and LAT_N < 137.2345 |
DROP TABLE IF EXISTS Escooter;
CREATE TABLE Escooter (
start_community_area_name varchar(30) NOT NULL,
count_trip_id Integer,
avg_trip_distance Decimal(10,3)
); |
<gh_stars>10-100
DROP TABLE IF EXISTS `post`;
CREATE TABLE IF NOT EXISTS `post` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`title` VARCHAR(255) NOT NULL,
`text` TEXT NOT NULL,
PRIMARY KEY (`id`)
);
DROP TABLE IF EXISTS `comment`;
CREATE TABLE IF NOT EXISTS `comment` (
`id` INT(10) UNSIGNED NOT NULL AUTO_IN... |
-- wal.test
--
-- execsql {
-- INSERT INTO t1 VALUES( blob(900) );
-- SELECT count(*) FROM t1;
-- PRAGMA integrity_check;
-- }
INSERT INTO t1 VALUES( blob(900) );
SELECT count(*) FROM t1;
PRAGMA integrity_check; |
-- file:temp.sql ln:147 expect:true
select * from whereami
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.