sql stringlengths 6 1.05M |
|---|
<filename>src/test/resources/sql/create_index/85587e3a.sql<gh_stars>10-100
-- file:create_am.sql ln:38 expect:true
CREATE INDEX grect2ind2 ON fast_emp4000 USING gist2 (home_base)
|
<filename>init.sql
CREATE DATABASE base_rbac_db;
CREATE DATABASE base_rbac_db_development;
CREATE DATABASE base_rbac_db_testing;
GRANT ALL PRIVILEGES ON DATABASE base_rbac_db TO postgres;
GRANT ALL PRIVILEGES ON DATABASE base_rbac_db_development TO postgres;
GRANT ALL PRIVILEGES ON DATABASE base_rbac_db_testing TO pos... |
proc ut_setupevents (SCID, PROCESSORID, APPNAME, EVENTID, EVENTTYPE, EVENTLOC)
;
; Description:
; This proc utilizes three (3) global arrays to implement the capability
; of capturing multiple Event IDs for a given sequence of commands. The
; arrays will hold the AppName, EventID, and EventType respectively that
; the ... |
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1_mysql_m
Source Server Version : 50612
Source Host : 127.0.0.1:3306
Source Database : db-vigor
Target Server Type : MYSQL
Target Server Version : 50612
File Encoding : 65001
Date: 2016-04-10 17:10:44
*/
SET FOREIGN_KEY_CHECKS... |
<filename>TrocaBolas.SqlDatabase/dbo/Tables/CustomerType.sql
CREATE TABLE [dbo].[CustomerType]
(
[CustomerTypeId] INT NOT NULL PRIMARY KEY IDENTITY,
[Description] VARCHAR(50) NOT NULL
)
|
DELETE FROM settings
WHERE settings.name IN('paypal_username', 'paypal_password','paypal_signature'); |
CREATE TABLE Table3(a INT, b INT, c INT, d INT,e int);
go |
<gh_stars>1-10
-- Verify ggircs:swrs/transform/function/load_naics_mapping on pg
begin;
select pg_get_functiondef('swrs_transform.load_naics_mapping()'::regprocedure);
rollback;
|
UPDATE {$NAMESPACE}_legalpad.legalpad_document
SET signatureType = 'user' WHERE signatureType = '';
|
<filename>api/pkg/db/migrate/schema/migrations/000183_changes-parent-change-id-idx.down.sql
DROP INDEX changes_parent_change_id_idx;
|
DROP VIEW "content"."ElementByAccessToken";
|
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50505
Source Host : localhost:3306
Source Database : db_car
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2021-11-10 09:23:40
*/
SET FOREIGN_... |
CREATE PROC [dbo].[Quiz_SelectByCategory]
@Category nvarchar(128)
/*
Declare @_category nvarchar(128) = 'C#'
Execute dbo.Quiz_SelectByCategory
@_category
*/
AS
BEGIN
SELECT [Id]
,[Category]
,[Question]
,[Answer1]
,[Answer2]
,[Answer3]
,[Answer4]
,[Correct]
FROM [dbo].[Quiz]... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 10, 2021 at 01:47 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
-- @@drop
SET SERVEROUTPUT ON
DECLARE
BEGIN
-- Prototype using mjoin
ops.go(ops.mjoin_ra('a=proto_consec_date','b=proto_consec_date','color','color','p_mj_cdate'));
-- Hypothesis test on consecutive mjoins from our broken column length problem.
ops.go(ops.mjoin_ra('a=p_mj_cdate','b=p_mj_cdate','color,a_arb_date','co... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 23, 2021 at 11:47 PM
-- Server version: 8.0.27
-- PHP Version: 7.4.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
<filename>banco/satisfacao.sql
-- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 05-Jun-2018 às 07:27
-- Versão do servidor: 5.5.58-0+deb8u1
-- PHP Version: 5.6.30-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40... |
<gh_stars>0
insert into USERS (USERID, NAME, NICKNAME, PASSWORD, IS_ACTIVE, ROLE, CREATETIME, LASTMODIFIED, TENANTID)
values ('3', 'imma-super', null, '$2b$12$v5yHhy<PASSWORD>sxNjZT9NKiIZ<PASSWORD>.CD<PASSWORD>', '1', 'superadmin', null, now(), '1');
|
use music;
SET FOREIGN_KEY_CHECKS = 0;
LOAD DATA LOCAL INFILE "$FLERE_IMSAHO/data/mysql/clean.csv"
INTO TABLE clip
FIELDS TERMINATED BY ','
ESCAPED BY '"'
IGNORE 1 LINES
(@dummy1, `name`, @dummy2, @dummy3, `probability_low`, `probability_high`);
show warnings;
|
<gh_stars>0
CREATE TABLE bookables (
id SERIAL primary key,
title TEXT NOT NULL,
description TEXT NOT NULL DEFAULT '',
bookable_type TEXT NOT NULL
);
CREATE TABLE bookings (
id SERIAL primary key,
title TEXT NOT NULL,
booker_id TEXT NOT NULL DEFAULT '',
start_time TEXT NOT NULL,
end_... |
<filename>SQL_QUERYS/G2 - G3 - Copia Parametros de Grupo.sql
--ALTER TABLE GAMA..G3_gerencialParametroRateio ADD created_by INT
--ALTER TABLE GAMA..G3_gerencialParametroRateio ADD updated_by INT
--select * from GAMA..G3_gerencialParametroRateio
--select * from GAMA..G3_gerencialCentroCusto
--select * from GAMA..G3_gere... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 08 Des 2020 pada 21.45
-- Versi server: 10.1.38-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... |
-- Gets the User ID from the request cookie
create or replace function auth.uid() returns uuid as $$
select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;
$$ language sql stable;
|
CREATE OR REPLACE FUNCTION ts.updatedatasetnotes(_datasetid integer,
_datasetnotes character varying DEFAULT NULL::character varying)
RETURNS void
LANGUAGE plpgsql
AS $function$
BEGIN
IF _datasetnotes IS NOT NULL THEN
UPDATE ndb.datasets
SET ... |
<gh_stars>10-100
begin;
drop table if exists kershaw.pitches;
create table kershaw.pitches (
pitch_type text,
game_date text,
release_speed text,
release_pos_x text,
release_pos_z text,
player_name text,
batter text,
pitcher text,
events text,
description text,
spin_dir text,
spin_rate_depre... |
<reponame>valb3r/GTC-all-repo
ALTER TABLE client_config ADD COLUMN stale_book_threshold_ms INT DEFAULT 60000;
ALTER TABLE client_config ADD COLUMN enabled BIT DEFAULT 1;
|
<gh_stars>10-100
--1-6 problem
CREATE DATABASE Minions
CREATE TABLE Minions
(
Id INT NOT NULL PRIMARY KEY,
Name nvarchar(50),
Age int
)
CREATE TABLE Towns
(
Id INT NOT NULL PRIMARY KEY,
Name nvarchar(50)
)
ALTER TABLE Minions
ADD CONSTRAINT FK_Town FOREIGN KEY (TownId) -- makes TownId foreign key and references... |
-- file:object_address.sql ln:70 expect:true
select * from pg_get_object_address('operator of access method', '{btree,integer_ops,99}', '{int4,int4}')
|
CREATE DATABASE IF NOT EXISTS `weichu_youdianpu_db` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `weichu_youdianpu_db`;
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: 127.0.0.1 Database: weichu_youdianpu_db
-- ------------------------------------------------------
-- Server version 5.7.22
... |
<filename>schemas/payroll/mssql/up-99-job-2019-09-16-00-00-00-daily-time-entry-except-customer-service.sql
use payroll
execute p_add_time_entry @employee_id=21, @entry_date='2019-09-16 00:00:00', @hours_worked=4
execute p_add_time_entry @employee_id=63, @entry_date='2019-09-16 00:00:00', @hours_worked=6
execute p_add... |
<reponame>aravi5/drill-test-framework
select * from `parquet_storage/customer_snappyimpala.parquet`; |
{% macro get_powers_of_two(upper_bound) %}
{% if upper_bound <= 0 %}
{{ exceptions.raise_compiler_error("upper bound must be positive") }}
{% endif %}
{% for _ in range(1, 100) %}
{% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}
{% endfor %}
{% endmacro %}
{% ma... |
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1008253387935027201', 'userAuth', 'system', '[0],[system],', '授权', '', '/userAuth', '99', '2', '1', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`... |
--
-- Copyright 2015 Tampere University of Technology, Pori Department
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless r... |
CREATE DATABASE IF NOT EXISTS `unno` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `unno`;
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: 127.0.0.1 Database: unno
-- ------------------------------------------------------
-- Server version 5.6.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
<reponame>quixxxy/casquatch
CREATE KEYSPACE springrest WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
CREATE TABLE springrest.table_name (
key_one int,
key_two int,
col_one text,
col_two text,
PRIMARY KEY (key_one, key_two)
); |
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
ALTER TABLE orgs ADD COLUMN invite_signing_key TEXT;
|
<filename>orcas_integrationstest/tests/test_constraint_fk_dropmode/erzeuge_zielzustand.sql
create table tab_a
(
tab_a_id number(9) not null,
constraint pk_tab_a primary key (tab_a_id)
);
create table tab_del_cascade
(
id number(8),
tab_a_id number(8),
constraint fk_tab_del_cascade foreign key (t... |
#standardSQL
# Optimal type used for email and phone inputs
CREATE TEMPORARY FUNCTION getInputInfo(payload STRING)
RETURNS ARRAY<STRUCT<detected_type STRING, using_best_type BOOLEAN>> LANGUAGE js AS '''
const new_line_regex = new RegExp('(?:\\r\\n|\\r|\\n)', 'g');
function isFuzzyMatch(value, options) {
value =... |
-- Verify delivery:notification_config_constraints on pg
BEGIN;
SELECT id,
notification_type,
name,
settings,
enabled,
organization_id
FROM notification_config
WHERE FALSE;
SELECT 1/COUNT(*)
FROM pg_class c
JOIN pg_namespace n ON n.oid = c.relnamespace
... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 17, 2018 at 12:15 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... |
<gh_stars>1-10
INSERT INTO public.users (guid, id, name, email, password, description, update_time) VALUES ('2660a6e9-9e6b-4faa-8264-27a92872657b', 190707231513, 'test user', '<EMAIL>', '{CRYPT}$2a$08$/Z3BoSd2cOO1Enb4xckj9Ocl/8dWGzUxlyaI0fDLveDSEPHQh6XiG', NULL, '2019-07-07 23:20:20');
INSERT INTO public.users (guid, i... |
<filename>assets/komentar_galeri-24-06-2019-05-04-beta.sql
-- Generation time: Mon, 24 Jun 2019 07:45:48 +0000
-- Host: mysql.hostinger.ro
-- DB name: u574849695_23
/*!40030 SET NAMES UTF8 */;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL... |
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION)
values (NEXTVAL('SEQ_EG_ACTION'),'getWardsByLocality','/boundary/ward-bylocality',null,(select id from EG_MODULE where name = 'Boundary Modu... |
<filename>S.41 with Contextual Statements.sql
use NBNData;
/*
TODO:
- Some contextuals aren't appearing. Need to do a taxon
expansion an bring in the fact where it exists.
- Try Curlew (Numenius arquata). Example record is:
THU0000200030OS9.
*/
with s41
as
(
select distinct --top... |
<reponame>jeromebailey/cowp-sub
/*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 5.7.14 : Database - co_wp
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!400... |
INSERT INTO cartorioapresentante ( `id_cartorio`, `id_apresentante`, `codigo`) VALUES (33, 38, 100);
INSERT INTO cartorioapresentante ( `id_cartorio`, `id_apresentante`, `codigo`) VALUES (33, 39, 101);
INSERT INTO cartorioapresentante ( `id_cartorio`, `id_apresentante`, `codigo`) VALUES (33, 40, 102);
INSERT INTO carto... |
<reponame>crisgol/oreo<filename>test/schema/mysql.sql
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS battles CASCADE;
DROP TABLE IF EXISTS samples CASCADE;
DROP TABLE IF EXISTS books CASCADE;
DROP TABLE IF EXISTS authors CASCADE;
DROP TABLE IF EXISTS Countries CASCADE;
DROP TABLE IF EXISTS ratings CASCADE;
CREATE ... |
<reponame>franek/wallabag<filename>data/sql/sqlite_base.sql
CREATE TABLE wallabag_craue_config_setting (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, PRIMARY KEY(name));
CREATE UNIQUE INDEX UNIQ_5D9649505E237E06 ON wallabag_craue_config_setting (name);
CREATE TABLE "wal... |
<reponame>MorphineForOdin/CyberCraft
--============================================================================
USE TechMarket;
GO
------------------------------------------------------------------------------
SET IDENTITY_INSERT dbo.ProductAttributes ON;
--==========================================================... |
<reponame>rashmi8105/Synapse<gh_stars>0
/*
-- Query: SELECT * FROM synapse.contact_types_lang
LIMIT 0, 1000
-- Date: 2014-11-05 15:30
*/
INSERT INTO `contact_types_lang` (`id`,`contact_types_id`,`language_master_id`,`created_by`,`created_at`,`modified_by`,`modified_at`,`deleted_by`,`deleted_at`,`description`) VALUES (... |
CREATE VIEW [dbo].[vSensorThingsAPIObservedProperties]
AS
Select Distinct
PhenomenonOfferingID ID,
PhenomenonCode, PhenomenonName, PhenomenonDescription, PhenomenonUrl,
OfferingCode, OfferingName, OfferingDescription
from
vInventorySensors
|
SELECT active,
COUNT(payment_id) AS num_transactions,
AVG(amount) AS avg_amount,
SUM(amount) AS total_amount
FROM payment AS p
INNER JOIN customer AS c
ON p.customer_id = c.customer_id
GROUP BY active;
SELECT name,
STRING_AGG(title, ',') AS film_titles
FROM film AS f
INNER JOIN language AS... |
<gh_stars>1-10
-- Verify schemas/inflection/tables/inflection_rules/fixtures/1589249334312_fixture on pg
BEGIN;
ROLLBACK;
|
<reponame>Barnabas/tinyhttp
/*
Updates a User record.
*/
UPDATE
users
SET
name = ($1)
WHERE
id = ($2) |
<filename>services/data/migrations/1603814344323_alter_table_contactcenter_default_payout_settings_add_column_payoutValue/up.sql
ALTER TABLE "contactcenter"."default_payout_settings" ADD COLUMN "payoutValue" numeric NULL;
|
<reponame>ARCEP-dev/algo_maconnexioninternet<gh_stars>1-10
\timing
--- Réinitialisation : Suppression de toutes les entités de la table eligibilite.actuel ayant pour techno_id celui de la techno Cuivre.
DELETE FROM eligibilite.actuel WHERE techno_id IN (SELECT id FROM reference.techno WHERE code = 'CU');
---Maintenan... |
<filename>services/madoc-ts/migrations/down/2020-09-01T15-06.fix-flat-collections.sql
--fix-flat-collections (down)
|
<reponame>acodrington/EFCorePowerTools
USE [Northwind]
GO
/****** Object: Schema [dupe] Script Date: 11-12-2020 11:18:10 ******/
CREATE SCHEMA [dupe]
GO
/****** Object: Schema [MySchema] Script Date: 11-12-2020 11:18:10 ******/
CREATE SCHEMA [MySchema]
GO
/****** Object: Table [dbo].[Customers] Script Date... |
<reponame>markddrake/XFILES
/* ================================================
* Oracle XFiles Demonstration.
*
* Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documen... |
<reponame>CRUSADER111/SupportForm-Reinitialised<gh_stars>0
--
-- Database structure for database `supportdb`
--
DROP DATABASE IF EXISTS `supportdb`;
CREATE DATABASE `supportdb`;
USE `supportdb`; |
<reponame>pavanchokshi/MobileSensingAsService
-- MySQL dump 10.13 Distrib 5.6.27, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1 Database: mobisense_db
-- ------------------------------------------------------
-- Server version 5.6.27-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
CREATE TABLE blog_users (
id int not null auto_increment,
username varchar(64) not null default '',
password varchar(128) not null default '',
nickname varchar(64) not null default '',
intro text default null,
avatar varchar(255) not null default '',
primary key(id)
) ENGINE innodb CHARSET utf8;
CREATE TABLE bl... |
CREATE TABLE `user_sessions` (
`session_id` int(11) NOT NULL AUTO_INCREMENT,
`session_no` varchar(255) DEFAULT NULL,
`session_start` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`user_id` int(11) DEFAULT NULL,
PRIMARY KEY (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
<filename>src/Coalesce.Framework.Persister.PostgreSQL/src/main/scripts/CreateCoalesceTables.sql
-- Table: CoalesceEntity
CREATE TABLE :myschema.CoalesceEntity
(
ObjectKey uuid NOT NULL,
Name text,
Source text,
Version text,
EntityId text,
EntityIdType text,
EntityXml text,
DateCreated timestamp with ti... |
--
-- Remove all DBIx-SQLCrosstab example tables
--
DROP TABLE xtab_categories;
DROP TABLE xtab_class;
DROP TABLE xtab_countries;
DROP TABLE xtab_customers;
DROP TABLE xtab_departments;
DROP TABLE xtab_locations;
DROP TABLE xtab_person;
DROP TABLE xtab_sales;
|
CREATE OR REPLACE VIEW latest_functional_transaction_time AS
select tt.title as title, max(tt.start_timestamp) as newest_start_timestamp
from `transaction` as tt
where
tt.hidden = false
and tt.tasks_failed = 0
group by tt.title;
CREATE OR REPLACE VIEW latest_functional_transaction A... |
<reponame>faizol/babelfish_extensions<gh_stars>100-1000
create table t1(a int);
go
create table t2(a int);
go
create procedure sp_trancount as
select @@trancount;
GO
create procedure sp_commit_no_begin as
insert into t1 values(3);
commit;
select * from t1;
GO
create procedure sp_rollback_no_begin as
insert into t1 valu... |
<reponame>doublemcz/dibi-migrations
ALTER TABLE users
ADD COLUMN street varchar(16) NOT NULL; |
<gh_stars>10-100
ALTER TABLE `web_domain` CHANGE `pm_max_children` `pm_max_children` INT( 11 ) NOT NULL DEFAULT '10', CHANGE `pm_start_servers` `pm_start_servers` INT( 11 ) NOT NULL DEFAULT '2', CHANGE `pm_min_spare_servers` `pm_min_spare_servers` INT( 11 ) NOT NULL DEFAULT '1', CHANGE `pm_max_spare_servers` `pm_max_sp... |
-- -----------------------------------------------------------
-- Dummy patch file
-- Do not edit this file
-- See README.txt in sql folder for detailed instructions
-- ----------------------------------------------------------- |
<reponame>Zhaojia2019/cubrid-testcases<gh_stars>1-10
--[er]test alias using a invalid alias
create class DML_0001(
int_col int not null,
var_col varchar(20),
set_col set (int,varchar(20)));
select 12.int_col from DML_0001 as 12 order by 1;
drop class DML_0001;
|
<filename>openGaussBase/testcase/PROCEDURE/FUNC_CLOB/Opengauss_Function_Procedure_FClob_Case0012.sql<gh_stars>0
-- @testpoint: 自定义函数clob数据类型的测试--clob和char/varchar类型的转换结合%type类型测试
drop table if exists fvt_func_clob_table_012;
create table fvt_func_clob_table_012(
t1 int,
t2 char(8000),
t3 varchar2(8000)
);
inse... |
<filename>schema.sql
DROP DATABASE IF EXISTS employee_trackerDB;
CREATE DATABASE employee_trackerDB;
USE employee_trackerDB;
CREATE TABLE department(
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
name VARCHAR(30) NOT NULL
);
CREATE TABLE role(
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(30... |
ALTER TABLE categorylinks ADD cl_type VARCHAR(6) FOR BIT DATA NOT NULL
|
--------------------------------------------------------------------------------------------------------
/*
Akcelerant Software Framework Create Database Script
Before running, replace the following strings with proper values:
DB_NAME
DB_DATAPATH_TYPE (DEFAULT or PATH)
DB_DATAFILEPATH (Last character must b... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 03-05-2020 a las 13:33:50
-- Versión del servidor: 10.3.22-MariaDB-0+deb10u1
-- Versión de PHP: 7.3.14-1~deb10u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET t... |
<filename>sql/stored_procedures/sp_user_update.sql<gh_stars>0
DELIMITER //
DROP PROCEDURE IF EXISTS sp_user_update //
CREATE PROCEDURE sp_user_update (
IN user_id BIGINT ( 20 ) UNSIGNED,
IN title VARCHAR ( 12 ),
IN firstname VARCHAR ( 255 ),
IN lastname VARCHAR ( 255 ),
IN email VARCHAR ( 255... |
--SQL Exercises, Practice, Solution - UNION
-- 1. From the following tables, write a SQL query to
-- find all salespersons and customer who located in 'London' city.
select * from salesman s ;
select * from customer c ;
select s.salesman_id "ID",s.name,'Salesman'
from salesman s where s.city='London'
union
sele... |
-- here are three queries (mark them individually to run them) to select table data
SELECT "ProductCode", "ProductName",
"UnitPrice", "District"
FROM public."Products"
WHERE "UnitPrice" < 160::money;
SELECT "Date", "ProductCode", "Quantity"
FROM public."Sales";
SELECT "ExportDestCode", "ExportDestName"
FROM ... |
\c postgres;
DROP DATABASE IF EXISTS uoft WITH (FORCE);
CREATE DATABASE uoft;
\c uoft;
CREATE TABLE department (
code CHAR(3) PRIMARY KEY,
full_name VARCHAR(150) NOT NULL,
info VARCHAR(1000)
);
CREATE TABLE breadth_category (
id SMALLINT PRIMARY KEY CHECK (id > 0),
category VARCHAR(150) NOT NULL,
... |
CREATE DATABASE [TOK_MCO]
/****** Object: Table [dbo].[TokenDateTime] Script Date: 12/15/2015 2:44:35 PM ******/
USE [TOK_MCO]
GO
CREATE TABLE [dbo].[TokenDateTime](
[Token] [datetime] NOT NULL,
[DomainIdentifier] [int] NULL,
[BusinessEntityIdentifier] [int] NULL,
[RepeatableFlag] [bit] NULL,
[TokenExpiryDat... |
<filename>sql/schema.003.sql
-- Quests
-- Wheter the quest is repeatable
ALTER TABLE public.game_quests ADD COLUMN repeatable int NOT NULL DEFAULT 0;
ALTER TABLE public.game_quests ADD COLUMN description text NOT NULL DEFAULT ''::character varying;
INSERT INTO public.versions (name, value, internal) VALUES ('game_ques... |
<reponame>invertedv/mortgage_imports<gh_stars>0
CREATE TABLE econ.XXXXX
(
dt Date,
YYYYY ZZZZZ,
unemp_rate Float32
)
ENGINE = MergeTree()
ORDER BY (dt, YYYYY)
|
<reponame>grazies/Phoenix
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE sp_ClearWapMappingData
AS
BEGIN
DELETE FROM [dbo].[WAPMAPPINGDATA]
END
|
DROP TABLE IF EXISTS `pre_api_app`;
DROP TABLE IF EXISTS `pre_api_controller`;
DROP TABLE IF EXISTS `pre_api_action`;
DROP TABLE IF EXISTS `pre_api_param`;
DROP TABLE IF EXISTS `pre_api_code`;
DROP TABLE IF EXISTS `pre_api_member`; |
ALTER TABLE public.case_payment_orders
ADD COLUMN IF NOT EXISTS history_exists BOOLEAN;
ALTER TABLE public.case_payment_orders_audit
ADD COLUMN IF NOT EXISTS history_exists BOOLEAN;
ALTER TABLE public.case_payment_orders_audit
ADD COLUMN IF NOT EXISTS history_exists_mod BOOLEAN;
|
<reponame>MateusLidonis/MaLab<filename>Database/projeto_pi.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Tempo de geração: 19-Jun-2021 às 00:49
-- Versão do servidor: 5.7.31
-- versão do PHP: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SE... |
<gh_stars>1-10
create view "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab2__dbt_tmp" as (
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
select
cast("id" as
varchar
) as "id",
cast("date" as
varchar
) as "da... |
<gh_stars>100-1000
CREATE TABLE survey_vote (
message bigint references message(id),
player integer references player(id),
item int2 NOT NULL,
PRIMARY KEY(message, player)
);
create index survey_vote_idx on survey_vote (message,item);
|
<reponame>manikanth/sql-server-samples<filename>samples/features/ssms-templates/Sql/SQL Azure Database/Stored Procedure/Create Natively Compiled Stored Procedure.sql
--======================================================
-- Create Natively Compiled Stored Procedure Template
--=========================================... |
-- 05.01.2016 10:52
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsCalculated='Y',Updated=TO_TIMESTAMP('2016-01-05 10:52:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=546225
;
-- 05.01.2016 10:52
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator... |
drop table if exists household_demographics_text;
create table household_demographics_text
(
hd_demo_sk int,
hd_income_band_sk int,
hd_buy_potential string,
hd_dep_count int,
hd_vehicle_count int
)
USING csv
OPTIONS(header "false", delimiter "|",... |
<filename>database/insert_script.sql
-- ----------------------------------------------------------------------
-- SQL data bulk transfer script generated by the MySQL Migration Toolkit
-- ----------------------------------------------------------------------
-- Disable foreign key checks
SET @OLD_FOREIGN_KEY_CHEC... |
<filename>database-postgresql/src/domains/sku.sql
CREATE DOMAIN sku AS VARCHAR(35)
CHECK (
VALUE ~ '^[-A-Z0-9]*$'
AND not_empty(VALUE)
);
|
<reponame>jmlauron118/BucketList<filename>app/model/iconModel/getTotalIcon.sql
SELECT
COUNT(*)
FROM
ICON
; |
INSERT INTO `Brands` (brand_id, brand_title)
VALUES (NULL,'Apple');
INSERT INTO `categories` (cat_id, cat_title)
VALUES (NULL,'Smartphones');
INSERT INTO `products` (product_id, product_title, product_price, product_desc, product_img, product_keywords, product_brand, product_cat)
VALUES (NULL, 'Apple iPhone 7', ... |
<filename>test/expectations/should-parse-with-all-basic-operators.sql
((((age > 14) AND (rank < 23)) AND (price >= 22.4)) AND (namespace <= 5.4)) AND (name LIKE '%Product % name%') |
<filename>org.openbel.framework.core/src/main/resources/MySQL/kam_catalog/0.sql
CREATE DATABASE @
## |
-- Tickets table definition.
CREATE TABLE tickets
(
id BIGSERIAL NOT NULL,
issuer VARCHAR(50) NOT NULL,
owner VARCHAR(50) NOT NULL,
subject VARCHAR(255) NOT NULL,
content TEXT NOT NULL,
metadata TEXT,
importance_level ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.