sql stringlengths 6 1.05M |
|---|
DEFINE RECORD CDD$TOP.TK.TK_WORDLIST
DESCRIPTION IS /*Spelling Word List*/.
TK_WORDLIST_CDD STRUCTURE.
END TK_WORDLIST_CDD STRUCTURE.
END TK_WORDLIST.
|
<reponame>navikt/fp-abakus
ALTER TABLE iay_inntektspost
ADD COLUMN opprinelig_utbetaler_orgnr VARCHAR(19);
comment on column iay_inntektspost.opprinelig_utbetaler_orgnr is 'Hvilken enhet som opprinnelig stod for denne utbetalingen.';
|
<reponame>Renanrbsc/Machine-Learning
-- Tabela da Api produtos 'nao testada'
CREATE TABLE PRODUTO (
ID INT(11) NOT NULL AUTO_INCREMENT,
NOME VARCHAR(100) NOT NULL,
TIPO VARCHAR(100) NOT NULL,
MARCA VARCHAR(100) NOT NULL,
QUANTIDADE INT(11) NOT NULL,
VALOR FLOAT(2) NOT NULL,
VALIDADE DATE,
... |
/*
Add number of crime victimisations to the fact table and relevant dimensions to the dimension tables
Takes about 3 minutes in total
<NAME> 26 September 2017
<NAME> 16 October 2017,
Updates to align with new dim_date table:
NOTE: uses date offence is REPORTED, not date it OCCURRED.
*/
IF OBJECT_ID('TempDB..#... |
CREATE ROLE projectname;
ALTER ROLE projectname WITH LOGIN PASSWORD '<PASSWORD>' NOSUPERUSER NOCREATEDB NOCREATEROLE;
CREATE DATABASE projectname OWNER projectname;
REVOKE ALL ON DATABASE projectname FROM PUBLIC;
GRANT CONNECT ON DATABASE projectname TO projectname;
GRANT ALL ON DATABASE projectname TO projectname; |
/*
Warnings:
- A unique constraint covering the columns `[userId]` on the table `sessions` will be added. If there are existing duplicate values, this will fail.
*/
-- DropIndex
DROP INDEX "sessions_accessToken_key";
-- AlterTable
ALTER TABLE "sessions" ALTER COLUMN "accessToken" DROP NOT NULL;
-- CreateIndex
C... |
<filename>06. Databases/2018/2018.11.10/611.sql
/* 611. Average Interest */
USE gringotts;
SELECT deposit_group,
is_deposit_expired,
AVG(deposit_interest) AS average_interest
FROM wizzard_deposits
WHERE deposit_start_date >= 01/01/1985
GROUP BY deposit_group, is_deposit_expired
ORDER BY deposit_group DE... |
<filename>src/main/resources/db/migration/V9__optimized_4.sql
ALTER TABLE `t_config`
CHANGE COLUMN `config_value` `config_value` TEXT NULL COMMENT '参数值' AFTER `config_key`;
INSERT INTO `hexo-boot`.`t_config` (`config_key`, `config_value`, `remark`) VALUES ('we_chat_official_account', "", '微信公众号');
|
<gh_stars>100-1000
/* Make first and last name optional and add email confirmation */
alter table Cofoundry.[User] alter column FirstName nvarchar(32) null
alter table Cofoundry.[User] alter column LastName nvarchar(32) null
alter table Cofoundry.[User] add IsEmailConfirmed bit null
go
update Cofoundry.[User] set I... |
select '1'::int::boolean as bool;
update table_name
set
col1 = CURRENT_TIMESTAMP::TIMESTAMP_TZ,
col2 = '1'::int::boolean
;
|
with trans as (UPDATE "Avatars"
SET "coins" = "coins" + ${amount}
WHERE id = ${id} returning *)
INSERT INTO "CoinTransactions" (delta, coins, "createdAt", "AvatarId")
values (${amount}, (select coins from trans), CURRENT_TIMESTAMP, ${id});
|
CREATE TABLE [dbo].[RESOURCE]
(
[Id] UNIQUEIDENTIFIER NOT NULL,
[CreatedDate] DATETIME NOT NULL,
[UpdatedDate] DATETIME NOT NULL,
[Name] NVARCHAR(MAX) NOT NULL,
[Path] NVARCHAR(MAX) NOT NULL,
[UserDefinableId] UNIQUEIDENTIFIER NOT NULL
) |
<reponame>OWASP/open-swamp
# v1.13
use assessment;
drop PROCEDURE if exists upgrade_35;
DELIMITER $$
CREATE PROCEDURE upgrade_35 ()
BEGIN
declare script_version_no int;
declare cur_db_version_no int;
set script_version_no = 35;
select max(database_version_no)
into cur_db_version_no
from a... |
-- -----------------------------------------------------------------------------------------------------
--
-- #%L
-- isy-persistence
-- %%
--
-- %%
-- See the NOTICE file distributed with this work for additional
-- information regarding copyright ownership.
-- The Federal Office of Administration (Bundesver... |
<gh_stars>1-10
-- 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.
SELECT DISTINCT
ssd.studentsection... |
<gh_stars>10-100
drop table if exists rule cascade;
drop table if exists rule_group cascade;
drop table if exists rule_data_group cascade;
drop table if exists rule_layer_group cascade;
-- rule_group ---
-- rule 그룹
create table rule_group (
rule_group_id integer,
rule_group_name var... |
<gh_stars>10-100
CREATE TABLE BATCHEX_ITEM_HASH (
`item_key` varchar(200) NOT NULL PRIMARY KEY,
`item_hash` varchar(50) NOT NULL,
`expiry` datetime NOT NULL
); |
begin;
create table account(
id serial primary key,
email varchar(255) not null
);
comment on table account is e'@graphql({"totalCount": {"enabled": true}})';
insert into public.account(email)
values
('<EMAIL>');
create table blog(
id serial primary key,
... |
<filename>Web/Install/Core/Database/mysql/1.5.0.sql
/*
* DDL Changes
*/
ALTER TABLE cuyahoga_site
ADD COLUMN metadescription MEDIUMTEXT;
ALTER TABLE cuyahoga_site
ADD COLUMN metakeywords MEDIUMTEXT;
ALTER TABLE cuyahoga_node
ADD COLUMN metadescription MEDIUMTEXT;
ALTER TABLE cuyahoga_node
ADD CO... |
<gh_stars>0
#create table politicians_votes(
# politician_id integer not null references politicians(id),
# vote_id integer not null references vote(id)
#);
|
CREATE DATABASE Project0;
GO
CREATE SCHEMA Project0;
GO
CREATE TABLE Project0.Cupcake (
CupcakeId INT NOT NULL PRIMARY KEY IDENTITY,
Type NVARCHAR(100) NOT NULL,
Cost DECIMAL(8,2) NOT NULL DEFAULT(6.00)
);
CREATE TABLE Project0.Ingredient (
IngredientId INT NOT NULL PRIMARY KEY IDENTITY,
Type NVARCHAR(100) NOT ... |
INSERT INTO burgers (burger_name) VALUES ('Quarter Pounder with Cheese');
INSERT INTO burgers (burger_name) VALUES ('Impossible Whopper');
INSERT INTO burgers (burger_name) VALUES ('BBQ Bacon Burger');
INSERT INTO burgers (burger_name, devoured) VALUES ('Veggie Burger', true); |
-- --------------------------------------------------------
-- Хост: 127.0.0.1
-- Версия сервера: 5.6.25 - MySQL Community Server (GPL)
-- ОС Сервера: Win32
-- HeidiSQL Версия: 9.3.0.4984
-- --------------------------------------------------------
/*... |
<filename>db/tables/TransactionStatus.sql
/*
Transaction statuses
*/
CREATE TABLE [dbo].[TransactionStatus](
[Status] [int] NOT NULL,
[Name] [nvarchar](20) NOT NULL,
[Description] [nvarchar](1000) NOT NULL,
CONSTRAINT [PK_TransactionStatus] PRIMARY KEY CLUSTERED
(
[Status] ASC
)WITH (PAD_INDEX = OFF, STATISTIC... |
SELECT t1.name, count(*)
FROM
site as s,
so_user as u1,
question as q1,
answer as a1,
tag as t1,
tag_question as tq1
WHERE
q1.owner_user_id = u1.id
AND a1.question_id = q1.id
AND a1.owner_user_id = u1.id
AND s.site_id = q1.site_id
AND s.site_id = a1.site_id
AND s.site_id = u1.site_id
AND s.site_id = tq1.site_id
AND s.s... |
<gh_stars>0
-- psql $POSTGRES_URL -f tpch-postgres.sql
DROP TABLE IF EXISTS LINEITEM;
CREATE TABLE LINEITEM ( L_ORDERKEY INTEGER NOT NULL,
L_PARTKEY INTEGER NOT NULL,
L_SUPPKEY INTEGER NOT NULL,
L_LINENUMBER INTEGER NOT ... |
<filename>data/open-source/extracted_sql/Automattic_Jetpack.sql
SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1
SELECT 1 FROM $wpdb->posts WHERE ID = %d )
SELECT object_id, term_taxonomy_id FROM $wpdb->term_relationships WHERE object_id IN (
SELECT count(*) FROM $wpdb->posts WHERE
SELECT COUNT(... |
<gh_stars>1-10
SELECT jsonPayload.password AS passwd, COUNT(jsonPayload.password) AS cnt
FROM `gcp-honeypot-book.cowrie.cowrie_access_*`
WHERE
_TABLE_SUFFIX BETWEEN FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH))
AND FORMAT_DATE('%Y%m%d', CURRENT_DATE())
AND (jsonPayload.eventid = 'cowrie.login.s... |
<gh_stars>10-100
CREATE PROCEDURE [dbo].[BulkUpdateIssueEvents]
@UserId BIGINT,
@RepositoryId BIGINT,
@Timeline BIT,
@IssueEvents IssueEventTableType READONLY,
@ReferencedAccounts ItemListTableType READONLY
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT stat... |
-- file:transactions.sql ln:413 expect:true
ROLLBACK TO s1
|
<reponame>Shuttl-Tech/antlr_psql
-- file:path.sql ln:36 expect:true
SELECT '' AS count, pclose(f1) AS closed_path FROM PATH_TBL
|
-- 1830 Number of measurement records inside a valid observation period
SELECT
1830 AS analysis_id,
CAST(NULL AS VARCHAR(255)) AS stratum_1,
CAST(NULL AS VARCHAR(255)) AS stratum_2,
CAST(NULL AS VARCHAR(255)) AS stratum_3,
CAST(NULL AS VARCHAR(255)) AS stratum_4,
CAST(NULL AS VARCHAR(255)) AS stratum_5,
COUNT_... |
CREATE TABLE Messages (
ID int NOT NULL,
scadenza datetime NOT NULL,
destinatario varchar(16) NOT NULL,
testo varchar(1000) NOT NULL,
titolo varchar(100) NOT NULL,
PRIMARY KEY (ID)
);
INSERT INTO Messages (ID, scadenza, destinatario, testo, titolo) VALUES (1, '2020-11-30', 'MRRSSI79C01E388D', '... |
<filename>scripts/postgres_tables/verifiermain.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.4
-- Dumped by pg_dump version 12.4
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
... |
<reponame>chhavip/debaised-analysis<filename>intents/data/spider_eval/spider/database/dog_kennels/schema.sql
version https://git-lfs.github.com/spec/v1
oid sha256:aaa60f4dc4d0198bb3031b144b8ccdc32ec5f68c1e819a3999736dcd76633c8f
size 21522
|
<reponame>jichuangsi/69Vedio_console
alter table ms_member add `try_and_see` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '剩余试看次数';
DROP TABLE IF EXISTS `ms_video_try_log`;
CREATE TABLE `ms_video_try_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`video_id` int(11) NOT NULL COMMENT '视频id',
`user_id` int(11) DEFAU... |
IF OBJECT_ID('inventory.get_brand_id_by_brand_name') IS NOT NULL
DROP FUNCTION inventory.get_brand_id_by_brand_name;
GO
CREATE FUNCTION inventory.get_brand_id_by_brand_name(@brand_name national character varying(24))
RETURNS integer
AS
BEGIN
RETURN
(
SELECT brand_id
FROM inventory.bra... |
<gh_stars>1-10
/*
Navicat MySQL Data Transfer
Source Server : jxc_db
Source Server Version : 50632
Source Host : localhost:3306
Source Database : jxc_db
Target Server Type : MYSQL
Target Server Version : 50632
File Encoding : 65001
Date: 2017-08-09 09:24:12
*/
SET FOREIGN_KEY_CHEC... |
select *
from aws.aws_dms_replication_instance
where arn = '{{ output.resource_aka.value }}1p000'; |
<filename>azkaban-db/src/main/sql/upgrade.3.69.0.to.3.70.0.sql
-- DB Migration from release 3.69.0 to 3.70.0
-- PR #2140 Implements “flowPriority” (at the time of polling) feature for new dispatching logic.
-- flow_priority column can hold a positive int, negative int or 5 which is the default flow
-- priority set in E... |
SELECT
listing_changes_mview.id,
event_id,
taxon_concept_id,
original_taxon_concept_id,
CASE
WHEN listing_changes_mview.change_type_name = 'DELETION'
OR listing_changes_mview.change_type_name = 'RESERVATION_WITHDRAWAL'
THEN FALSE
ELSE listing_changes_mview.is_current
END AS is_current,
l... |
INSERT INTO department (name)
VALUES
('c suite'),
('marketing'),
('engineering');
INSERT INTO role (title, salary, department_id)
VALUES
('CEO', 60, 1),
('sales lead', 50, 2),
('salesperson', 45, 2),
('engineering lead', 50, 3),
('engineer', 47, 3),
('executive secretary', 45, 1);na... |
<reponame>anqh/anqh
CREATE TABLE `blog_entries` (
`id` int(11) NOT NULL auto_increment,
`author_id` int(11) NOT NULL,
`name` varchar(250) collate utf8_swedish_ci default NULL,
`content` text collate utf8_swedish_ci,
`created` int(11) default NULL,
`view_count` int(11) default '0',
`modified` int(11) defau... |
<reponame>matthaw/bookstore-api<filename>src/main/resources/db/migration/V2__Populate_Table_Person.sql
INSERT INTO person (address, first_name, gender, last_name)
VALUES ('Uberlândia - Minas Gerais - Brasil', 'Leandro', 'Male', 'Costa'),
('Uberlândia - Minas Gerais - Brasil', 'Gabriela', 'Female', 'Costa'),
... |
<reponame>vijendra-codingkart/Node-Work
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 11, 2019 at 05:44 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 5.6.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET ... |
<reponame>egalli64/hron
-- union example
-- two queries on two different tables...
select title as info, 'job' as source
from job
where title like 'A%';
select name, 'department'
from department
where name like 'A%';
-- ... could give a combined result set
select title as info, 'job' as source
from job
w... |
ALTER TABLE booking ADD `booking_reference` VARCHAR(60);
|
<filename>kernel/Install/Install.sql
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `__PREFIX__bill`;
CREATE TABLE `__PREFIX__bill` (
`id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id',
`owner` int UNSIGNED NOT NULL COMME... |
create or replace package body SearchArea as
function searchPlace(loc in location.area@site_link%TYPE)
return number
is
sl number := 0;
begin
select lid into sl from location@site_link
where area = loc;
return sl;
exception
when no_data_found then
dbms_output.put_line('No location found !!... |
-------------------------------------------------------
--
-- Title : [dbo].[GetAverageCommunityRating]
-- Description : This function can be used to retrieve average rating of a Community
-- Input : ID of the Community.
-- Output : Average Rating of the community.
-- Author : v-vichan
-- D... |
DROP TABLE IF EXISTS TASK;
DROP TABLE IF EXISTS ApplicationUser;
create table if not exists TASK (
id int GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1) primary key,
description varchar(7000000));
create table if not exists ApplicationUser (
id int GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCR... |
<filename>db/mysql/resumen_fenograma_ejecucion.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 27-10-2020 a las 15:58:55
-- Versión del servidor: 10.1.36-MariaDB
-- Versión de PHP: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMI... |
<filename>CMSDataScripts/dbo/Views/vw_carrot_CategoryURL.sql
CREATE VIEW [dbo].[vw_carrot_CategoryURL]
AS
select s.SiteID, cc.ContentCategoryID, cc.CategoryText, cc.IsPublic, cc2.EditDate,
ISNULL(cc2.TheCount, 0) as UseCount, ISNULL(cc3.TheCount, 0) as PublicUseCount,
'/' + s.Blog_FolderPath + '/' + s... |
create table sec_messages
(
id int auto_increment
primary key,
guild_id bigint not null,
channel_id bigint not null,
author_name text not null,
author_id bigint ... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Mar 31, 2020 at 02:34 PM
-- Server version: 5.7.26
-- PHP Version: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
CREATE TABLE metric (
id int NOT NULL AUTO_INCREMENT,
wifiSpeed double NOT NULL,
timeStamp VARCHAR(255) NOT NULL,
isConsumed boolean,
PRIMARY KEY (id)
); |
CREATE DATABASE trsearch;
|
{{
config(
tags=['unit-test', 'bigquery', 'snowflake', 'postgres', 'subpack']
)
}}
{% call dbt_unit_testing.test('sub_package_model_b_references_a', 'sample test') %}
{% call dbt_unit_testing.mock_ref ('sub_package_model_a') %}
select 0 as a, 'a' as b
UNION ALL
select 1 as a, 'b' as b
{... |
create or replace function pgq.register_consumer(
x_queue_name text,
x_consumer_id text)
returns integer as $$
-- ----------------------------------------------------------------------
-- Function: pgq.register_consumer(2)
--
-- Subscribe consumer on a queue.
--
-- From this moment forward, consumer w... |
ALTER TABLE `character_pet`
ADD COLUMN `modelid` int(11) unsigned default '0' after `owner`;
UPDATE `character_pet`,`creature_template`
SET `character_pet`.`modelid` = `creature_template`.`modelid_m`
WHERE `character_pet`.`modelid` = 0 AND `character_pet`.`entry` = `creature_template`.`entry`;
UPDATE `character... |
<reponame>uk-gov-mirror/defra.water-abstraction-tactical-crm
alter table crm.entity_roles
add column permissions jsonb;
|
<reponame>Fin3-Technologies-Inc/digital-currency-consortium
ALTER TABLE coin_mint ADD COLUMN address TEXT;
UPDATE coin_mint
SET address = (SELECT address FROM address_registration WHERE address_registration.uuid = coin_mint.address_registration_uuid);
ALTER TABLE coin_mint ALTER COLUMN address SET NOT NULL;
ALTER... |
<filename>src/gateway/sql/static/postgres/v7/create_indexes.sql
-- apis
CREATE INDEX idx_apis_account_id ON apis USING btree(account_id);
-- endpoint_groups
CREATE INDEX idx_endpoint_groups_api_id ON endpoint_groups USING btree(api_id);
-- environments
CREATE INDEX idx_environments_api_id ON environments USING btree(... |
<filename>scripts/migration/migrate_datasets.sql
--copy studyversion fields to datasetversion
update datasetversion
set createtime = sv.createtime,
lastupdatetime = sv.lastupdatetime,
archivetime= sv.archivetime,
archivenote = sv.archivenote,
deaccessionlink = sv.deaccessionlink,
versionnote... |
/*
PT-889
*/
alter table import_event add column import_expected_count integer;
|
SET NAMES utf8mb4;
DROP TABLE IF EXISTS `attachment`;
CREATE TABLE `attachment` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`rid` bigint(20) unsigned NOT NULL COMMENT '资源id',
`name` varchar(50) DEFAULT NULL COMMENT '名称',
`desc` varchar(255) DEFAULT NULL COMMENT '资源描述',
`suffix` varchar(8) DEFAULT N... |
<reponame>Zhaojia2019/cubrid-testcases<filename>sql/_04_operator_function/_03_string_op/_004_position/cases/1010.sql
--test position with two nchar type
select position(n'ch' in n'nchar') from db_root order by 1; |
DROP TABLE IF EXISTS
auto_chat,
auto_chat_text; |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50626
Source Host : localhost:3306
Source Database : pims02
Target Server Type : MYSQL
Target Server Version : 50626
File Encoding : 65001
Date: 2016-07-12 09:28:44
*/
SET FOREIGN_KEY_CHECKS=0;
-- --... |
--
-- The MIT License (MIT)
--
-- Copyright (c) 2020 <NAME>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to us... |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 07-06-2018 a las 09:58:44
-- Versión del servidor: 10.1.32-MariaDB
-- Versión de PHP: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... |
<filename>postresql-database-scripts/01_schema-tables.sql
-- Schema: webimagegallery
-- DROP SCHEMA webimagegallery;
CREATE SCHEMA webimagegallery;
CREATE SEQUENCE webimagegallery."gallery_users_idUser_seq";
CREATE SEQUENCE webimagegallery."gallery_photosets_idPhotoset_seq";
CREATE SEQUENCE webimagegallery."gallery_ph... |
function init_email_validator
(p_dynamic_action in apex_plugin.t_dynamic_action
,p_plugin in apex_plugin.t_plugin)
return apex_plugin.t_dynamic_action_render_result is
l_result apex_plugin.t_dynamic_action_render_result;
begin
apex_plugin_util.debug_dynamic_action
(p_plugin =... |
/*Please add ; after each select statement*/
CREATE PROCEDURE mostExpensive()
BEGIN
SELECT name from Products ORDER BY price*quantity DESC, name LIMIT 1;
END |
-- after "FROM purchases" add code to rows with a date of "2018-11-01" or earlier in the "purchased_at" column
SELECT *
FROM purchases
WHERE purchased_at<="2018-11-01"; |
<gh_stars>1-10
INSERT INTO Autores (nombre) VALUES ('<NAME>');
INSERT INTO Autores (nombre) VALUES ('<NAME>');
INSERT INTO Autores (nombre) VALUES ('Dijkstra');
|
-- file:lseg.sql ln:18 expect:true
INSERT INTO LSEG_TBL VALUES ('[(,2),(3,4)]')
|
<filename>sqlite-ddl.sql
CREATE TABLE date (
d_datekey INT, -- identifier, unique id -- e.g. 19980327 (what we use)
d_date TEXT, -- varchar(18), --fixed text, size 18, longest: december 22, 1998
d_dayofweek TEXT, -- varchar(8), --fixed text, size 8, sunday, monday, ..., saturday)
d... |
<reponame>BenFuhrman/eCommerce-html5up-arcana<filename>CustomerData_Table_2.sql
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 15, 2018 at 03:21 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET ... |
<reponame>hungtin3/SQL4OracleEBS<filename>killsession.sql
set echo off
SET VERIFY off
SET feedback off
set heading off
spool killsniped.log
select 'alter system disconnect session '||''''||sid||','||serial#||''''||' immediate;'
from v$session where schemaname='KTEVNIT';
spool off
set echo on
SET VERIFY on
SET feedb... |
<reponame>BilyachenkoOY/hack121
CREATE TABLE [dbo].[PaymentCategory]
(
[Id] INT NOT NULL PRIMARY KEY,
[Title] nvarchar(300) NOT NULL,
[Keywords] nvarchar(max)
)
|
CREATE TABLE T1 (
id integer NOT NULL,
well character varying(100),
name character varying(100),
);
CREATE TABLE T2 (
id integer NOT NULL,
well character varying(100),
name character varying(100),
);
CREATE TABLE T3 (
id integer NOT NULL,
well character varying(100),
name characte... |
<reponame>ClaySheffler/dbt
-- insert v2 of the 11 - 21 records
insert into {database}.{schema}.archive_expected (
"id",
"first_name",
"last_name",
"email",
"gender",
"ip_address",
"updated_at",
"valid_from",
"valid_to",
"dbt_updated_at",
"scd_id"
)
select
"id",
"fir... |
<reponame>adrianmahjour/db2-samples
--# Copyright IBM Corp. All Rights Reserved.
--# SPDX-License-Identifier: Apache-2.0
/*
* For every ENFORCED PRIMARY KEY, DROP the PK and recreate it NOT ENFORCED
*/
BEGIN
FOR C AS cur CURSOR WITH HOLD FOR
SELECT
VARCHAR(
'ALTER TABLE "' || TABSCHEMA || '"."' ... |
-- @Description Ensures that an vacuum while a vacuum operation is ok
--
DROP TABLE IF EXISTS ao;
CREATE TABLE ao (a INT, b INT) WITH (appendonly=true);
INSERT INTO ao SELECT i as a, i as b FROM generate_series(1, 10000) AS i;
INSERT INTO ao SELECT i as a, i as b FROM generate_series(1, 10000) AS i;
INSERT INTO ao SEL... |
<filename>migrations/364-perm-collections-edit.sql
UPDATE groups SET rules=CONCAT(rules, ',Collections:Edit') WHERE groups.name='Staff' AND id >= 50000;
|
<filename>api/src/main/resources/db/migration/mysql/common/V1_0_6__DDL_increase_varchar_length_on_tables.sql<gh_stars>0
-- increase the size of varchar on several tables:
ALTER TABLE categories MODIFY COLUMN category_description TEXT;
ALTER TABLE products MODIFY COLUMN product_description TEXT;
ALTER TABLE products MOD... |
<filename>databases/createdb.sql<gh_stars>0
create table MOVIE (
MID varchar2(5) not null constraint movie_pk primary key,
NAME varchar2(50),
YEAR number,
DIRECTOR varchar2(50),
LANGUAGE varchar2(20),
COST number,
COUNTRY varchar2(25)
);
/
create table MOVIE_ACTOR_LIST (
MID varchar2(5)... |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 11, 2018 at 02:17 PM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>jamesfulford/tutoring-database-scripts
@@0createAccountants.sql
@@0createAdministrators.sql
@@0createMarketers.sql
@@0createResearchers.sql
@@0createTutors.sql |
USE TelerikAcademy
SELECT e.FirstName + ' ' + e.LastName AS EmployeeName,
em.FirstName + ' ' + em.LastName AS ManagerName,
a.AddressText AS EmployeeAdress
FROM Employees e
INNER JOIN Employees em
ON e.ManagerID = em.EmployeeID
INNER JOIN Addresses a
ON e.AddressID = a.AddressID |
insert into `bd_impuestos_municipales`.`servicio` (`abreviatura`, `nombre`, `descripcion`, `tarifa`, `rubro`, `created_at`, `updated_at`) values ('LP', 'Limpieza Publica', 'Barrido de calles y avenidas, tambien a la recoleccion y transporte y disposcion final.', '1255', 'Servicios', current_date(), current_date());
ins... |
SELECT
ClassID,
ClassName,
ClassDisplayName,
ClassTableName,
ClassXmlSchema
FROM
CMS_Class
WHERE
ClassXmlSchema != '' |
<filename>doc/db.sql
DROP TABLE IF EXISTS `cron_job`;
CREATE TABLE `cron_job` (
`id` bigint(32) NOT NULL AUTO_INCREMENT,
`job_cn_name` varchar(128) DEFAULT NULL COMMENT 'job的中文名称',
`job_name` varchar(128) DEFAULT NULL COMMENT 'job的英文名称',
`job_class` varchar(256) DEFAULT NULL COMMENT 'job执行的类',
`cron` varchar... |
CREATE TABLE `info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`call` varchar(100) COLLATE utf8mb4_spanish2_ci DEFAULT NULL,
`whatsapp` varchar(100) COLLATE utf8mb4_spanish2_ci DEFAULT NULL,
`facebook` varchar(100) COLLATE utf8mb4_spanish2_ci DEFAULT NULL,
`instagram` varchar(100) COLLATE utf8mb4_spanish2_ci DEF... |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Sp_GetSubDeptMasterData]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[Sp_GetSubDeptMasterData]
GO
--EXEC Sp_GetSubDeptMasterData '<EMAIL>'
CREATE PROCEDURE [dbo].[Sp_GetSubDeptMasterData]
@distId VARCHAR(2)
AS
BEGIN
SET NOCOUNT ON;
... |
/*CREAR BASE DE DATOS*/
CREATE DATABASE IF NOT EXISTS sweetmoment;
USE sweetmoment;
/* INICIO TABLA DE USUARIOS */
CREATE TABLE usuarios(
id INT(255) auto_increment not null,
nombre VARCHAR (50) NOT NULL,
telefono INT (10) NOT NULL,
contrasena VARCHAR (50) NOT NULL,
... |
/*
Navicat Premium Data Transfer
Source Server : 172.16.31.10
Source Server Type : MySQL
Source Server Version : 50721
Source Host : 172.16.31.10
Source Database : tfkz
Target Server Type : MySQL
Target Server Version : 50721
File Encoding : utf-8
Date: 05/21/2018 11:5... |
update users
set deleted_at=now(), deleted_by_guid = created_by_guid
where deleted_at is null
and (email like <EMAIL>' or email like <EMAIL>');
update organizations
set deleted_at=now(), deleted_by_guid = created_by_guid
where deleted_at is null
and (key like 'a-public-%'
or key like 'z-test-%');... |
<filename>00 - BD/7 new_version_tree_manager.sql
-- MariaDB dump 10.17 Distrib 10.4.13-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: tm
-- ------------------------------------------------------
-- Server version 10.4.13-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4010... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.