sql stringlengths 6 1.05M |
|---|
/*----------------------------------------------
-- RUN `gulp sql` before using this script!!! --
-- Below is meta used for `gulp sql`. --
------------------------------------------------
-- %%[DB_NAME, DB_USER, DB_USER_PASSWORD, IP_ALLOWED]%% --
----------------------------------------------*/
DROP DATABASE I... |
<gh_stars>1-10
SELECT * FROM msdb.dbo.log_shipping_monitor_secondary
SELECT * FROM msdb.dbo.log_shipping_secondary
SELECT * FROM msdb.dbo.log_shipping_secondary_databases
SELECT * FROM msdb.dbo.log_shipping_monitor_alert
--update msdb.dbo.log_shipping_secondary_databases set restore_mode = 0;
--delete fr... |
DROP TABLE IF EXISTS usertable;
CREATE TABLE usertable(lastname text, age int, firstname text) DISTRIBUTED BY (lastname);
|
create or replace package investment_random
as
/** Random data generators for investment data domain.
* @author <NAME>
* @version 0.0.1
* @project RANDOM_NINJA
*/
npg_version varchar2(250) := '1.3.0';
/** Generate a swift type.
* @author <NAME>
* @return varchar2 The swift message generated... |
CREATE TABLE [dbo].[FinancialYear] (
[Id] [int] NOT NULL
IDENTITY (1,1),
[FiscalYearCode] [nvarchar](10) NOT NULL,
[FiscalYearName] [nvarchar](100) NOT NULL,
[StartDate] [datetime] NOT NULL,
[EndDate] [datetime] NOT NULL,
[IsActive] [bit] NOT NULL
,CONSTRAINT [PK_dbo.FinancialYear] PRIMARY K... |
-- 2019-06-26T15:41:32.200
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable... |
-- 2020-03-19T14:26:38.674Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Table_Process WHERE AD_Table_Process_ID=540461
;
-- 2020-03-19T14:26:43.013Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
DELETE FROM AD_Process_Trl WHERE AD_Process_ID=540540
;
-- 2020-0... |
-- Development Proposal updates --
-- EPS_PROP_EXEMPT_NUMBER --
ALTER TABLE EPS_PROP_EXEMPT_NUMBER
DROP FOREIGN KEY FK_EPS_PROP_EXEMPT_NUMBER_KRA;
ALTER TABLE EPS_PROP_EXEMPT_NUMBER
DROP PRIMARY KEY;
ALTER TABLE EPS_PROP_EXEMPT_NUMBER
ADD (PROPOSAL_EXEMPT_NUMBER_ID DECIMAL(12, 0) NOT NULL,
PROPOSAL_SPECIAL_R... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 24, 2019 at 12:18 AM
-- Server version: 10.3.15-MariaDB
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
-- oauth_state_references
INSERT INTO
oauth_state_references(created_at, updated_at, id, referrer)
VALUES
(
now(), now(), '2e0698d8-753e-4cef-bb7c-f027634824a2', 'test referrer one text'
)
;
INSERT INTO
oauth_state_references(created_at, updated_at, id, referrer)
VALUES
(
now(), now(), '71171... |
<filename>migrations/sql/V2021.03.31.13.23__update_document_templates.sql<gh_stars>10-100
UPDATE document_template SET form_spec_json = '[
{
"id": "letter_dt",
"label": "Letter Date",
"type": "DATE",
"placeholder": "YYYY-MM-DD",
"context-value": "{DATETIME.UTCNOW}",
"required": t... |
<filename>TPCDI/02 SQL Commands.sql
-- Databricks notebook source
select 'finwire_cmp_bronze' as table ,count(*) as row_count from lakehouse_tpcdi_bronze.finwire_cmp_bronze union
select 'finwire_fin_bronze',count(*) from lakehouse_tpcdi_bronze.finwire_fin_bronze union
select 'finwire_sec_bronze', count(*) from lakehous... |
INSERT INTO `lh_chat_config` (`identifier`, `value`, `type`, `explain`, `hidden`)
VALUES ('list_online_operators', '0', '0', 'List online operators, 0 - no, 1 - yes.', '0'); |
<reponame>meliaochy95/patroli
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 14, 2020 at 05:36 AM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Czas generowania: 04 Sty 2017, 10:01
-- Wersja serwera: 10.0.28-MariaDB
-- Wersja PHP: 5.6.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... |
<gh_stars>0
-- @testpoint:opengauss关键字ilike(保留),作为外部数据源名
--关键字不带引号-合理报错
create data source ilike;
--关键字带双引号-成功
drop data source if exists "ilike";
create data source "ilike";
drop data source "ilike";
--关键字带单引号-合理报错
drop data source if exists 'ilike';
create data source 'ilike';
--关键字带反引号-合理报错
drop data source if ... |
<filename>openGaussBase/testcase/SQL/DDL/partition/Opengauss_Function_DDL_Partition_Case0010.sql
-- @testpoint: 范围分区表,分区键数据类型长度超过2000的测试
drop table if exists partition_range00021;
create table partition_range00021(
field1 integer,
field2 bigint,
field3 real,
field4 decimal(10,2),
field5 number(38),
field6 ... |
<reponame>lubinnocent/MyUpdatedCRUDLaravelApp
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 20, 2018 at 07:14 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;... |
INSERT INTO `items` (name, label) VALUES
('bottle','50cl Flaska-Tom')
; |
<filename>F-Module 7 Conditional Expressions/CREATE TABLE PERSON.sql
CREATE TABLE person (
personid NUMBER,
person_name VARCHAR2(80),
age NUMBER,
gender VARCHAR2(20),
weight NUMBER,
bankid NUMBER,
marks NUMBER
); |
<reponame>thuydang2412/landslide<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50717
Source Host : 127.0.0.1:3306
Source Database : canhbao
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2017-03-24 ... |
/*
Enter your query here.
*/
SELECT *
FROM (
SELECT CITY,LENGTH(CITY) AS CITYL
FROM STATION
ORDER BY CITYL ASC, CITY ASC) AS LTABLE
LIMIT 1;
SELECT *
FROM (
SELECT CITY,LENGTH(CITY) AS CITYL
FROM STATION
ORDER BY CITYL DESC,CITY ASC) AS LTABLE
LIMIT 1;
|
<filename>programski-projekti/Matf-RS2-FocusOpen/FocusOPEN_OS_Source_3_3_9_5/DatabaseSetup/1_FocusOPEN_CreateDatabase.sql
USE master
GO
-- Enable CLR
sp_configure 'clr enabled', 1
GO
reconfigure
GO
PRINT 'Enabled CLR'
IF (EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE ('[' + name + ']' = 'FocusOPEN' OR name ... |
<gh_stars>0
WITH documents_richtplan AS (
SELECT DISTINCT
richtplankarte_dokument.t_id,
richtplankarte_dokument.t_ili_tid,
richtplankarte_dokument.titel,
richtplankarte_dokument.publiziertAb,
richtplankarte_dokument.bemerkung,
richtplankarte_ueberlagernde_flaeche.t_id... |
INSERT INTO "public"."purchase_payments_type"("id", "name") VALUES (E'CARD', E'Картой');
|
-- Initial table namespace ands schema for auth project
-- convenience function to check existence of constraint before adding.
-- https://stackoverflow.com/questions/6801919/postgres-add-constraint-if-it-doesnt-already-exist
create or replace function create_constraint_if_not_exists (
t_name text, c_name text, c... |
-- :~/tests$ psql -U tester -d postgres_ci < manual_test_runner.sql
\i tests.sql
select
namespace || '.' || procedure as func,
case
when array_length(errors, 1) is null
then 'PASS'
else 'FAIL'
end
as result,
to_json(errors) as errors,
extract(epoch from finished_at ... |
<reponame>mrccnt/apache2-reverse-proxy-box<filename>maria/database.sql
UPDATE `mysql`.`user` SET `Host`="%" WHERE `Host`="::1" AND `User`="root";
CREATE DATABASE `user_storage` CHARACTER SET "utf8" COLLATE "utf8_unicode_ci";
CREATE TABLE `user_storage`.`user` (
`user_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`... |
DROP FUNCTION icf_denom_social_unaccented(icf_with_xf_and_bf_and_iry_and_f_of_last_year);
DROP MATERIALIZED VIEW icf_with_xf_and_bf_and_iry_and_f_of_last_year;
DROP FUNCTION icf_denom_social_unaccented(icf_with_xf_and_iry_of_last_year);
DROP MATERIALIZED VIEW icf_with_xf_and_iry_of_last_year;
ALTER TABLE public.funds... |
/**
* \file
* \brief The TestResult_TestOutcome user-defined function.
* \author <NAME>
*/
if (object_id('ssunit_impl.TestResult_TestOutcome') is not null)
drop function ssunit_impl.TestResult_TestOutcome;
go
/**
* Retrieves the outcome of the specified test.
*/
create function ssunit_impl.TestResult_TestOut... |
-- file:jsonb.sql ln:579 expect:true
SELECT ia3 FROM jsonb_populate_record(NULL::jsbrec, '{"ia3": [[1, 2], [null, 4]]}') q
|
CREATE PROCEDURE [dbo].[BugNet_ProjectMilestones_DeleteMilestone]
@MilestoneIdToDelete INT
AS
DELETE
BugNet_ProjectMilestones
WHERE
MilestoneId = @MilestoneIdToDelete
IF @@ROWCOUNT > 0
RETURN 0
ELSE
RETURN 1
|
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/14.de.metas.dataentry/5514270_sys_gh4959-app_add_missing_ddl.sql
-- 2019-02-28T17:40:46.366
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ SELECT public.db_alter_table('DataEntry_Section','ALTER TABLE pu... |
-- phpMyAdmin SQL Dump
-- version 4.1.4
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Mer 16 Décembre 2015 à 11:30
-- Version du serveur : 5.6.15-log
-- Version de PHP : 5.4.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... |
DECLARE
V CENTROS.ID%TYPE;
BEGIN
SELECT ID INTO V FROM CENTROS WHERE NOMBRE LIKE 'ABRERA';
IF V>0 THEN
DBMS_OUTPUT.PUT_LINE('ABRERA YA EXISTE');
END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
INSERT INTO CENTROS (NOMBRE) VALUES('ABRERA');
COMMIT;
END;
SELECT * FROM CENTROS; |
-- 1.Problem
SELECT `title` FROM books
WHERE `title` LIKE 'The%'
ORDER BY id;
SELECT title FROM books WHERE
SUBSTRING(title, 1, 3) = "The";
-- 2.Problem
SELECT REPLACE (`title`,'The', '***') AS title FROM books
WHERE title LIKE 'The%';
SELECT LENGTH(`title`) AS chars FROM books
ORDER BY chars DESC;
-- 3.Problem
SE... |
<gh_stars>1000+
ALTER TABLE `audit_events` ADD COLUMN `response_time` int(11) DEFAULT NULL;
ALTER TABLE `audit_events` ADD COLUMN `response_size` int(11) DEFAULT NULL;
ALTER TABLE `audit_events` ADD COLUMN `errors` json DEFAULT NULL;
|
<reponame>lintzc/GPDB<gh_stars>0
-- Test: plperl 41
CREATE OR REPLACE FUNCTION foo_bad() RETURNS footype AS $$
return [
[1, 2],
[3, 4]
];
$$ LANGUAGE plperl;
SELECT * FROM foo_bad();
|
DROP VIEW time_series_per_country;
--;;
DROP VIEW time_series_per_continent;
--;;
DROP VIEW time_series_per_continent_latest;
--;;
CREATE VIEW time_series_per_country
AS
SELECT
timestamp,
confirmed,
deaths,
recovered,
active,
confirmed - LAG(confirmed, 1, 0) OVER (
PARTITION BY country_id
ORD... |
CREATE TABLE 'tbl_harddeliverys' (
'guid' VARCHAR(64) PRIMARY KEY,
'order_id' VARCHAR(64) NOT NULL,
'date' VARCHAR(64) NOT NULL,
'id' VARCHAR(64) NOT NULL,
'price' VARCHAR(64) NULL,
'project_id' ... |
/* This is the 1 year contributor count metric. This metric is scored as follows
5 points if 0 contributors in the last year.
4 points if only 1 contributor in the last year.
2 points if 2-3 contributors in the last year.
1 point if the project does not have a repository on github so the number
of ... |
<reponame>yongs2/docker-exercise<gh_stars>0
STOP SLAVE;
RESET MASTER;
RESET SLAVE;
RESET SLAVE ALL;
SET GLOBAL gtid_slave_pos = '';
CHANGE MASTER TO MASTER_HOST='mariadb1', MASTER_PORT=3306, MASTER_USER='maxuser', MASTER_PASSWORD='password', MASTER_USE_GTID=slave_pos;
START SLAVE;
-- [mariadb] function 생성시 ERROR 1418(... |
SELECT DepartmentID,
MIN(Salary) AS MinimumSalary
FROM Employees
WHERE DepartmentID IN (2,5,7) AND HireDate>'01-01-2000'
GROUP BY DepartmentID
|
-- postgres
create table items (
id SERIAL PRIMARY KEY,
title VARCHAR(255) NOT NULL,
category_id INTEGER NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT (NOW() AT TIME ZONE 'UTC') NOT NULL,
updated_at TIMESTAMP WITHOUT TIME ZONE DEFAULT (NOW() AT TIME ZONE 'UTC') NOT NULL
);
|
<gh_stars>0
// https://leetcode.com/problems/second-highest-salary
# Write your MySQL query statement below
select
(select distinct
Salary
from
Employee
order by Salary desc
limit 1 offset 1)
as
SecondHighestSalary
; |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 24 Feb 2021 pada 14.11
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<reponame>4-2-cz/Zabbix-Addons
SELECT zabbix_maintaince.convert_to_partition( NULL, 'N' );
|
<reponame>INYEONGKIM/programmers-sql
SELECT * FROM ANIMAL_INS ORDER BY ANIMAL_ID; |
<reponame>DevlinLiles/PresentationMaterials
CREATE TABLE [dbo].[Tenants] (
[TenantId] INT IDENTITY (1, 1) NOT NULL,
[TenantName] NVARCHAR (100) NOT NULL,
CONSTRAINT [PK_Tenants] PRIMARY KEY CLUSTERED ([TenantId] ASC)
);
|
<gh_stars>1-10
CREATE PROCEDURE [dbo].[OppFinder_Exclusions]
AS
SELECT * FROM
(VALUES
('Able Seafarer (Deck)','ST0274'),
('Aviation maintenance mechanic (military)','ST0014'),
('Chartered Surveyor (degree)','ST0331'),
('HM Forces Service person (Public Services)','ST0222'),
('Installation Electrician/Mai... |
-- file:expressions.sql ln:15 expect:true
SELECT now()::timetz::text = current_time::text
|
<filename>samples/features/ssms-templates/Sql/Change Data Capture/Configuration/Enable All Tables of Database Schema.sql<gh_stars>1000+
-- ===============================================
-- Enable All Tables of a Database Schema Template
-- ===============================================
USE <Database_Name,sysname,Data... |
CREATE TABLE data.b00001 AS SELECT geonum , b00001_001::numeric AS b00001001 FROM data.seq1 NATURAL JOIN data.geo; ALTER TABLE data.b00001 ADD PRIMARY KEY(geonum); CREATE TABLE data.b00002 AS SELECT geonum , b00002_001::numeric AS b00002001 FROM data.seq1 NATURAL JOIN data.geo; ALTER TABLE data.b00002 ADD PRIMARY KEY (... |
<filename>bookings.sql
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE bookings (
bookid integer NOT NULL,
facid integer NOT NULL,
memid integer NOT NULL,
starttime timestamp without time zone NOT NULL,
slots integer NOT NULL
);
INSERT INTO "bookings" VALUES(0,3,1,'2012-07-03 11:00:00',2);
... |
{% if not var("enable_custom_source_1") %}
{{
config(
enabled=false
)
}}
{% endif %}
WITH source AS (
SELECT country_name, SUM(c) c
FROM (
SELECT ip, country_name, c
FROM (
SELECT *, NET.SAFE_IP_FROM_STRING(ip) & NET.IP_NET_MASK(4, mask) network_bin
FROM source_of_ip_addresses, UN... |
SELECT * FROM weixin_cms_article WHERE 1=1
<#if params.accountid ?exists && params.accountid ?length gt 0>
and accountid = :params.accountid
</#if>
<#if params.columnid ?exists && params.columnid ?length gt 0>
and column_id = :params.columnid
</#if> |
CREATE SCHEMA test_scm1;
CREATE TABLE public.t1 (
c1 integer,
c2 integer
);
CREATE TABLE test_scm1.t2 (
c3 integer,
c4 integer
);
CREATE VIEW public.v1 AS
SELECT t1.c1,
t1.c2,
t2.c3
FROM public.t1,
test_scm1.t2;
|
-- Tags: no-fasttest
WITH '{ "v":1.1}' AS raw
SELECT
JSONExtract(raw, 'v', 'float') AS float32_1,
JSONExtract(raw, 'v', 'Float32') AS float32_2,
JSONExtractFloat(raw, 'v') AS float64_1,
JSONExtract(raw, 'v', 'double') AS float64_2;
WITH '{ "v":1E-2}' AS raw
SELECT
JSONExtract(raw, 'v', 'float') AS... |
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : CaretRegressor_svmPoly_pca
-- Dataset : freidman3
-- Database : teradata
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model deployment code
WITH "ADS_... |
<reponame>joshbenner/imbi<gh_stars>1-10
DO
$query$
BEGIN
IF NOT EXISTS (SELECT * FROM pg_catalog.pg_roles WHERE rolname = 'reader')
THEN
CREATE ROLE reader NOSUPERUSER NOCREATEDB NOCREATEROLE NOINHERIT NOLOGIN NOREPLICATION NOBYPASSRLS;
END IF;
END
$query$;
|
select R3.c, T3.c from R3, T3 where R3.a=T3.b and R3.b=T3.a;
|
<reponame>Infoss/conf-profile-4-android<filename>ConfProfile/jni/strongswan/src/libcharon/plugins/eap_simaka_sql/test.sql
DELETE FROM triplets;
DELETE FROM quintuplets;
INSERT INTO triplets
(id, used, rand, sres, kc) VALUES
('<EMAIL>', 0,
X'00112233445566778899AABBCCDDEEFF', X'01234567', X'0123456789ABCDEF'
)... |
CREATE TABLE "public"."forum_posts" (
"id" SERIAL,
"forum_topic_id" INTEGER NOT NULL,
"forum_area_id" SMALLINT NOT NULL,
"author_name" VARCHAR(50),
"author_id" INTEGER,
"post" TEXT,
"author_ip" VARCHAR(15),
"author_host" VARCHAR(150),
"modify_count" SMALLINT DEFAULT 0,
"parent_id" INTEGER,
"create... |
<reponame>BenedictusAryo/ExerciseProject-MySQL<filename>Exercise-Create Table .sql
/*
Udemy Course Practice
& Lecture Code
Course : SQL - MySQL for Data Analytics and Bussiness Inteligence
365 Careers
<NAME>
*/
##########################################################
/*
SECTION :
Create DATABASE sales
Using "IF ... |
-- upgrade --
ALTER TABLE "medicalaccepted" ADD "status" VARCHAR(16) NOT NULL DEFAULT 'WAITING';
-- downgrade --
ALTER TABLE "medicalaccepted" DROP COLUMN "status";
|
BEGIN TRANSACTION;
DROP SCHEMA IF EXISTS tests CASCADE;
CREATE SCHEMA tests;
CREATE TABLE tests.content (
cnt_id serial PRIMARY KEY,
cnt_name text NOT NULL
);
CREATE TYPE tests.enumtype AS ENUM ('val1', 'val2', 'val3');
CREATE FUNCTION tests.test_returns_integer()
RETURNS integer
LANGUAGE SQL
IMMUTABLE
AS $$
... |
IF EXISTS(SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[spUserRoles_add]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[spUserRoles_add];
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE dbo.spUserRoles_add
@UserId int,
@RoleName nvarchar(255)
AS
BEGIN
... |
<filename>src/sql/abe_schema_edges.sql
/*
Produces one row per input/output pubkey pair
Input and output pubkey_ids are CSV in columns
Associated values as of the transaction occurence also included
*/
SELECT
a.tx_id as tx_id,
txout.pubkey_id as input_pubkey_id,
txout.txout_value as input_value... |
{% import 'adapter.sql' as adapter %}
{% macro create_or_replace(query, relation_helper, options) %}
{%- set relation = options['relation'] -%}
{%- set tmp_relation = options['tmp_relation'] -%}
{%- set relation_exists = relation_helper.check_relation_exists(relation) -%}
{%- set table_options_config =... |
-- 2018-04-11T11:43:11.014
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543951,0,'Base_PricingSystem_ID',TO_TIMESTAMP('2018-04-11 11:43:10','YYYY... |
/* ----------------------------------------------------------------
Stored procedures for database operations on Gluster Volume Snapshot
related tables:
- gluster_volume_snapshot_schedules
----------------------------------------------------------------*/
Create or replace FUNCTION InsertGlusterVolumeSnapshotS... |
INSERT INTO KUNDE VALUES (95, 'Rod','Johnson',50000)
INSERT INTO WARE VALUES (82, 'iPod',1)
|
select l1.sid, ' IS BLOCKING ', l2.sid
from v$lock l1, v$lock l2
where l1.block =1 and l2.request > 0
and l1.id1=l2.id1
and l1.id2=l2.id2 |
<gh_stars>10-100
SET CURRENT SCHEMA=SEC_OWNER;
INSERT
INTO SECM_PROCESS_CONFIG
(
PROCESS_ID, HOSTNAME, ROOT_PATH, MULE_CONFIG, START_COMMAND,
ONBOARD_DATE, END_DATE, LAST_UPDATE_BY, LAST_UPDATE_DATE
)
VALUES
('PROC_1','localhost','C:\softwares\mule-standalone-3.3.0','<?xml version="1.0" encoding="UTF-8... |
@@default_include
declare
--API:
----------------------------------------------------------------
v_table_name varchar2(2000) := upper('&1');
v_column_name varchar2(2000) := upper('&2');
v_column_type_declaration varchar2(30) := substr(upper('&3'),1,30);
v_mandatory varc... |
<filename>osgp/platform/osgp-core/src/main/resources/db/migration/V2016.048__Rename_REQUEST_SPECIAL_DAYS_to_SET_SPECIAL_DAYS.sql
--
-- Rename REQUEST_SPECIAL_DAYS to SET_SPECIAL_DAYS in device_function_mapping table
-- SLIM-689
--
update device_function_mapping set function = 'SET_SPECIAL_DAYS' where function='REQUEST... |
<reponame>wapache-org/greenplum-gpdb
-- char check
CREATE TABLE vchartmp (a varchar(32));
\copy vchartmp from 'data/char.data'
SET enable_seqscan=on;
SELECT count(*) FROM vchartmp WHERE a < '31b0'::varchar(32);
SELECT count(*) FROM vchartmp WHERE a <= '31b0'::varchar(32);
SELECT count(*) FROM vchartmp WHERE a ... |
<reponame>ynsingh/brihCI
alter table employee_type add empt_tnt varchar(255) default NULL after empt_name;
alter table salary_head add sh_tnt varchar(255) default NULL after sh_name;
|
--
-- 表的结构 `admin_action`
--
CREATE TABLE IF NOT EXISTS `admin_action` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'action功能ID',
`type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '类型',
`sign` varchar(255) NOT NULL DEFAULT '' COMMENT '签名',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '功能名称',
`pid` int(11)... |
<filename>db/schema.sql
CREATE DATABASE burger_db;
use burger_db;
CREATE TABLE burger(
id INT AUTO_INCREMENT NOT NULL,
burger_name VARCHAR(45) NOT NULL,
Devoured BOOLEAN,
date TIMESTAMP,
PRIMARY KEY (id)
);
|
<gh_stars>0
IF EXISTS ( SELECT *
FROM sys.objects
WHERE object_id = OBJECT_ID(N'pa.dco_datos_contables')
AND type IN (N'S', N'U') )
begin
ALTER TABLE [pa].[dco_datos_contables] DROP CONSTRAINT [fk_salppl_padco];
ALTER TABLE [pa].[dco_datos_contables] DROP CONSTRA... |
<reponame>anbya/contohUploadKeGit
INSERT INTO pos_itemtemp VALUES("IATT190002827","193034","191001","192005","37000","1","37000","0","37000","1","1","1","IAT2809191107","NHO2018000007","PAID","","193034"),
("IATT190002827","193046","191002","192010","10000","1","10000","0","10000","1","1","1","IAT2809191107","NHO201800... |
<gh_stars>0
USE `bitel_ecommerce`;
-- Usar https://bcrypt-generator.com/ para generar las contraseñas
INSERT INTO `tbl_user` (`user_name`, `user_email`, `password`, `user_rol`) VALUES
-- password: admin
('Admin 1', '<EMAIL>', <PASSWORD>', 1),
-- password: <PASSWORD>
('Editor 1', '<EMAIL>', <PASSWORD>', 2),
-- password... |
DROP TABLE IF EXISTS server CASCADE;
|
/*
Warnings:
- Made the column `userId` on table `Collection` required. This step will fail if there are existing NULL values in that column.
- Made the column `collectionId` on table `CollectionPlace` required. This step will fail if there are existing NULL values in that column.
- Made the column `placeId` o... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : ven. 13 juil. 2018 à 07:50
-- Version du serveur : 5.7.19
-- Version de PHP : 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
CREATE FUNCTION [dbo].[udf_GetAccountResults]
(
@ContainsSearchCondition varchar(255) --A string containing the word or words to search on.
)
RETURNS @returntable TABLE
(
Id varchar(10) not null
,Name varchar(50) not null
)
AS
BEGIN
INSERT INTO @returntable
SELECT TOP 20
[Id]
,[Name]
FROM [PrePurchasi... |
<reponame>rsterbin/liturgicalendar<filename>database/migrations/20160810135100_schema_moveable_feasts.sql
-- rambler up
--
-- This table defines the moveable feasts, which are not attached to a
-- particular calendar day, but are calculated, usually from the date of Easter
-- or the date of Christmas, but sometimes b... |
SELECT
'' AS deftype,
'' AS grantee,
'' AS grantor,
'' AS grantor,
'' AS privileges,
'' AS grantable
|
prompt --application/set_environment
set define off verify off feedback off
whenever sqlerror exit sql.sqlcode rollback
--------------------------------------------------------------------------------
--
-- ORACLE Application Express (APEX) export file
--
-- You should run the script connected to SQL*Plus as the Oracle... |
<filename>db/init/02-dummy.sql<gh_stars>1-10
\connect special
INSERT INTO special.User VALUES ('s4435400', '<NAME>');
INSERT INTO special.User VALUES ('s4439491', '<NAME>');
INSERT INTO special.User VALUES ('s4434180', '<NAME>');
INSERT INTO special.UserDump VALUES ('s4435400', 'Student', '<EMAIL>', '[labs:comp3506-2... |
CREATE DATABASE IF NOT EXISTS `jpa_manytomany`;
USE `jpa_manytomany`;
--
-- Table structure for table `book`
--
DROP TABLE IF EXISTS `book`;
CREATE TABLE `book` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSE... |
-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 12, 2017 at 11:52 AM
-- Server version: 5.6.36-82.1-log
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... |
<filename>tests/_data/sql/fixtures.sql
INSERT INTO `users`
(`id`, `user_name`, `user_hash`, `salt`, `system_generated_password`, `sugar_login`, `last_name`, `external_auth_only`, `date_entered`, `created_by`, `status`, `portal_only`, `employee_status`, `preferred_locale`)
VALUES
('1', 'superadmin', '$argon2id$v=19$m=... |
-- ----------------------------------------------------------------------------------------------------------------------------
-- Database creation
-- ----------------------------------------------------------------------------------------------------------------------------
CREATE DATABASE IF NOT EXISTS `storyengine`... |
<reponame>PhilippeBinggeli/Hands-On-Data-Science-with-SQL-Server-2017
;WITH cte AS
(
SELECT ProductID, ListPrice
, (SELECT MIN(ListPrice) FROM Production.Product WHERE ListPrice != 0) AS MinListPrice
, (SELECT MAX(ListPrice) FROM Production.Product WHERE ListPrice != 0) AS MaxListPrice
FROM Production.Product
WHER... |
<reponame>Shuttl-Tech/antlr_psql
-- file:identity.sql ln:10 expect:true
SELECT table_name, column_name, column_default, is_nullable, is_identity, identity_generation, identity_start, identity_increment, identity_maximum, identity_minimum, identity_cycle FROM information_schema.columns WHERE table_name LIKE 'itest_' ORD... |
CREATE EXTERNAL TABLE nyc_taxi (
pickup_datetime TIMESTAMP,
dropoff_datetime TIMESTAMP,
store_and_forward TINYINT,
passenger_count TINYINT,
trip_distance FLOAT,
fare_amount FLOAT,
tip_amount ... |
* CREATE DATABASE companynews;
* CREATE TABLE departments (id serial PRIMARY KEY,name varchar, description varchar);CREATE TABLE
* CREATE TABLE employees(id serial PRIMARY KEY,name varchar, position varchar, role varchar,department_id int);
* CREATE TABLE employees_departments(id serial PRIMARY KEY,employee_id int... |
<filename>IQ.Schemas.Test/SqlTest/Tables/Table0D.sql
CREATE TABLE [SqlTest].[Table0D]
(
Col01 INT NOT NULL,
Col02 decimal(19,4) not null,
Col03 bigint not null
constraint PK_Table0D primary key(Col01)
)
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
@value = N'Documentation for [SqlTest].[Table0D]'... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.