sql
stringlengths
6
1.05M
<filename>flyway/migrations/V4.2__drop_bms_mat.sql -- Here we drop the previous materialized views and rename the tmp DROP MATERIALIZED VIEW bms_summary_10min; DROP MATERIALIZED VIEW bms_summary_daily; DROP MATERIALIZED VIEW bms_summary_hourly;
-- Compute the average of a double or int array CREATE FUNCTION array_avg(anyarray) RETURNS double precision AS $$ SELECT avg(v) FROM unnest($1) g(v); $$ LANGUAGE SQL IMMUTABLE; COMMENT ON FUNCTION array_avg(anyarray) IS 'Compute the average of an array';-- based on query from http://wiki.postgresql.org/wiki/Disk_Usag...
SET DEFINE OFF; CREATE UNIQUE INDEX AFW_25_TRAVL_PK ON AFW_25_TRAVL (SEQNC) LOGGING /
CREATE TABLE IF NOT EXISTS user_role ( id serial not null, roleId character varying(255) NOT NULL, is_default smallint NOT NULL, parent_id character varying(255) DEFAULT NULL, CONSTRAINT user_role_pkey PRIMARY KEY (id)) CREATE TABLE IF NOT EXISTS user_role_linker ( user_id integer NOT NULL, role_id integer NOT NULL)
/* Navicat MySQL Data Transfer Source Server : localtion Source Server Version : 50537 Source Host : localhost:3306 Source Database : test Target Server Type : MYSQL Target Server Version : 50537 File Encoding : 65001 Date: 2020-06-03 11:31:47 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
<reponame>iRoachie/boop<gh_stars>1-10 CREATE TABLE "Users" ( "id" SERIAL PRIMARY KEY, "display_name" varchar(50) UNIQUE NOT NULL, "first_name" varchar(50), "last_name" varchar(50), "image_url" varchar(2048), "last_active" timestamp DEFAULT (now()), "created_at" timestamp DEFAULT (now()), ...
-- trigger1.test -- -- execsql { -- create table t1(a,b); -- insert into t1 values(1,'a'); -- insert into t1 values(2,'b'); -- insert into t1 values(3,'c'); -- insert into t1 values(4,'d'); -- create trigger r1 after delete on t1 for each row begin -- delete from t1 WHERE a=old.a+2; -- ...
-- file:numeric.sql ln:222 expect:true INSERT INTO num_exp_mul VALUES (4,9,'-194415646271340.1815956522980')
PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; INSERT INTO nomina_tipos_otros_pagos VALUES('001','Reintegro de ISR pagado en exceso (siempre que no haya sido enterado al SAT).','2017-01-01',''); INSERT INTO nomina_tipos_otros_pagos VALUES('002','Subsidio para el empleo (efectivamente entregado al trabajador).','2017-01-01...
<reponame>peter-y/sample-spring-framework CREATE TABLE IF NOT EXISTS `foo` ( `id` INT AUTO_INCREMENT, `name` VARCHAR(32) NOT NULL COMMENT '姓名', `barname` VARCHAR(32) COMMENT 'bar的姓名', PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8; CREATE TABLE `t_user` ( `id` ...
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table account ( id bigserial not null, name varchar(255), email varchar(255), token varchar(255), pa...
INSERT INTO `refdata_category` VALUES ('1', '0', 'Org Role'); INSERT INTO `refdata_category` VALUES ('2', '0', 'Authorized'); INSERT INTO `refdata_category` VALUES ('3', '0', 'ComboType');
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Хост: localhost -- Время создания: Май 02 2018 г., 00:16 -- Версия сервера: 5.5.59-0ubuntu0.14.04.1 -- Версия PHP: 7.0.27-1+ubuntu14.04.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
metadata :name => 'git', :description => 'Git service for MCollective', :author => '<NAME>', :license => 'BSD-3-Clause', :version => '1.0', :url => 'https://github.com/vshn/puppet-in-docker/blob/master/r10k/README.md', :timeout => 60 ...
<reponame>all-of-us/research<gh_stars>10-100 -- Fetch all workspaces from this environment that aren't deleted and that have active user creators select w.workspace_id, w.name, FLOOR(1000 * RAND()) AS size, w.creator_id, w.creation_time FROM workbench.workspace AS w INNER JOIN user AS u ON w.creator_id = u.user_id WH...
DELETE FROM PEG; DELETE FROM GUESS_HISTORY; DELETE FROM GAME; DELETE FROM CODE;
<filename>mysql/modules.sql CREATE TABLE modules ( id int NOT NULL AUTO_INCREMENT, -- TODO add equation type type ENUM ('header', 'text', 'list', 'image') NOT NULL, note_id int NOT NULL, PRIMARY KEY (id) );
<reponame>Iago-America/SQLExercises /*Desafio 1 -> Quantos produtos temos cadastrados em nossa tabela de produtos*/ SELECT COUNT(*) FROM Production.Product; /*Desafio 2 -> Quantos tamanhos de produtos temos cadastrados em nossa tabela de produtos*/ SELECT COUNT(size) FROM Production.Product /*Desafio 3 -> Quantos ta...
<reponame>SaintGrey/Gamer-Spot<filename>gspot.sql -- phpMyAdmin SQL Dump -- version 4.4.10 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Jul 12, 2016 at 02:52 PM -- Server version: 5.5.42 -- PHP Version: 5.6.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Datab...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 07, 2017 at 08:19 PM -- Server version: 10.1.16-MariaDB -- PHP Version: 7.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
<filename>install/base.sql CREATE TABLE `os_modules` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `folder` varchar(255) NOT NULL, `code` text NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', `date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; CREATE TABLE ...
USE [SMSService] GO IF OBJECT_ID('pbl.spDeleteAccount') IS NOT NULL DROP PROCEDURE pbl.spDeleteAccount GO CREATE PROCEDURE pbl.spDeleteAccount @AID UNIQUEIDENTIFIER WITH ENCRYPTION AS BEGIN SET NOCOUNT, XACT_ABORT ON; DECLARE @ID UNIQUEIDENTIFIER = @AID , @Result INT = 0 BEGIN TRY BEGIN TRAN DELETE F...
--liquibase formatted sql --changeset uk.gov.pay:alter_table_services_add_column_default_billing_address_country ALTER TABLE services ADD COLUMN default_billing_address_country VARCHAR(2) NULL; ALTER TABLE services ALTER COLUMN default_billing_address_country SET DEFAULT 'GB'; UPDATE services SET default_billing_addr...
<reponame>aliostad/deep-learning-lang-detection -- ============================================= -- Author: <NAME> -- Project: Clinica -- Create date: 10/10/2013 -- Description: Stored Procedure que consulta um registro da tabela Logradouro a partir do id -- ============================================= IF EXISTS (...
<gh_stars>1-10 USE demo; CREATE TABLE peeps ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(70), age int );
-- original: collate3.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test CREATE TABLE collate3t1(c1 UNIQUE) ;DROP TABLE collate3t1 ;CREATE TABLE t1(a COLLATE caseless); INSERT INTO t1 VALUES('Abc2'); INSERT INTO t1 VALUES('abc1'); INSERT INTO t1 VALUES('aBc3') ;SELECT * FROM t1 ORDER BY a...
ALTER TABLE db_version CHANGE COLUMN required_7796_02_mangos_mangos_string required_7823_01_mangos_item_template bit; ALTER TABLE item_template CHANGE COLUMN ScalingStatValue ScalingStatValue int(6) unsigned NOT NULL default '0';
-- /packages/intranet-filestorage/sql/postgresql/intranet-filestorage-create.sql -- -- Copyright (c) 2003 - 2009 ]project-open[ -- -- All rights reserved. Please check -- http://www.project-open.com/license/ for details. -- -- @author <EMAIL> -- @author <EMAIL> -- -- Sets up the persisten memory about folders, their p...
insert into person (first_name, last_name, address, gender, enabled) values ('Wilie', 'Keavy', '8449 Dixon Way', 'Female', false), ('Lindsay', 'Paridge', '71066 Norway Maple Avenue', 'Female', false), ('Willard', 'Cosker', '80273 Sycamore Terrace', 'Male', false), ('Damiano', 'LLelweln', '8606 Tennyson Crossing', 'Ma...
<filename>_src/31/database.sql ALTER TABLE products ADD affiliate INT NOT NULL DEFAULT 0 AFTER products_id , ADD affiliate_url VARCHAR( 255 ) NULL AFTER affiliate ;
select count(1) from alquiler where id = :id
version https://git-lfs.github.com/spec/v1 oid sha256:79c855e7c3e1fd9c81940d0926194c408e5969fdcad92d1f75ffc9dc5bbd984d size 84
DROP TABLE IF EXISTS jobs_schedule;
-- Adminer 4.1.0 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; CREATE TABLE `t_city_cit` ( `cit_id` int(11) NOT NULL AUTO_INCREMENT, `cit_name` char(35) NOT NULL DEFAULT '', `cou_code` char(3) NOT NULL DEFAULT '', `cit_district` char(2...
<gh_stars>1-10 create table app_private.user_secrets ( user_id int not null primary key references app_public.users on delete cascade, password_hash text ); alter table app_private.user_secrets enable row level security; comment on table app_private.user_secrets is E'The contents of this table should never be vis...
-- 模版和分支配置,以及git仓库的账号密码配置,可匿名访问的仓库账号密码可以为空 INSERT INTO `config_info`(name,url,branch,username,password,enable_def_variable) VALUES ('默认工程变量', 'http://u.32e.co:8122/git/root/demo1.git','master', 'root', 'root',1); INSERT INTO `config_info`(name,url,branch,username,password,enable_def_variable,custom_variable) VALUES ('默...
CREATE TABLE `lyrics` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `content` text COLLATE utf8_bin NOT NULL, `language` varchar(2) COLLATE utf8_bin NOT NULL, `meta1` varchar(16) COLLATE utf8_bin DEFAULT NULL, `meta2` varchar(16) COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), KEY `language` (`langu...
.headers on select * from experiments; .quit
<reponame>osukar0710/sns_board<gh_stars>0 drop table if exists boards; CREATE TABLE boards ( id SERIAL NOT NULL PRIMARY KEY , title varchar( 50 ), content text, user_id int, created timestamp default 'now' ); -- -- サンプル INSERT INTO boards (title, content, user_id) VALUES ('初心者rubyおすすめ参考書', 'ゼロからわかるRuby入門'...
CREATE TABLE bookings ( bookingID INT NOT NULL IDENTITY(1,1), travelAgency VARCHAR(255) NOT NULL, paymentType VARCHAR(255) NOT NULL, checkInDate VARCHAR(255) NOT NULL, checkOutDate VARCHAR(255) NOT NULL, employeeID INT NOT NULL, PRIMARY KEY (bookingID), FOREIGN KEY (employeeID) REFERENCES employees(empl...
create table tenant ( id integer primary key, cep varchar(100) not null, cidade varchar(500), pdv double );
<gh_stars>0 CREATE TABLE `counter_service_db`.`tokens` ( `token_id` INT NOT NULL AUTO_INCREMENT , `type` VARCHAR(30) NULL, `token_number` INT NOT NULL, `priority` INT NOT NULL DEFAULT 1, `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `is_deleted` TINYINT NOT NULL DEFAULT false, PRIMARY KEY (`...
<filename>SQL/CreateDatabase/CreateTable/wcBankManagement_seat_support_level.sql USE [WheelChair] GO /****** Object: Table [dbo].[wcBankManagement_seat_support_level] Script Date: 17/8/20 3:26:23 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[wcBankManagement_seat_support_level](...
<filename>script-bd.sql CREATE DATABASE IF NOT EXISTS `model` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `model`; -- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: localhost Database: model -- ------------------------------------------------------ -- Server version 5.7.17-log /*!40101 SET @OLD_C...
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE SCHEMA events; CREATE TABLE events.sensors ( uuid UUID DEFAULT uuid_generate_v4(), created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, measure_type VARCHAR(32) NOT NULL, unit VARCHAR(32) NOT NULL, value NUMERIC NOT NULL ); CREATE TABLE event...
<gh_stars>10-100 /* This script will create stored procedure to do the followings: 1. truncate historical table if truncateflag = '1' 2. save transactions to historical table input parameters: @table = table of transactions wanted to save into historical table @truncateflag = indicate whether the historical table need...
-- name: AlphaNested :one SELECT 'alpha_nested' as output; -- name: AlphaCompositeArray :one SELECT ARRAY[ROW('key')]::alpha[];
insert into foo (a) values (:'listOfNames');
CREATE TABLE estados( id_estado tinyint(1) unsigned not null primary key, nombre varchar(50) )ENGINE=innoDB; CREATE TABLE tareas( id_tarea tinyint(1) unsigned not null auto_increment primary key, titulo varchar(100) not null, descripcion text not null, id_estado tinyint(1) unsigned not null, fecha_...
<reponame>screaminbug/bot_arbitrage CREATE DATABASE IF NOT EXISTS `botarbitrage` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */; USE `botarbitrage`; -- MySQL dump 10.13 Distrib 5.6.17, for osx10.6 (i386) -- -- Host: 127.0.0.1 Database: botarbitrage -- ------------------------------------------------...
<filename>src/test/resources/sql/alter_table/69701593.sql -- file:alter_table.sql ln:1766 expect:true ALTER TABLE tt7 NOT OF
<reponame>chengwenxin/sqlite-parser<gh_stars>100-1000 -- original: triggerA.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test CREATE TABLE t1(x INTEGER PRIMARY KEY, y TEXT UNIQUE); CREATE TABLE t2(a INTEGER PRIMARY KEY, b INTEGER UNIQUE, c TEXT) ;INSERT INTO t1 VALUES(sub_i,sub_word); INSE...
<gh_stars>1-10 /* vNEXT: - Possibly: change 'ratio' to 'benefit' - and/or make it more apparent what's going on relative to this 'benefit' (or lack thereof). - integrate: D:\Dropbox\Projects\SQLServerAudits.com\Scripts\Diagnostics\Get Forwarded Record Counts.sql */ USE [admindb]; GO IF OBJECT_ID('dbo.li...
-- 2018-03-02T11:11:13.670 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_List SET Value='00', ValueName='00',Updated=TO_TIMESTAMP('2018-03-02 11:11:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=541455 ; -- 2018-03-02T11:11:20.597 -- I forgot to set the DICTIONARY_ID_...
<filename>backend/de.metas.handlingunits.base/src/main/sql/postgresql/system/5440355_sys_09834_Documentnote_in_window.sql -- 19.02.2016 17:00 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,Crea...
<reponame>villeheikkila/maku<filename>@api/db/migrations/committed/000067.sql --! Previous: sha1:9de425db610ae280cd9c38d38c2f99c091692b86 --! Hash: sha1:878eb1da2c2296da887c09f308f3b90d257203f5 --! split: 1-current.sql -- Enter migration here CREATE INDEX ON "app_public"."brands"("created_by");
DELETE FROM `spell_affect` WHERE `entry` IN (16179,16214,16215,16216,16217); INSERT INTO `spell_affect` VALUES (16179,0,0,0,0,0,0,0x00000000000000C0,0), (16214,0,0,0,0,0,0,0x00000000000000C0,0), (16215,0,0,0,0,0,0,0x00000000000000C0,0), (16216,0,0,0,0,0,0,0x00000000000000C0,0), (16217,0,0,0,0,0,0,0x00000000000000C0,0);...
<filename>aws-test/tests/aws_eks_identity_provider_config/test-list-query.sql select name, arn from aws.aws_eks_identity_provider_config where arn = '{{ output.resource_aka.value }}';
<gh_stars>0 CREATE TABLE clients ( id SERIAL PRIMARY KEY, name VARCHAR(256) NOT NULL, url VARCHAR(256), description TEXT, icon TEXT, user_id INTEGER NOT NULL, identifier VARCHAR(256) NOT NULL, secret VARCHAR(256) NOT NULL, response_type VARCHAR(64) NOT NULL, CONSTRAINT clients__unique_iden...
<filename>crudoperation.sql -- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 12, 2020 at 04:38 PM -- 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...
<filename>ex04/exercises3.sql -- 4.3 他のテーブルのデータを集約してINSERTする -- 商品差益テーブル CREATE TABLE ShohinSaeki ( shohin_id CHAR(4) NOT NULL, shohin_mei VARCHAR(100) NOT NULL, hanbai_tanka INTEGER, shiire_tanka INTEGER, saeki INTEGER, PRIMARY KEY(shohin_id) ); -- 商品差益を求める(販売単価 - 仕入れ単価) INSERT INTO ShohinSaeki (shohin_i...
<gh_stars>0 -- Your SQL goes here CREATE TABLE posts ( name VARCHAR(20) PRIMARY KEY, body TEXT, data TIME, id INTEGER )
<reponame>imtiazmahbub/Simple-PHP-Gadget-Store -- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jan 29, 2018 at 07:03 PM -- Server version: 5.6.34 -- PHP Version: 7.0.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET...
/* Warnings: - Added the required column `middle_name` to the `Driver` table without a default value. This is not possible if the table is not empty. */ -- AlterTable ALTER TABLE "Driver" ADD COLUMN "middle_name" VARCHAR NOT NULL;
<filename>src/programmers/subquery_questions.sql --https://www.sqltutorial.org/sql-subquery/ --https://www.w3resource.com/sql-exercises/sql-subqueries-exercises.php --https://eastglow.github.io/data-base/2017/12/23/%EA%B3%B5%ED%86%B5-Scala-Subquery-vs-Left-Outer-Join.html
set echo on feedback on trimspool on tab off linesize 132 pagesize 10000 serverouput on size unlimited spool c_dbs_devl.@.log whenever sqlerror exit failure; connect sys/oracle as sysdba create tablespace CORP_NDX datafile 'CORP_NDX.dat' size 200M reuse autoextend on extent management local / create tablespa...
drop table if exists tg_user cascade; drop table if exists fast_task cascade; drop table if exists schedule cascade; drop table if exists schedule_task cascade; CREATE TABLE if not exists tg_user ( user_id integer unique, username varchar(255), state_code integer, state_request text ); CREATE index o...
-------------------------------------------------------- -- 文件已创建 - 星期一-七月-23-2018 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Table Admins -------------------------------------------------------- CREATE TABLE "C##LUDAN"."Admins" ...
-- ** -- Drop functions -- ** drop function core_utils.insert_feature(i_webuser_id integer, i_feature_point_geometry geometry, i_feature_attributes text, i_feature_uuid uuid); drop function core_utils.create_feature(i_webuser_id integer, i_feature_point_geometry geometry, i_feature_attributes text); drop function core...
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: May 10, 2021 at 04:56 AM -- Server version: 10.3.29-MariaDB -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
<filename>SQL Examples/02 advanced/023201 Looping.sql<gh_stars>1-10 USE demo DECLARE @i TINYINT = 1 WHILE @i < 10 BEGIN PRINT 'The variable''s value is ' + CAST(@i AS NVARCHAR(1)) + '.' SET @i = @i + 1 END
<reponame>LFwBH/AnimalShelterNest<filename>prisma/migrations/20210330205558_user/migration.sql -- CreateTable CREATE TABLE "user" ( "id_user" SERIAL NOT NULL, "email" TEXT NOT NULL, "password" TEXT NOT NULL, "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TIMESTAMP(3) NOT ...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3307 -- Waktu pembuatan: 26 Jun 2021 pada 11.25 -- Versi server: 10.4.17-MariaDB -- Versi PHP: 8.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
/* * Copyright 2014, 2015, 2016 Internet Corporation for Assigned Names and Numbers. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. */ /* * Develo...
delimiter / TRUNCATE TABLE MAIL_BY / INSERT INTO MAIL_BY (MAIL_BY_CODE,DESCRIPTION,UPDATE_USER,UPDATE_TIMESTAMP,OBJ_ID,VER_NBR) VALUES ('1','OSP','admin',NOW(),UUID(),1) / INSERT INTO MAIL_BY (MAIL_BY_CODE,DESCRIPTION,UPDATE_USER,UPDATE_TIMESTAMP,OBJ_ID,VER_NBR) VALUES ('2','Department','admin',NOW(),UUID(),1...
-- ## Reverting table: chemical_treatment -- ## Version: addCommentsColumn -- ## Info: Adding new column to chemical treatment to capture optional free-form comments -- ## Removing New Columns ## -- ALTER TABLE chemical_treatment DROP COLUMN IF EXISTS additional_comments; -- ## Updating chemical_treatment ## --
INSERT INTO Event ( span, id ) VALUES ( 'P1Y2M3D', 1 )
CREATE TABLE tb_seller ( seller_id BIGINT COMMENT '商家ID', username VARCHAR(32) COMMENT '', phone VARCHAR(32) COMMENT '', email VARCHAR(32) COMMENT '', password VARCHAR(128) COMMENT '', enable tinyint(1) COMMENT '账户是否可用', removed tinyint(1) COMMENT '逻辑删除N为正常,Y为删除', ...
DROP TEMPORARY TABLE IF EXISTS test_01602a; DROP TEMPORARY TABLE IF EXISTS test_01602b; CREATE TEMPORARY TABLE test_01602a(x UInt32); CREATE TEMPORARY TABLE test_01602b(y Float64, z String); SELECT database, name, create_table_query, engine, engine_full, is_temporary FROM system.tables WHERE name LIKE 'test_01602%' O...
select * from ( select id as id, topic as topic, send_time as send_time, sender_identity_id as sender_id, body as body from chat_message where chat_message.topic = $topic -- TODO: add pagination order by send_time desc limit $rows...
CREATE TABLE unidades( [id] VARCHAR(5) NOT NULL, [nombre] VARCHAR(100) NOT NULL CONSTRAINT [PK_unidades] PRIMARY KEY CLUSTERED ([id] ASC)) GO CREATE TABLE categorias( [id] INT IDENTITY(1,1) NOT NULL, [nombre] VARCHAR(100) NOT NULL, [descripcion] TEXT CONSTRAINT [PK_categorias] PRIMARY KEY CLUSTERED ([id] ASC)) GO...
<reponame>TrejoCode/Kristen -- MySQL Script generated by MySQL Workbench -- Fri Jun 22 11:58:53 2018 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_M...
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.9 -- Dumped by pg_dump version 9.5.9 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; ...
ALTER TABLE `user` DROP `last_login`; ALTER TABLE `user` ADD `user_login_id` INT NULL DEFAULT NULL AFTER `password_reset_timeout`;
<filename>tables.sql<gh_stars>0 create table login (users varchar(10), pass varchar(10)); Insert into login (users,pass) values('<PASSWORD>', <PASSWORD>); create table image_table(aid number(25) primary key, image long raw, age NUMBER(3), occu varchar(20), gender varchar(8), personality varchar(20), status varchar(10),...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 29, 2018 at 05:46 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 7.0.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
 CREATE procedure [dbo].[Yammer_DeleteJobIds] (@jobId nvarchar(max)) as begin delete from ym_AzureContainer where jobstatus !='Completed' and packageGUID = @jobId end
<gh_stars>1-10 -- ----------------------------------------------------- -- Schema kara -- ----------------------------------------------------- CREATE SCHEMA IF NOT EXISTS `kara` DEFAULT CHARACTER SET latin1 ; USE `kara` ; -- ----------------------------------------------------- -- Table `kara`.`bin` -- --------------...
<gh_stars>1-10 -- FUNCTION: public.dfo_metadatbatch(text) DROP FUNCTION public.dfo_metadatbatch(text); CREATE OR REPLACE FUNCTION public.dfo_metadatbatch( rastertable text) RETURNS void LANGUAGE 'plpgsql' COST 100 VOLATILE AS $BODY$ DECLARE query TEXT; sounding RECORD; n integer; resol text ...
<filename>src/migrations/dbInit.sql<gh_stars>1-10 /* Replace with your SQL commands */ CREATE TABLE IF NOT EXISTS customers ( id int PRIMARY KEY AUTO_INCREMENT, first_name VARCHAR(50) NOT NULL, last_name VARCHAR(50) NOT NULL, email VARCHAR(50) NOT NULL, address VARCHAR(255) NOT NULL, address_2 VARCHAR(255),...
<reponame>jaymegordo/SMSEventLog<filename>SQL/Examples/Insert values to table.sql -- Drop table #temp; CREATE TABLE #temp (Unit VARCHAR(9) NOT NULL, AHSStart DATE NOT NULL); INSERT INTO #temp (Unit, AHSStart) VALUES ('F301', '2020-05-15'), ('F302', '2020-04-27'), ('F303', '2019-11-22'), ('F304', '2020-06-03'), ('F30...
-- Add the missing historic recorded service in prod -- -- redis tiny (compose) -- -- Some events refer to this service plan with GUID: -- -- 53ca5c56-5474-4d64-9211-fe9aee86d502 -- INSERT INTO services ( guid, valid_from, created_at, updated_at, label, description, active, bindable, service_broker_guid ) ( ...
<gh_stars>10-100 -- file:enum.sql ln:52 expect:true ALTER TYPE planets ADD VALUE 'plutoplutoplutoplutoplutoplutoplutoplutoplutoplutoplutoplutoplutopluto'
<gh_stars>0 USE employees_db; INSERT INTO department(name) VALUES ('Sales'), ('Engineering'), ('Finance'), ('Legal'); INSERT INTO role (Title, Salary, Department_ID) VALUES ('Sales Lead', 120000, 1), ('Salesperson', 110000, 1), ('Lead Engineer', 160000, 2), ('Software Engineer', 1...
CREATE OR REPLACE VIEW lantern.agg_attachments( msg_id, meta, preview ) AS SELECT message_id as msg_id, jsonb_agg(jsonb_build_object( 'id', files.id, 'size', files.size, 'flags', files.flags, 'name', files.name, 'mime', files.mime, 'width', files.widt...
ALTER TABLE db_version CHANGE COLUMN required_2008_11_27_01_mangos_playercreateinfo_item required_2008_11_29_01_mangos_spell_proc_event bit; DELETE FROM spell_proc_event where entry = 35080; INSERT INTO spell_proc_event (entry, SchoolMask, Category, SkillID, SpellFamilyName, SpellFamilyMask, procFlags, ppmRate, cooldo...
<reponame>titibrown/DWWM-2005 use `fv_database`; show tables; -- Selection d'élément dans la classe Products. -- select product_name FROM fv_products; -- Selection de l'integralité des données -- SELECT * from fv_products; -- select Distinct product_name from fv_products; -- création d'alias -- select product...
create table form ( name varchar(32) not null primary key, created timestamp not null default current timestamp, updated timestamp not null default current timestamp, latest_form_id for bit data not null references form_document(id) on delete cascade, label varchar(255) default '' ); create table form_rev ...
DROP DATABASE IF EXISTS localhost_db; CREATE DATABASE localhost_db; USE localhost_db; CREATE TABLE IF NOT EXISTS products ( id int auto_increment primary key, current_price double null, last_update bigint null, name varchar(255) null );
<reponame>GabrielDiasgd/Algafood alter table restaurante add column aberto tinyint(1) not null; update restaurante set aberto = false;