sql
stringlengths
6
1.05M
INSERT INTO task(id, keyword, city, scan_limit, repeat_rule, scan_source_id, user_id) VALUES (100, 'java', 'Moscow', '2020-01-01 10:00:00', 'manually', 1, 10), (101, 'java', 'Samara', '2020-01-10 16:00:00', 'daily', 1, 10), (102, 'kotlin', 'New York', '2020-01-13 00:00:00', 'monthly', 2, 10), (103,...
<reponame>KaiJack1/Employee-Tracker<gh_stars>0 --CREATING OUR DATABASE -- DROP DATABASE IF EXISTS employee_trackerDB; CREATE DATABASE employee_trackerDB; USE employee_trackerDB; -- DEPARTMENT TABLE ---- CREATE TABLE department ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(30) ); -- DEPARTMENT TABL...
-------------------------------------------------------- -- creating partitioned hive table with avro format -- -------------------------------------------------------- --- data source data import given here bigdata/sqoop/01-import-simple.sh dfs -ls -R /user/cloudera/staging/sq_import/retail_db/orders_avro; ! cat /h...
drop table if exists t1; create table t1(i int)$$ insert into t1 values(1),(2),(3); # create a time partition create time partition on t1 as t1_tp period 'daily' retention 2 start '{{STARTTIME}}'; select sleep(5); select * from t1_tp; # Schema change the time partition alter table t1_tp add column j int null$$ sel...
<gh_stars>1000+ -- +migrate Up notransaction ALTER TYPE enum_alert_log_subject_type ADD VALUE IF NOT EXISTS 'heartbeat_monitor'; -- +migrate Down
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 1192.168.127.12 -- Generation Time: May 21, 2020 at 09:05 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET...
<reponame>ZhengQinyu/leetcode-go # Write your MySQL query statement below select Name AS Customers from Customers where Id not in (select distinct CustomerId from Orders)
<reponame>myisjon/flask-web-demo DROP TABLE IF EXISTS `xinfadi_search`; CREATE TABLE `xinfadi_search` ( `id` int(11) NOT NULL AUTO_INCREMENT, `uniq_no` varchar(255) DEFAULT NULL, `farm_p_name` varchar(255) NOT NULL, `category` varchar(255) NOT NULL, `p_type` varchar(255) DEFAULT NULL, `unit` varchar(255) DE...
<reponame>koushisa/generator-spring-jax-rs DELETE FROM <%= snakeResourceName %> WHERE enabled = 1 AND <%= snakePrimaryKey %> = /*<%= camelPrimaryKey %>*/'1'
<gh_stars>0 SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default'); -- TABLE: PROFILES CREATE TABLE IF NOT EXISTS `bx_cnl_data` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `author` int(10) unsigned NOT NULL, `added` int(11) NOT NULL, `changed` int(11) NOT NULL, `p...
-- AlterEnum -- This migration adds more than one value to an enum. -- With PostgreSQL versions 11 and earlier, this is not possible -- in a single migration. This can be worked around by creating -- multiple migrations, each migration adding only one value to -- the enum. ALTER TYPE "Role" ADD VALUE 'NEWUSER'; ALTER...
<filename>src/enums.sql<gh_stars>0 /* leave this for other app l:see LICENSE file g:obj,utility v:130217\s.zaglio: generic enumerators */ CREATE view enums as select -- fn__str_between null as [btw.close_left], -- search @from and then the next @to 1 as [btw.close_right], -- search @to a...
DROP TABLE IF EXISTS accounts; CREATE TABLE accounts ( -- カラム id uuid not NULL primary key, created_at timestamp with time zone not NULL, updated_at timestamp with time zone not NULL, deleted_at timestamp with time zone default null, email text no...
<filename>docs/sql/account/account_user.sql CREATE TABLE `account_user` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', `username` varchar(30) NOT NULL DEFAULT '' COMMENT '用户名', `phone` varchar(15) NOT NULL DEFAULT '' COMMENT '手机号', `email` varchar(30) NOT NULL DEFAULT '' COMMENT '邮箱', `passwo...
BEGIN; CREATE TABLE urls ( id BIGSERIAL PRIMARY KEY, code TEXT NOT NULL UNIQUE, url TEXT NOT NULL, created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL ); COMMIT;
-- inf 开头的 DB DELETE FROM "inf_config"; -- sys 开头的 DB DELETE FROM "sys_dept"; DELETE FROM "sys_dict_data"; DELETE FROM "sys_role"; DELETE FROM "sys_role_menu"; DELETE FROM "sys_menu";
CREATE TABLE [dbo].[vCommodityGroups_sync] ( [Id] UNIQUEIDENTIFIER DEFAULT (newid()) NOT NULL, [GroupCode] VARCHAR (4) NOT NULL, [Name] VARCHAR (40) NOT NULL, [SubGroupCode] VARCHAR (2) NOT NULL, [SubGroupName] VARCHAR (40) NOT NULL, [IsActive] BIT ...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 06 Nov 2019 pada 09.09 -- Versi server: 10.1.37-MariaDB -- Versi PHP: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
-- MySQL dump 10.13 Distrib 5.7.11, for osx10.11 (x86_64) -- -- Host: localhost Database: idea -- ------------------------------------------------------ -- Server version 5.7.11 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!...
<reponame>aguadev/aguadev<gh_stars>1-10 CREATE TABLE build_report ( build_report_id int(10) unsigned NOT NULL AUTO_INCREMENT, sample_id int(11) NOT NULL, coverage_flag enum('Y','N','O') DEFAULT NULL, gt_flag enum('Y','N','O') DEFAULT NULL, location text, manifestgender varchar(15) DEFAULT NULL, arraygend...
-- This file should undo anything in `up.sql` drop function payment_service_api.refund_subscription_payment(uuid);
<reponame>unclealex72/west-ham-calendar<filename>conf/evolutions/default/2.sql # Calendar schema # --- !Ups INSERT INTO game (opponents, academymembers, bondholders, attended, result, competition, season, attendence, prioritypoint, at, id, location, tvchannel, report, seasontickets, generalsale) VALUES ('Liverpool', ...
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[SOCIAL_COMMENTS]') AND TYPE IN (N'U')) CREATE TABLE SOCIAL_COMMENTS ( id BIGINT IDENTITY(1,1) NOT NULL, body TEXT, payload_context_id VARCHAR(250), user_id VARCHAR(100), tenant_...
<reponame>roachsc4/avito_flat_parser<filename>avito_parse/migrations/0001_init.sql CREATE SCHEMA advertisement; -- id: int -- url: str -- price: int -- title: str -- address: str -- approximate_date_string: str -- -- date: datetime = None -- description: str = None CREATE TABLE advertisement...
START TRANSACTION ; alter table branch_eni_attachments add association_id text; COMMIT;
create table `gdpr_queries` ( `id` int(11) NOT null AUTO_INCREMENT, `user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOt null, `workspace_id` INT(11) NOT NULL, `reason` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOt null, `query` ENUM('FORGOTTEN', 'PORTABILITY', 'RECTIFICATION', 'RESTRICTI...
alter table `log` modify COLUMN `last_update_date` datetime DEFAULT NULL;
<filename>schema/sdss5db/catalogdb/mwm_small/lmxb/lmxb.sql /* Ritter & Kolb Catalog of Low Mass X-ray Binaries https://bit.ly/3agEcZT */ CREATE TABLE catalogdb.lmxb ( name TEXT, rastr TEXT, decstr TEXT, radeg DOUBLE PRECISION, decdeg DOUBLE PRECISION, ngaia REAL, gaia_name TEXT, gaia_...
-- +goose NO TRANSACTION -- +goose Up -- SQL in this section is executed when the migration is applied. ALTER TABLE computed_pipelines ADD organizations JSONB, ADD COLUMN groups JSONB; CREATE INDEX computed_pipelines_organizations ON computed_pipelines USING GIN (organizations); CREATE INDEX computed_pipelines_groups O...
SELECT DISTINCT name, order_date FROM customers INNER JOIN orders ON customers.cid = orders.cid INNER JOIN items ON orders.oid = items.oid ORDER BY name
INSERT INTO `user_type_links` (`id`, `user_type_id`, `link_id`) VALUES (null, 1, 1), (null, 1, 2), (null, 1, 3), (null, 1, 4), (null, 1, 5), (null, 1, 6), (null, 1, 7), (null, 1, 8), (null, 1, 9), (null, 1, 10), (null, 1, 11), (null, 1, 12), (null, 1, 13), (null, 1, 14), (null, 1, 15), (null, 1, 16), (null, 1, 17), (nu...
INSERT INTO department (name) VALUES ('Engineering'); INSERT INTO department (name) VALUES ('Sales'); INSERT INTO role (title, salary, department_id) VALUES ('Senior Engineer', 100000, 1); INSERT INTO role (title, salary, department_id) VALUES ('Junior Engineer', 60000, 1); INSERT INTO role (title, salary, department_...
CREATE TABLE features ( date bigint, datetime bigint, clientidentifier character varying(255), conferenceidentifier character varying(4096), peeridentifier character varying(255), clientid character varying(255), connectionid character varying(255), streamid character varying(255), ...
<gh_stars>0 CREATE TABLE tb_account ( id varchar(32) NOT NULL COMMENT 'id', user_id varchar(32) DEFAULT NULL COMMENT '用户id', total decimal(10,0) DEFAULT NULL COMMENT '总额度', used decimal(10,0) DEFAULT NULL COMMENT '已用余额', residue decimal(10,0) DEFAULT '0' COMMENT '剩余可用额度', PRIMARY KEY (id) ) ENGINE=InnoDB AU...
-- Table: public.corp_energy_consumption_tall -- DROP TABLE public.corp_energy_consumption_tall; CREATE TABLE IF NOT EXISTS public.corp_energy_consumption_tall ( id integer NOT NULL DEFAULT nextval('corp_energy_consumption_tall_id_seq'::regclass), corp_id integer, year smallint, category character var...
<filename>shuju/invitation.sql INSERT INTO `invitation` VALUES (1, '今天是个好日子', 1, 1, '0000-0-0 00:00:00', '0000-0-0 00:00:00', 1, NULL); INSERT INTO `invitation` VALUES (2, '啦啦啦啦', 2, 2, '2018-8-22 01:11:20', '0000-0-0 00:00:00', 2, '2018-08-22 01:11:20'); INSERT INTO `invitation` VALUES (3, '请问请问我去而且我而且我', 2, 3, '2018-...
<reponame>conductiveresearch/abstractions CREATE MATERIALIZED VIEW tokemak.view_tokemak_uniswap_pool_stats_daily ( source ,"date" ,pool_address ,pool_symbol ,token_address ,token_symbol ,total_lp_supply ,reserve --,cumulative_fees ) AS ( WITH pairs AS( SELECT t.token_...
<reponame>panasenco/sqltemplate <%# .Synopsis Wrapper to create an inline view from the query -%> ( <%= $Body -replace "`n","`n " %> ) <%= $Basename %>
CREATE DATABASE CigarShop USE CigarShop --1. CREATE TABLE Sizes ( Id INT PRIMARY KEY IDENTITY ,Length INT NOT NULL ,RingRange DECIMAL(18, 4) NOT NULL ) CREATE TABLE Tastes ( Id INT PRIMARY KEY IDENTITY ,TasteType VARCHAR(20) NOT NULL ,TasteStrength VARCHAR(15) NOT NULL ,ImageURL NVARCHAR(100) NOT NULL UNIQUE )...
<filename>ps.sql -- phpMyAdmin SQL Dump -- version 5.0.4deb2~bpo10+1+bionic1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Aug 31, 2021 at 10:43 AM -- Server version: 5.7.35-0ubuntu0.18.04.1 -- PHP Version: 7.2.24-0ubuntu0.18.04.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SE...
<gh_stars>0 DROP TABLE IF EXISTS `vt_admin_group`; CREATE TABLE `vt_admin_group` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `language_key` varchar(128) DEFAULT NULL COMMENT '名称(多语言Key)', `u_id` int(10) unsigned DEFAULT NULL COMMENT '用户ID', `p_id` int(10) unsigned DEFAULT NULL COMMENT '父级id', `updated...
<reponame>kaesetoast/db-sync DROP TABLE IF EXISTS table_one ; CREATE TABLE `table_one` ( `id` int(11) NOT NULL AUTO_INCREMENT, `stringval` varchar(250) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 ; DROP TABLE IF EXISTS table_two ; CREATE TABLE `table_two` ( `id` int(1...
<gh_stars>1-10 /* */ set serveroutput on size unlimited echo off scan on verify off define schema=&1 PROMPT Drop all synonyms in schema &schema: PROMPT Synonyms count - before: SELECT count(*) as cnt FROM dba_synonyms WHERE owner = upper('&schema') / declare l_SQL varchar2(32000); begin dbms_output.enable(null);...
-- WORK AREA --------------------------------------------------------------------------------------------- -- THIS WORKS but if the department does not exist on the products table, it is not shown SELECT d.department_id, d.department_name, d.over_head_costs, SUM(p.product_sales) as product_sales, SUM(p.product_sales)...
-- 系统用户表 DROP TABLE IF EXISTS `sys_user`; CREATE TABLE `sys_user` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户ID', `username` varchar(255) NOT NULL COMMENT '用户名', `password` varchar(255) NOT NULL COMMENT '密码', `avatar` varchar(255) DEFAULT 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gi...
-- file:numeric.sql ln:446 expect:true INSERT INTO num_exp_ln VALUES (8,'11.22365546576315513668')
INSERT INTO [dbo].[TestTable] ([Column1]) VALUES ('FirstRow'), ('SecondRow'); INSERT INTO [dbo].[MyTable] ([Column1],[Column2]) VALUES ('FirstRow', 1), ('SecondRow', 2);
<reponame>Ambal/mangos<filename>sql/updates/0.13/7255_01_characters_characters.sql ALTER TABLE character_db_version CHANGE COLUMN required_7251_02_characters_character_spell required_7255_01_characters_characters bit; ALTER TABLE `characters` ADD COLUMN `bgid` int(10) unsigned NOT NULL default '0' AFTER `arena_pendi...
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table registration_data ( id bigserial not null, first_name varchar(255), last_name varchar(255), email_id var...
CREATE TABLE enc_keys ( "uuidb64" CHARACTER(22) NOT NULL PRIMARY KEY, "ext_id" VARCHAR(128) NOT NULL UNIQUE, "u_encrypt" CHARACTER(1) NOT NULL, "u_sign" CHARACTER(1) NOT NULL, "u_derive" CHARACTER(1) NOT NULL, "u_shared" CHARACTER(1) NOT NULL, "u_temp" CHARACTER(1) NOT NULL, "type" VARC...
<filename>postgresql/procedures/authenticate.sql<gh_stars>0 create or replace function generate_token() returns token.authtoken%type language plpgsql as $$ declare tok token.authtoken%type; unico integer; begin unico := -1; while unico != 0 -- must be unique loop select floor(r...
# --- !Ups --- ARTICLE INSERT INTO "ARTICLE"("name", "descr", "img", "playlist", "active") VALUES ('HP Compaq 15-s006nz', 'Display 15.6 " . - Prozessor Intel Celeron N2830 (2.16 GHz) . - Schnittstellen Bluetooth, Cardreader, HDMI, 1x USB 3.0, 2x USB 2.0', '/assets/images/article1.png', 'article', TRUE); INSERT INTO "AR...
create temporary table test ( arr Array(Array(LowCardinality(String))) ); insert into test(arr) values ([['a'], ['b', 'c']]); select arrayFilter(x -> 1, arr) from test;
<filename>teams/12-seee/src/schema-hash.sql CREATE TABLE IF NOT EXISTS hashs ( id serial PRIMARY KEY, cid text NOT NULL REFERENCES cargo(cid) ON DELETE CASCADE, account text NOT NULL, mkroot text NOT NULL, -- should be u64 in rust type hashcode ...
use jd --Là tình trạng mà một giao tác đang thao tác trên một tập dữ liệu nhưng giao --tác khác lại chèn thêm các dòng dữ liệu vào tập dữ liệu mà giao tác kia quan --tâm -- kịch bảng cập nhật hết tất cả sản phẩm thay đổi giá không cho thêm mới --- Drop procedure CAPNHATSANPHAMDONGLOAT go create PROCEDURE CAPNHATSAN...
<reponame>uzmcoco/Cotonti /* r91 more fix, hooks fix */ INSERT INTO `sed_bbcode` VALUES (NULL,'more','str','[more]','<!--more-->',1,1,128,'',0),(NULL,'more','str','[/more]','&nbsp;',1,1,128,'',0); INSERT INTO `sed_plugins` VALUES (NULL, 'header.main', 'search', 'header', 'Search', 'search.header', 10, 1), (NULL, 'pag...
<reponame>MirelaMileva/Databases-MSSQL-SoftUni-Homework UPDATE Spaceships SET LightSpeedRate += 1 WHERE Id BETWEEN 8 AND 12
USE eleicoes; INSERT INTO SITUACAO (descricaoSituacao) VALUES ('DEFERIDO COM RECURSO'); INSERT INTO SITUACAO (descricaoSituacao) VALUES ('NAO CONHECIMENTO DO PEDIDO'); INSERT INTO SITUACAO (descricaoSituacao) VALUES ('INAPTO'); INSERT INTO SITUACAO (descricaoSituacao) VALUES ('FALECIDO'); INSERT INTO SITUACAO (des...
-- phpMyAdmin SQL Dump -- version 4.6.6deb4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: May 29, 2018 at 11:08 PM -- Server version: 5.7.21 -- PHP Version: 7.0.27-0+deb9u1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
<filename>db/seed_tables.sql -- Seed users table INSERT INTO users(surname, firstname, email, password) VALUES ('Smith', 'John', '<EMAIL>', '<PASSWORD>'); INSERT INTO users(surname, firstname, email, password) VALUES ('Sue', 'Mary', '<EMAIL>', '<PASSWORD>'); INSERT INTO users(surname, firstname, email, password) VALU...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Feb 08, 2018 at 08:21 PM -- Server version: 5.7.19 -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101...
SELECT * FROM {{ .TableFullName }} WHERE id = ?;
<filename>backend/migrations/20220116152130_water.up.sql CREATE TABLE "water" ( "id" SERIAL NOT NULL, "date" TIMESTAMP NOT NULL, "cubicmeter" float4 NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_8fe16d29fb45be6c0de0b2ed6a3" P...
<filename>db/item_bodega.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 07-03-2022 a las 16:59:25 -- Versión del servidor: 10.4.20-MariaDB -- Versión de PHP: 7.4.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET t...
USE TelerikAcademy BEGIN TRAN ALTER TABLE Departments DROP CONSTRAINT FK_Departments_Employees ALTER TABLE WorkHours DROP CONSTRAINT FK_WorkHours_Employees DELETE FROM Employees SELECT d.Name FROM Employees e JOIN Departments d ON e.DepartmentID = d.DepartmentID WHERE d.Name = 'Sales' GROUP BY d.Name R...
USE SnakesAndLadder; -- PROCEDURE "1" drop procedure if exists CheckUserLogin; DELIMITER // CREATE PROCEDURE CheckUserLogin(pName varchar(50), pPassword varchar(50)) begin declare lcOkPasswordCount int; declare lcUserNameCount int; declare lcLoginAttempts int; DECLARE exit handler for sqlexception BEGIN ...
<filename>db/schema.sql -- gifs CREATE TABLE IF NOT EXISTS "gifs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "basename" varchar, "directory" varchar, "size" integer, "md5" varchar, "shared_link_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL); CREATE INDEX IF NOT EXISTS "index_gifs_on...
<filename>Miscellaneous/StoredProcedures/Backup_2015 March 23/H3GISearchForOrder_backup_250806.sql /********************************************************************************************************************* ** ** Procedure Name : dbo.h3giSearchForOrder ** Author : <NAME> ** Date C...
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <NAME> -- Create date: 01/11/2018 -- Description: Reads Workflow History for a given Release Code -- exec Workflow_ReadHistory 'okeeffene',43 -- ============================================= CREATE OR ALTER...
-- file:plpgsql.sql ln:2033 expect:false begin open c1 (p2 := 77)
-- file:numerology.sql ln:75 expect:true SELECT f1 AS two, max(f3) AS max_float, min(f3) AS min_float FROM TEMP_GROUP GROUP BY two ORDER BY two, max_float, min_float
DROP TABLE IF EXISTS public.game_state; DROP TABLE IF EXISTS public.inventory; DROP TABLE IF EXISTS public.item; DROP TABLE IF EXISTS public.items; DROP TABLE IF EXISTS public.player; DROP TABLE IF EXISTS public.mob; DROP TABLE IF EXISTS public.mobs; DROP TABLE IF EXISTS public.map; CREATE TABLE public.map ( id se...
CREATE DATABASE SALAO; USE SALAO; CREATE TABLE USUARIOS ( ID_USUARIO INT PRIMARY KEY AUTO_INCREMENT, NOME_USUARIO VARCHAR(80), TELEFONE_USUARIO VARCHAR(15), LOGIN_USUARIO VARCHAR(20) NOT NULL UNIQUE, SENHA_USUARIO VARCHAR(15) ); CREATE TABLE CLIENTES ( ID_CLIENTE INT PRIMARY KEY AUTO_INCREMENT, NOME_C...
<gh_stars>0 drop table if exists ab_platform.experiment_populations_parents_save_memories_v2_temp; create table ab_platform.experiment_populations_parents_save_memories_v2_temp distkey(entity_id) sortkey(entity_id) as ( SELECT '01858a04-5ffa-4a43-bbb5-1cf832867b7e' AS experiment_id , eventvalue ...
select count(1) from usuario where tipoIdentificacion = :tipoDoc and numeroIdentificacion = :documento
-- ======================================================================================= -- usage : sqlite3 PetaPocoSample.sqlite3 -- ======================================================================================= -- --------------------------------------------------------------------------------------- -- CR...
INVALID TEST dropCheckConstraint is not supported for MySQL 5.6 --https://docs.liquibase.com/change-types/drop-check-constraint.html
<filename>sql_metadb/migration_tables/po_reporting_codes.sql DROP TABLE IF EXISTS po_reporting_codes; CREATE TABLE po_reporting_codes AS SELECT id::varchar(36), jsonb_extract_path_text(jsonb, 'code')::varchar(65535) AS code, jsonb_pretty(jsonb)::json AS data FROM folio_orders.reporting_code; ALTER TAB...
/* * Script: bigquery_billing_export.sql * Author: freedomofnet * Description: * This SQL script transforms the billing export table to anonymize user data * and included a linear projection for daily running cost. The output table * powers the Cloud Billing Dashboard * (https://cloud.google.com/billing/docs/ho...
# --- !Ups ALTER TABLE users ADD COLUMN see_tag_fix_suggestions BOOLEAN DEFAULT true;; # --- !Downs ALTER TABLE IF EXISTS users DROP COLUMN see_tag_fix_suggestions;;
<reponame>jason-fox/stellio-context-broker ALTER TABLE subscription ADD endpoint_info jsonb;
WITH blocks AS ( SELECT blocking_locks.pid as pid, blocked_locks.pid as blocked_pid, blocking_locks.locktype as locktype, blocking_locks.relation::regclass as relation, blocking_locks.granted as granted FROM pg_catalog.pg_locks blocked_locks JOIN p...
<reponame>CUBRID/cubrid-testcase create table tbisnull (a int); insert into tbisnull values (null), (0), (1); select isnull (null), isnull (0), isnull (1); prepare s from 'select isnull( ? ), isnull ( ? ), isnull ( ? )'; execute s using null, 0, 1; deallocate prepare s; select a, isnull (a) from tbisnull order by 1...
<gh_stars>0 SELECT title FROM pgweb WHERE to_tsvector(title || ' ' || body) @@ to_tsquery('create & table') ORDER BY last_mod_date DESC LIMIT 10;
<gh_stars>0 CREATE DATABASE IF NOT EXISTS `Yii2_GU` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `Yii2_GU`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: Yii2_GU -- ------------------------------------------------------ -- Server version 5.5.5-10.0.34-MariaDB-0ubuntu0.16.04....
<filename>upgrade/2.1/hsqldb_2.0.2_to_2.1.sql<gh_stars>10-100 UPDATE jforum_categories SET display_order = categories_id; ALTER TABLE jforum_users ADD user_karma DECIMAL(10, 2); ALTER TABLE jforum_posts ADD attach int DEFAULT '0'; ALTER TABLE jforum_posts ADD need_moderate INT DEFAULT '0'; ALTER TABLE jforum_categorie...
<reponame>opengauss-mirror/Yat<gh_stars>0 -- @testpoint: opengauss关键字trusted非保留),作为索引名,部分测试点合理报错 --前置条件,创建一个表 drop table if exists explain_test; create table explain_test(id int,name varchar(10)); --关键字不带引号-成功 drop index if exists trusted; create index trusted on explain_test(id); drop index trusted; --关键字带双引号-成功 dr...
<gh_stars>0 CREATE SCHEMA optimal; CREATE TABLE boards ( bID int PRIMARY KEY AUTO_INCREMENT, size nvarchar(1) NOT NULL DEFAULT 'm', -- s,m,l for 5x4,6x5,7x6 pattern nvarchar(42) NOT NULL UNIQUE, orb_count int NOT NULL ); CREATE TABLE orbs( bID int, FOREIGN KEY (bID) REFERENCES boards(bID) ON DELETE CA...
CREATE TABLE [dbo].[Audit] ( [Id] INT NOT NULL PRIMARY KEY IDENTITY (1,1), [OrganisationId] UNIQUEIDENTIFIER NOT NULL, [UpdatedBy] NVARCHAR(30) NOT NULL, [UpdatedAt] DATETIME2 NOT NULL, [AuditData] NVARCHAR(MAX) NOT NULL )
<gh_stars>0 create user 'twitapp'@'localhost' identified by 'tw1t4pp'; create database testdb; use testdb; grant all on *.* to 'twitapp'@'localhost'; CREATE TABLE IF NOT EXISTS `admin` ( `id` int(11) NOT NULL, `name` varchar(30) DEFAULT NULL, `username` varchar(30) DEFAULT NULL, `password` varchar(50) DEFAULT NU...
set search_path = public, acl, core, client, criminal, jt; /* exporta tabela para json */ CREATE OR REPLACE FUNCTION db_to_json(path TEXT) RETURNS void AS $$ declare columns_id TEXT; tables RECORD; statement TEXT; begin FOR tables IN SELECT (table_name) AS schema_table FROM information_schema.tables...
<reponame>FabianLars/api.fabianlars.de DROP TABLE IF EXISTS rotations; CREATE TABLE rotations ( id SERIAL PRIMARY KEY, start_date DATE NOT NULL UNIQUE, end_date DATE NOT NULL, champions TEXT [] NOT NULL ); INSERT INTO rotations(start_date, end_date, champions) VALUES('2009-11-20', '2009-12-01', ARRAY['Ashe', 'Blitzcr...
<filename>my_db/migrations.sql -- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- 主機: localhost -- 產生時間: -- 伺服器版本: 8.0.17 -- PHP 版本: 7.3.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=@@CHAR...
<filename>SQL/Basic_Select/weather11.sql SELECT DISTINCT(city) FROM station WHERE 1=1 AND LEFT(city, 1) NOT IN ('a', 'e', 'i', 'o', 'u') OR RIGHT(city, 1) NOT IN ('a', 'e', 'i', 'o', 'u');
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:3306 -- Tiempo de generación: 15-07-2019 a las 08:59:25 -- Versión del servidor: 5.6.44 -- Versión de PHP: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
CREATE OR REPLACE VIEW `Articoli View` AS (SELECT `Articoli Specifici`.*, `Articoli Generici`.`idCategoria`, `Articoli Generici`.`idMarca` ,`Marche`.`Nome` AS `Marca`,`Marche`.`Sito`,`Articoli Generici`.`idUnità`, `Nomi Articoli`.`Nome`, `Descrizioni Articoli`.`Descrizione`, `Immagini Tagliate`.`Path` AS `Path Immagine...
DROP TABLE courses;
<reponame>feluelle/lets-build-data-for with stg_imdb_movies__directors as ( select unnest(string_to_array(directors, ', ')) as director, uid, title_id from {{ ref('stg_imdb_movies') }} group by director, uid, title_id ) select * from stg_imdb_movies__directors
-- Comments start with two hyphens. End each command with a semicolon. /* And this is also a comment which is a multiline comment. It mean that you can type long multiple line comment. */ -- SQL is not a case-sensitive about keywords. The sample command here -- follow the convention of spelling them in upper-ca...
/*!50003 DROP FUNCTION IF EXISTS `randomizeVehicleInventory` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8 */ ; /*!5000...