sql stringlengths 6 1.05M |
|---|
ALTER TABLE IF EXISTS imports
ADD COLUMN reference text;
|
<filename>install/assets/database.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 17, 2018 at 04:39 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACT... |
<reponame>Ashish-Tutejaa/CodeIgniter
CREATE TABLE stations
(
ID INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
ST_NAME VARCHAR(40) NOT NULL,
ENERGY INT NOT NULL
);
DESCRIBE stations;
INSERT INTO stations VALUES (1,'INDORE',382404);
INSERT INTO stations VALUES (2,'MUMBAI',100213);
SELECT * FROM stations;
SELECT SUM(ENERGY) FR... |
<reponame>ceciliassis/graduate_ufu
CREATE TABLE pais ( --ok
id_pais serial PRIMARY KEY,
nome varchar,
capital varchar,
ddi int,
moeda varchar
);
CREATE TABLE tipoquarto ( --ok
id_tipo serial PRIMARY KEY,
qtdcamas int,
fumanteArea boolean,
lotacao int,
valor numeric(6,2),
descri text
);
CREATE TABLE h... |
<filename>sql/user.up.sql
-- local: timestamp
-- UTC: timestamptz
create table users (
id serial8 primary key,
name varchar(10) UNIQUE not null,
email varchar(20) UNIQUE not null,
pass varchar(65) not null, -- 'passwd hash'
create_dt timestamptz not null default current_timestamp, -- 'create datetim... |
<filename>data/test/sql/f02ab6a01ff5423773466246e32491f701247896changeLog1Indexes.sql
--liquibase formatted sql
--This is for the sparrow_dss schema
--logicalFilePath: changeLog1Indexes.sql
--changeset drsteini:indexs1a
insert into user_sdo_geom_metadata
values ('MODEL_CALIB_SITES',
'SITE_GEOM',
m... |
CREATE TABLE `members` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`lock_version` int(10) unsigned NOT NULL DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEF... |
-- file:strings.sql ln:57 expect:true
SELECT E'De\\678dBeEf'::bytea
|
-- South lambert
select x, y, _ST_BestSRID(ST_Point(x, y))
from ( select 0 as x, -70 as y ) as foo ;
-- North lambert
select x, y, _ST_BestSRID(ST_Point(x, y))
from ( select 0 as x, 70 as y ) as foo ;
-- UTM north
select x, 60, _ST_BestSRID(ST_Point(x, 60))
from generate_series(-177, 177, 6) as x ;
-- Corner cases
se... |
<gh_stars>0
----------------- creating and using subprograms in anonymous blocks - false usage
create table emps_high_paid as select * from employees where 1=2;
/
declare
procedure insert_high_paid_emp(emp_id employees.employee_id%type) is
emp employees%rowtype;
begin
emp := get_emp(emp_id);
... |
<filename>S11 data base/S11 LOL Database.sql<gh_stars>0
---IST 659 Final Project
---<NAME>
CREATE DATABASE LOL
GO
--------------------------------------------------DOWN---------------------------------------------------------------------------
---Purchases table
IF EXISTS (SELECT* FROM INFORMATION_SCHEMA.TABLE_CONSTR... |
<filename>test/CanalSharp.UnitTest/db.sql
CREATE DATABASE `canaltest` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci';
use canaltest;
-- ----------------------------
-- Table structure for user_info
-- ----------------------------
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `user_info` (
`Id` int(11) NOT ... |
<filename>src/main/resources/resources/cohortresults/sql/conditionera/sqlConditionEraTreemap.sql
select concept_hierarchy.concept_id,
isNull(concept_hierarchy.soc_concept_name,'NA') + '||' + isNull(concept_hierarchy.hlgt_concept_name,'NA') + '||' + isNull(concept_hierarchy.hlt_concept_name, 'NA') + '||' + isNull(conc... |
select *
from {{ var('issue_label') }}
|
--To disable this model, set the using_credit_memo variable within your dbt_project.yml file to False.
{{ config(enabled=var('using_credit_memo', True)) }}
with credit_memos as (
select *
from {{ref('stg_quickbooks__credit_memo')}}
),
credit_memo_lines as (
select *
from {{ref('stg_quickbooks__credit_... |
<reponame>Attest/dbt-snowplow-web<gh_stars>10-100
-- Removing model_tstamp
select
page_view_id,
event_id,
app_id,
-- user fields
user_id,
domain_userid,
network_userid,
-- session fields
domain_sessionid,
domain_sessionidx,
page_view_in_session_index,
page_views_in_session,
-- timestamp ... |
<filename>ecommerce-inventory-service-api/src/main/resources/db/migration/V1.0__init.sql<gh_stars>1-10
CREATE TABLE INVENTORY
(
ID VARCHAR(32) NOT NULL,
JSON_CONTENT JSON NOT NULL,
PRODUCT_ID VARCHAR(32) GENERATED ALWAYS AS (JSON_CONTENT ->> '$.productId') VIRTUAL,
CREATED_AT BIGINT GENERAT... |
<reponame>luiz158/Hibernate-SpringBoot<gh_stars>100-1000
-- insert authors
INSERT INTO author (`age`, `name`, `genre`, `id`) VALUES (23, "<NAME>", "Anthology", 1);
INSERT INTO author (`age`, `name`, `genre`, `id`) VALUES (51, "<NAME>", "Anthology", 2);
INSERT INTO author (`age`, `name`, `genre`, `id`) VALUES (38, "<NAM... |
<reponame>javacxyxbc/yunheng_blog
/*
SQLyog Community v13.1.6 (64 bit)
MySQL - 8.0.21 : Database - hy_picture
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 ... |
<filename>packaging/dbscripts/upgrade/04_01_0330_set_host_protocol_to_jsonrpc.sql
SELECT fn_db_delete_config_value('ProtocolFallbackRetries', 'general');
SELECT fn_db_delete_config_value('ProtocolFallbackTimeoutInMilliSeconds', 'general');
UPDATE vds_static
SET protocol = 1
WHERE protocol != 1
AND EXISTS (SELECT 1
... |
<gh_stars>0
-- Database schema |
<gh_stars>0
#2020/09/26
#group_buy_goods赠送积分
ALTER TABLE `jxmall_plugin_group_buy_goods` ADD `send_score` INT(11) NOT NULL DEFAULT '0' COMMENT '赠送积分' AFTER `deleted_at`;
#赠送余额
ALTER TABLE `jxmall_plugin_group_buy_goods` ADD `send_balance` INT(11) NOT NULL DEFAULT '0' COMMENT '赠送余额' AFTER `send_score`;
#是否发放奖... |
<filename>database/db_kpdp.sql
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 23, 2021 at 06:45 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone... |
<reponame>adam-siegel-b/blog-server
DROP TABLE IF EXISTS slalomer; |
<filename>prisma/migrations/20210624170001_dev/migration.sql
/*
Warnings:
- You are about to alter the column `name` on the `Color` table. The data in that column could be lost. The data in that column will be cast from `Enum("Color_name")` to `VarChar(191)`.
*/
-- AlterTable
ALTER TABLE `Color` MODIFY `name` VAR... |
<reponame>Firofa/tokecang
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 21, 2020 at 10:15 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th9 15, 2017 lúc 02:01 SA
-- Phiên bản máy phục vụ: 10.1.21-MariaDB
-- Phiên bản PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... |
<filename>ORACLE/DEBUG/Tables/DBG_Tables_220308.sql
DECLARE
C_SCHEMA CONSTANT VARCHAR2(30) := SYS_CONTEXT('USERENV','CURRENT_SCHEMA');
C_CUTOFF CONSTANT CHAR(7) := '1800000';
C_PART_SIZE CONSTANT CHAR(6) := '100000';
PROCEDURE exec_sql(p_sql IN VARCHAR2) IS
BEGIN
dbms_output.put_line(SUBSTR(p_sql... |
DROP SCHEMA IF EXISTS carronix CASCADE;
CREATE SCHEMA IF NOT EXISTS carronix;
SET search_path TO carronix;
CREATE TABLE IF NOT EXISTS cliente(
codigo SERIAL,
cpf VARCHAR(11) NOT NULL,
rg VARCHAR(11) NOT NULL,
nome VARCHAR(255) NOT NULL,
data_nascimento DATE,
telefone_residencial VARCHAR(11),
telefone_celu... |
<filename>db_backup.sql
-- MySQL dump 10.13 Distrib 5.5.57, for debian-linux-gnu (x86_64)
--
-- Host: 0.0.0.0 Database: c9
-- ------------------------------------------------------
-- Server version 5.5.57-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTE... |
BEGIN TRANSACTION;
CREATE TABLE shistory
(
FID serial NOT NULL REFERENCES users(ID),
url text NOT NULL,
DATE VARCHAR(100) NOT NULL
);
COMMIT; |
CREATE UNIQUE INDEX "RMREP"."SYS_C0013234" ON "RMREP"."ANNOTATION_SECURITY" ("ID")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 8388608 NEXT 8388608 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_... |
-- file:foreign_key.sql ln:378 expect:true
INSERT INTO PKTABLE VALUES (2, 4, 5, 'test4')
|
CREATE PROC [dbo].[DatabaseRoleMembers_Upd](@DatabaseRoleMembers dbo.DatabaseRoleMembers READONLY,@InstanceID INT,@SnapshotDate DATETIME2(3))
AS
SET XACT_ABORT ON
DECLARE @Ref VARCHAR(30)='DatabaseRoleMembers'
IF NOT EXISTS(SELECT 1 FROM dbo.CollectionDates WHERE SnapshotDate>=@SnapshotDate AND InstanceID = @InstanceI... |
-- MySQL dump 10.13 Distrib 5.7.30, for Linux (x86_64)
--
-- Host: localhost Database: classicmodels
-- ------------------------------------------------------
-- Server version 5.7.30
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table batch (
batch_id bigint auto_increment not null,
batch_name varchar(255),
description varchar(255),
batch_incharge_name ... |
-- +migrate Up
CREATE TABLE accounts_signers (
account character varying(64),
signer character varying(64),
weight integer NOT NULL,
-- we will query by signer so that is why signer is the first item in the composite key
PRIMARY KEY (signer, account)
);
CREATE TABLE key_value_store (
key varchar... |
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
CREATE TRIGGER edfi.edfi_EducationOrganization_TR_... |
select
ntile(3) over(partition by position_id order by 1) as `ntile`
from
dfs.`%s/window/b2.p4`
|
<reponame>fishtown-analytics/stripe<gh_stars>10-100
with invoices as (
select * from {{ref('stripe_invoices')}}
),
items as (
select * from {{ref('stripe_invoice_items_xf')}}
),
subscriptions as (
select * from {{ref('stripe_subscriptions')}}
),
amount_from_items as (
--find the amount of addo... |
-- Table for the executed priority operations (e.g. deposit).
CREATE TABLE executed_tx_and_priority_operations (
priority_op_serialid BIGINT NOT NULL,
deadline_block BIGINT NOT NULL,
eth_block BIGINT NOT NULL,
-- operation data
tx jsonb NOT NULL,
success bool NOT NULL,
fail_reason TEXT,
... |
/*
Navicat MariaDB Data Transfer
Source Server : mariadb
Source Server Version : 100210
Source Host : localhost:3306
Source Database : openemr
Target Server Type : MariaDB
Target Server Version : 100210
File Encoding : 65001
Date: 2019-05-02 16:30:34
*/
SET FOREIGN_KEY_CHECKS=0;
... |
-- @author prabhd
-- @created 2013-02-01 12:00:00
-- @modified 2013-02-01 12:00:00
-- @tags cte HAWQ
-- @product_version gpdb: [4.3-],hawq: [1.1-]
-- @db_name world_db
-- @description test6: CTE defined inside a subexpression (in the FROM clause)
WITH w AS (SELECT a, b from foo where b < 5)
SELECT *
FROM foo,
... |
<filename>ConfigureDatabase.sql
/* Create a new SQL Server database to contain replicated tables */
USE [master]
GO
CREATE DATABASE [SqlReplication]
CONTAINMENT = NONE
ON PRIMARY ( NAME = N'SqlReplication', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\SqlReplication.mdf' , SIZ... |
<reponame>jprider63/daedalus
def Main =
{ a = ^ true;
b = ^ false;
c = ^ nothing : maybe bool;
d = ^ just true;
e = d is nothing <| ^ {};
f = d is just <| ^ true;
}
|
<filename>config/OGNrange.schema.sql
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 17, 2019 at 06:40 PM
-- Server version: 5.7.26-0ubuntu0.18.04.1
-- PHP Version: 7.2.17-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT =... |
<reponame>Zhaojia2019/cubrid-testcases<filename>sql/_13_issues/_19_1h/cases/cbrd_22439.sql<gh_stars>1-10
drop if exists test_class;
create class test_class (bigint_col bigint, char_col char(10));
insert into test_class(bigint_col, char_col) values (-100, 'minus');
insert into test_class(bigint_col, char_col) values (... |
-- @testpoint:创建复合类型,复合类型的列的现有数据类型为字符类型
--创建一种复合类型
drop type if exists t_type3 cascade;
CREATE TYPE t_type3 AS (f1 varchar2(20), f2 text,f3 clob);
--建表1
drop table if exists t1_test;
CREATE TABLE t1_test(a int, b t_type3);
--建表2
drop table if exists t2_test;
CREATE TABLE t2_test(a int, b t_type3);
--表1插入数据
INSERT INTO... |
-- @testpoint: polygon函数将路径转换成多边形
SELECT polygon(path '((0,0),(1,1),(2,0))') AS RESULT; |
-- 7.5 Benefits of views
-- simplify quires
-- reduce the impact of changes
-- restrict direct acess to data |
<reponame>MuriloAlexSilva/certifiedTechDeveloper
USE EMARKET;
-- EXEMPLO DE JOINS
-- O JOIN ---------- MELHORA A PERFORMANCE DO BANCO DE DADOS
-- REPRESENTAÇÕES 1:1
USE FILMES_DB;
SELECT
F.TITULO AS 'NOME DO FILME',
G.NOME AS 'GENERO DO FILME'
FROM FILMES AS F
INNER JOIN GENEROS AS G
ON G.ID = F.GENERO_ID;
-- REP... |
<gh_stars>1-10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;... |
-- load info about applications and virtual machines
--
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = diskprint, pg_catalog;
--INSERT INTO virtualmachine (vmsettingid, vir... |
<gh_stars>1-10
INSERT INTO eg_role (id, name, description, createddate, createdby, lastmodifiedby, lastmodifieddate, version) VALUES
(nextval('SEQ_EG_ROLE'), 'TL VIEW ACCESS', 'user has access to view masters, reports, transactional data, etc', now(),
1, 1, now(), 0);
INSERT INTO eg_roleaction (roleid, actionid) ... |
SET CHARSET UTF8;
--
-- テーブルのデータのダンプ `privileges`
--
INSERT INTO `privileges` (`id`, `code`, `name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'ADMIN', '管理者', 'すべての権限を持つ', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(2, 'MODERATOR', 'モデレータ', 'データの修正ができる', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(3, 'VIEWER', '閲... |
<reponame>jeantardelli/restful-python-web-services<gh_stars>1-10
mysql -u pyuser -D flask_notifications -p -e "SELECT * FROM notification_category"
mysql -u pyuser -D flask_notifications -p -e "SELECT * FROM notification"
|
--
-- Table structure for table `arc_ecom_orderlines`
--
CREATE TABLE `arc_ecom_orderlines` (
`id` int(11) NOT NULL,
`orderid` int(11) NOT NULL,
`productid` int(11) NOT NULL,
`options` text NOT NULL,
`cost` decimal(10,2) NOT NULL,
`price` decimal(10,2) NOT NULL,
`description` varchar(255) NOT NULL,
`qt... |
<reponame>jdkoren/sqlite-parser<filename>src/test/resources/vtab6.test_15.sql
-- vtab6.test
--
-- execsql {
-- SELECT * FROM t1 natural join t2 natural join t3 WHERE t1.a=1
-- }
SELECT * FROM t1 natural join t2 natural join t3 WHERE t1.a=1 |
/* change row size of image URI columns (PRFL-392) */
alter table PROFILE_IMAGES_T modify RESOURCE_MAIN text;
alter table PROFILE_IMAGES_T modify RESOURCE_THUMB text;
alter table PROFILE_IMAGES_EXTERNAL_T modify URL_MAIN text;
alter table PROFILE_IMAGES_EXTERNAL_T modify URL_THUMB text;
|
ALTER TABLE site_service_participation ADD COLUMN person_id integer;
ALTER TABLE site_service_participation ALTER COLUMN person_id SET STORAGE PLAIN;
ALTER TABLE site_service_participation
ADD CONSTRAINT person_id_fkey FOREIGN KEY (person_id)
REFERENCES person (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DE... |
<gh_stars>1-10
----------------------------------
-- grant for HHS_HR_RW_ROLE
----------------------------------
GRANT EXECUTE ON HHS_HR.BIIS_PERSON TO HHS_HR_RW_ROLE;
----------------------------------
-- grant for HHS_HR_DEV_ROLE
----------------------------------
GRANT EXECUTE ON HHS_HR.BIIS_PERSON TO... |
<reponame>rodrigosousa1/play-scala-sistema
# Address schema
#
# --- !Ups
CREATE TABLE "public"."address" (
"id" serial8 NOT NULL,
"customer_id" int8 NOT NULL,
"street" varchar(50) NOT NULL,
"neighborhood" varchar(30) NOT NULL,
"city" varchar(15) NOT NULL,
"state" varchar(2) NOT NULL,
"cep" varchar(8) NOT NULL,
PRIMA... |
<gh_stars>0
USE dashboards;
DROP PROCEDURE IF EXISTS buildFinalPatientCohort;
DELIMITER //
CREATE PROCEDURE buildFinalPatientCohort (
IN p_query_id INT,
IN p_patientcohorttab VARCHAR(64),
IN p_practiceChortTab VARCHAR(64),
IN p_ruleTab VARCHAR(64),
IN p_schema VARCHAR(255)
)
... |
-- Copyright (C) 2018 <NAME> <<EMAIL>>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is dis... |
-- Deploy ggircs-portal:tables/application_001 to pg
-- requires: tables/application
begin;
create unique index application_facility_year_uindex on ggircs_portal.application(facility_id, reporting_year);
commit;
|
if exists (select * from sysobjects where id = object_id(N'[#SQLSTATS]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
DROP TABLE #SQLSTATS
if exists (select * from sysobjects where id = object_id(N'[DBO].[EW_FKS]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
DROP TABLE [DBO].[EW_FKS]
Create Table [DBO].[EW_FKS](
fore... |
CREATE TABLE ACT_DMN_DATABASECHANGELOGLOCK (ID int NOT NULL, LOCKED bit NOT NULL, LOCKGRANTED datetime2(3), LOCKEDBY nvarchar(255), CONSTRAINT PK_ACT_DMN_DATABASECHANGELOGLOCK PRIMARY KEY (ID))
DELETE FROM ACT_DMN_DATABASECHANGELOGLOCK
INSERT INTO ACT_DMN_DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0)
UPDATE ACT... |
//// CHANGE name=change0
CREATE MEMORY TABLE DYN_TABLE_C(C_ID INTEGER NOT NULL PRIMARY KEY,D_ID INTEGER NOT NULL,STRING_FIELD VARCHAR(30),TIMESTAMP_FIELD TIMESTAMP)
GO
//// CHANGE name=change1
ALTER TABLE DYN_TABLE_C ADD FOREIGN KEY(D_ID) REFERENCES DYN_TABLE_D(D_ID)
GO
|
<reponame>IBM/ibm-spectrum-lsf-rtm-server
--
-- $Id: 6ec1f0e6ffe6ce52bc4d4800d306ef50a16bc900 $
--
-- MySQL dump 10.14 Distrib 5.5.56-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: cacti
-- ------------------------------------------------------
-- Server version 5.5.56-MariaDB
/*!40101 SET @OLD_COLLAT... |
<reponame>opengauss-mirror/Yat
-- @testpoint:openGauss关键字none(非保留),同时作为表名和列名带引号,并进行dml操作,none列的值最终显示为1000
drop table if exists "none";
create table "none"(
c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer,
c_real real, c_double real,
c_decimal decimal(38), c_number number(38), c_... |
DROP TABLE IF EXISTS RecordNumber;
CREATE TABLE RecordNumber (
recordId BIGINT(20) NOT NULL,
namespace VARCHAR(20) NOT NULL,
number DOUBLE NOT NULL,
KEY k_namespace_recordId (namespace, recordId)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
/*
Deployment script for ObservationsSACTN
This code was generated by a tool.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
*/
GO
SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER ON;
SET NUMERIC_ROUNDABORT OFF;
GO
... |
<reponame>AerisG222/mikeandwan.us
DO
$$
BEGIN
IF NOT EXISTS (SELECT 1
FROM pg_catalog.pg_user
WHERE usename = 'svc_solr') THEN
CREATE ROLE svc_solr WITH PASSWORD '<PASSWORD>' LOGIN INHERIT;
GRANT readonly TO svc_solr;
END IF;
END
$$;
|
select pg_sleep(0.1); -- make sure this transaction starts after the first transaction.
begin;
select 'sql 2', * from t_currency where id = 1 for update;
update t_currency set name='name' where id = 1;
select 'sql 2', * from t_currency where id = 1;
update t_currency set id=3 where id = 1;
select 'sql 2: commit';
commi... |
select * from p_gen_debt_letter_2(SYSDATE); |
<reponame>norjs/pg
CREATE TABLE test_account (
username VARCHAR (50) UNIQUE NOT NULL,
password VARCHAR (50) NOT NULL,
created TIMESTAMP NOT NULL
);
INSERT INTO test_account
VALUES ('foo1', 'bar1', '2014-06-20')
, ('foo2', 'bar2', '2018-12-02')
, ('foo3', 'bar3', '2019-01-10');
|
USE [DGSDATA]
GO
/****** Object: StoredProcedure [dbo].[_BI_Feed_to_Apps] Script Date: 10/30/2017 4:18:53 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[_BI_Feed_to_Apps]
-- Add the parameters for the stored procedure here
AS
BEGIN
-- SET NOCOUNT ON added to prevent e... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 30 Nov 2019 pada 11.30
-- Versi server: 10.1.36-MariaDB
-- Versi PHP: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
<filename>VS2013_PROJECT/DNN_DB/dbo/Stored Procedures/dnn_GetFileById.sql
CREATE PROCEDURE [dbo].[dnn_GetFileById]
@FileId int ,
@RetrieveUnpublishedFiles bit = 0
AS
BEGIN
IF @RetrieveUnpublishedFiles = 0 BEGIN
SELECT FileId,
PortalId,
[FileName],
Extension,
Size,
Width,
Height... |
<reponame>getwasim/egov-smartcity-suites-test
INSERT INTO eg_module (id, name, enabled, contextroot, parentmodule, displayname, ordernumber) VALUES (nextval('SEQ_EG_MODULE'), 'Survey', true, 'ptis', (select id from eg_module where name='Property Tax'), 'Survey Applications', null);
insert into EG_ACTION (id,name,url,q... |
<filename>resources/sqlite.sql
-- #! sqlite
-- #{ bank
-- # { init
CREATE TABLE IF NOT EXISTS Bank (
Player VARCHAR(40) NOT NULL,
Money FLOAT NOT NULL DEFAULT 0
);
-- # }
-- # { register
-- # :player string
-- # :value float
INSERT OR REPLACE INTO Bank (Player, Money)
VALUES (... |
CREATE TABLE [dbo].[Subscription]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY,
[GroupName] NVARCHAR(100) NOT NULL,
[WebHookUri] NVARCHAR(MAX) NOT NULL,
[Category] NVARCHAR(50) NULL
)
|
-- memsubsys1.test
--
-- db eval {INSERT INTO t2 SELECT * FROM t1}
INSERT INTO t2 SELECT * FROM t1 |
<filename>data-schema/Series_Insert.sql
INSERT INTO tdr."Series"(
"SeriesId", "Name", "Code", "BodyId")
VALUES
('UKSC 1','UKSC 1','UKSC 1',1),
('WO 95','WO 95','WO 95',2),
('RF 5','RF 5','RF 5',3),
('ASI 2','ASI 2','ASI 2',4),
('WA 12','WA 12','WA 12',5),
('WA 11','WA 11','WA 11',5),
('WA 13','WA 13','WA 13',5),
('WA... |
<gh_stars>10-100
-- file:numeric.sql ln:56 expect:true
INSERT INTO num_exp_add VALUES (0,8,'74881')
|
<filename>DBADashDB/dbo/Tables/AzureDBElasticPoolStorageThresholds.sql
CREATE TABLE dbo.AzureDBElasticPoolStorageThresholds
(
PoolID INT NOT NULL,
WarningThreshold DECIMAL(9, 3) NULL,
CriticalThreshold DECIMAL(9, 3) NULL,
CONSTRAINT PK_AzureDBElasticPoolStorageThresholds PRIMARY KEY CLUSTERED (PoolID)... |
-- +----------------------------------------------------------------------------+
-- | <NAME> |
-- | <EMAIL> |
-- | www.idevelopment.info |
-- |-----------------... |
-- Verify postgraphile_user_system:request_account_deletion on pg
BEGIN;
SET SEARCH_PATH TO app_public,public;
SELECT pg_catalog.has_function_privilege('request_account_deletion()','execute');
ROLLBACK;
|
<reponame>forgottenlands/ForgottenCore406
UPDATE `creature_template` SET `faction_A`='16', `faction_H`='16' WHERE (`entry`='47728'); |
<reponame>RubbelDieKatz/guildmanagement<filename>sql/add_transaction.sql<gh_stars>0
INSERT INTO `transaction_history` (
`user_id`,
`value`,
`message`,
`iban_from`,
`iban_to`,
`created_at`,
`updated_at`
)
VALUES (
?,
?,
?,
?,
?,
?,
?
); |
---- GRANT PERMISSIONS
-- FOR ACCESS CONTROL
grant execute on function sidekick.register_user_by_email_password (email text, password text) to sidekick_public;
grant execute on function sidekick.register_user_by_password (blocked boolean, password text) to sidekick_public;
grant execute on function sidekick.authentic... |
CREATE FUNCTION func710() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE256);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE188);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE346);val:=(SELECT COUNT(*)INTO MYCOU... |
<gh_stars>10-100
DROP PROCEDURE IF EXISTS `UpdateDetectionIgnore`;
CREATE PROCEDURE `UpdateDetectionIgnore` (_DeviceID NVARCHAR(360), _VulnID NVARCHAR(36), _Port INT, _Protocol VARCHAR(360), _ExceptionID VARCHAR(36))
#BEGIN#
UPDATE Detection D JOIN VulnerabilityInfo VI on (D.VulnerabilityID = VI.ID)
SET IgnoreID =... |
<gh_stars>1-10
/* create user location stream */
CREATE STREAM user_location
(user_id VARCHAR,
t_time_stamp VARCHAR,
t_millis INTEGER,
latitude DOUBLE,
longitude DOUBLE)
WITH (KAFKA_TOPIC='location01',
VALUE_FORMAT='DELIMITED');
/* create transaction location stream */
CREATE STREAM tran... |
<reponame>guofengrichard/gpdb
set time zone PST8PDT;
-- @gucs gp_create_table_random_default_distribution=off
select * from uco_table1 order by bigint_col;
select * from uco_table2 order by col_numeric, col_text;
select * from ucoschema1.uco_table3 order by stud_id;
select * from uco_table3 order by col_numeric, co... |
<reponame>NYMRAZE/erp_project
create table if not exists assets(
id serial primary key not null,
organization_id int not null,
user_id int,
asset_type_id int not null,
branch_id int not null,
managed_by int not null,
asset_name varchar (150) not null,
asset_code varchar (150) unique not ... |
<reponame>navikt/veilarbaktivitet<gh_stars>0
CREATE TABLE SLETTEDE_AKTIVITETER(
AKTIVITET_ID NUMBER(19) NOT NULL,
TIDSPUNKT TIMESTAMP(6) NOT NULL
);
CREATE INDEX SLETTET_DATO_AKTIVITET_IDX ON SLETTEDE_AKTIVITETER (TIDSPUNKT);
CREATE VIEW DVH_SLETTEDE_AKTIVITETER AS (
SELECT
AKTIVITE... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 30, 2019 at 01:57 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
CREATE TABLE [dbo].[OrderItem] (
[OrderItemId] INT IDENTITY (1, 1) NOT NULL,
[OrderId] INT NOT NULL,
[Name] NVARCHAR (100) NOT NULL CONSTRAINT [UQ_OrderItem_Name] UNIQUE,
CONSTRAINT [PK_OrderItem] PRIMARY KEY CLUSTERED ([OrderItemId] ASC),
CONSTRAINT [FK_OrderItem... |
<filename>db/backupbazy.sql
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Wersja serwera: 10.3.9-MariaDB - mariadb.org binary distribution
-- Serwer OS: Win64
-- HeidiSQL Wersja: 9.5.0.5196
-- ---------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.