sql
stringlengths
6
1.05M
<filename>sql/init.sql --set the schema to the public schema, this is similar to the dbo schema in sql server SET search_path TO public; --if the table doesn't already exist then create a new table' CREATE TABLE IF NOT EXISTS schema_versions ( id serial CONSTRAINT pk_schema_versions PRIMARY KEY, version_number ...
DROP TABLE v5_1_ballot_measure_selections;
<gh_stars>1-10 /* schema for tess: /uufs/chpc.utah.edu/common/home/sdss50/sdsswork/target/catalogs/tic/v8/tic_column_description.txt */ CREATE TABLE catalogdb.tic_v8 ( id BIGINT PRIMARY KEY, version VARCHAR(8), hip INTEGER, tyc VARCHAR(12), ucac VARCHAR(10), twomass VARCHAR(20), sdss BIGINT, allwise VARCHAR...
--+ holdcas on; set names utf8; -- table name create table 测试表(s1 char(200)); -- column alter table 测试表 add column i_列1 int; -- trigger create trigger 触发器 before update on 测试表 execute update 测试表 set i_列1 = 0; -- constraint alter table 测试表 add constraint i_列1_i_u unique index (i_列1); desc 测试表; show index in 测试表; dr...
<reponame>developersworkspace/EPONS CREATE TABLE ProviderAccountPermission( ProviderAccountPermissionId uniqueidentifier not null, ProviderId uniqueidentifier not null, AccountId uniqueidentifier not null, PermissionId uniqueidentifier not null); ALTER TABLE ProviderAccountPermission ADD CONSTRAINT [PK_ProviderAcco...
<reponame>MelanieRBaker/chinook-MelanieRBaker /*Provide a query showing a unique/distinct list of billing countries from the Invoice table.*/ SELECT DISTINCT BillingCountry FROM Invoice
<filename>ShoppingSmart/obj/Release/AutoScripts/ApplicationServices-Deployment_SchemaAndData.sql SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[products]( [id] [int] IDENTITY(1,1) NOT NULL, [title] [varchar](1000) COLLATE Latin1_General_CI_AS NULL, [price] [int] NULL, [description] [va...
<filename>Sql/magnat_nk.sql -- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1 -- Время создания: Апр 20 2019 г., 01:28 -- Версия сервера: 5.5.25 -- Версия PHP: 5.3.13 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
<gh_stars>0 CREATE TABLE [dbo].[LaneAttendance]( [JobId] [nvarchar](20) NOT NULL, [TSBId] [nvarchar](10) NOT NULL, [PlazaGroupId] [nvarchar](10) NULL, [PlazaId] [nvarchar](10) NOT NULL, [LaneId] [nvarchar](10) NULL, [UserId] [nvarchar](10) NULL, [BOJ] [datetime] NULL, [EOJ] [datetime] NULL, [RevenueDate] [date...
-- -- create tables -- CREATE TABLE products ( id INTEGER PRIMARY KEY AUTOINCREMENT, code VARCHAR(15), name VARCHAR(255), description TEXT, price NUMERIC(10, 2), school_id INTEGER, zwemgebied_id INTEGER, watersoort_id INTEGER, vissengrootte_id INTEGER ); CREATE TABLE school ( id INTEGER PRIMARY ...
-- -- PostgreSQL database dump -- -- Dumped from database version 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1) -- Dumped by pg_dump version 10.12 -- Started on 2020-03-26 14:46:17 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conform...
DROP FUNCTION IF EXISTS append_to_store;
<gh_stars>1-10 CREATE TABLE user_phones ( user_id int NOT NULL, id int NOT NULL, access_salt varchar(255) NOT NULL, number bigint NOT NULL, title varchar(64) NOT NULL, PRIMARY KEY (user_id, id) );
update pair set pgkbcalevel='3' where pairid=110001; update pair set pgkbcalevel='3' where pairid=110011; update pair set pgkbcalevel='3' where pairid=110010; update pair set pgkbcalevel='3' where pairid=110008; update pair set pgkbcalevel='3' where pairid=110004; update pair set pgkbcalevel='1A' where pairid=110064; u...
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_2_0_logs/KRACOEUS-2640.sql alter table proposal modify (CFDA_NUMBER VARCHAR2(7)); commit;
INSERT INTO QUESTIONNAIRE_QUESTIONS (QUESTIONNAIRE_QUESTIONS_ID, QUESTIONNAIRE_REF_ID_FK, QUESTION_REF_ID_FK, QUESTION_NUMBER, PARENT_QUESTION_NUMBER, CONDITION_FLAG, CONDITION_TYPE, CONDITION_VALUE, UPDATE_TIMESTAMP, UPDATE_USER, QUESTION_SEQ_NUMBER, VER_NBR, OBJ_ID) VALUES (6113, (SELECT QUESTIONNAIRE_REF_ID FRO...
<filename>email-sending-sql.sql create database user; use user; create table data(notification varchar(1000)); insert into data values('hi'); create table notice(notification varchar(1000)); insert into notice values('hi'); create table emailList(email varchar(100)); insert into emailList values('<EMAIL>');
GO :OUT NUL: GO USE [$(DbName)]; GO :OUT STDOUT GO $(ExecuteStatement) GO
-- Input: upload_id, user_id (voter), vote_value BEGIN TRANSACTION; INSERT INTO votes_uploads (vote_upload, vote_user, vote_number) VALUES ($1::INT4, $2::INT4, $3::INT4) ON CONFLICT (vote_upload, vote_user) DO UPDATE SET vote_number = EXCLUDED.vote_number; UPDATE uploads SET upload_upvotes = upload_upvotes + $3::INT4...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 01, 2020 at 04:30 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
create or replace function select_booking_dyn (p_email text, p_dep_airport text, p_arr_airport text, p_dep_date date, p_flight_id int) returns setof booking_record_basic as $func$ DECLARE v_sql text:='SELECT DISTINCT b.booking_id, b.booking_ref, booking_name, account_id, email FROM booking b '; v_where_booking text;...
/** * This is the table structure for the ddns scirpts * * version 1.1.1 */ CREATE TABLE `RR` ( `SN` int(20) NOT NULL, `username` varchar(64) NOT NULL DEFAULT '', `FQDN` varchar(64) NOT NULL DEFAULT '', `TTL` int(5) NOT NULL DEFAULT '60', `type` varchar(10) NOT NULL DEFAULT '', `value` varchar(64) NOT...
CREATE FUNCTION New_Unit(UnitType text, HospitalCode text, UnitCode text) RETURNS integer LANGUAGE sql SET search_path TO ccms, public AS $$ INSERT INTO Units (UnitTypeID, HospitalID, UnitCode) VALUES (UnitType(UnitType), Hospital(HospitalCode), UnitCode) RETURNING UnitID $$;
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 06 Agu 2021 pada 04.52 -- Versi server: 10.4.14-MariaDB -- Versi PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SE...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 15, 2021 at 05:05 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
CREATE TABLE [dbo].[Facturi] ( [IdFactura] INT NOT NULL PRIMARY KEY IDENTITY, [DataFactura] int not null, [NumarDocument] nvarchar(25) not null, [ClientId] int not null, [TotalFaraTVA] money not null, [TVA] money not null, [TotalCuTVA] money not null, CONSTRAINT [FK_Facturi_Clienti] FOREIGN KEY ([ClientId]...
<reponame>forstar2001/RKA_Laravel /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * Author: root * Created: 10 Aug, 2018 */ INSERT INTO `countries` (`id`, `country_name`) VA...
DELIMITER $$ CREATE PROCEDURE buscar_media_por_cargo(IN jobName TEXT) BEGIN SELECT ROUND(AVG(empls.SALARY), 2) AS 'Média salarial' FROM hr.employees empls INNER JOIN hr.jobs jbs ON empls.JOB_ID = jbs.JOB_ID WHERE jobName = jbs.JOB_TITLE GROUP BY jbs.JOB_TITLE; END $$; DELIMITER ; CALL buscar_media_por_cargo('Program...
<reponame>EricMuller/qcm-designer-api<filename>qcm-infra-db/src/main/resources/db/migration/V5__num_version.sql<gh_stars>1-10 ALTER TABLE question ADD numero_version INTEGER not null default 1; ALTER TABLE questionnaire_question ADD numero_version INTEGER; update questionnaire_question set numero_version = 1; A...
<reponame>gabfl/dbschema ALTER TABLE distributors RENAME COLUMN address TO city; ALTER TABLE distributors ALTER COLUMN street DROP NOT NULL;
{# ============= Fetch the list of tables/view based on given schema_names ============= #} {% if object_name == 'tables' %} SELECT n.nspname schema_name, c.relname object_name FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind = ANY(array['r']) and n.n...
SELECT DEPARTMENT_ID , DECODE(DEPARTMENT_ID, 20, 'MA', 60, 'IT', 90,'EX', 'ETC') FROM EMPLOYEES e ; -- case() : if문과 같은 역할 함수 SELECT FIRST_NAME , DEPARTMENT_ID , CASE WHEN DEPARTMENT_ID = 20 THEN 'MA' WHEN DEPARTMENT_ID = 60 THEN 'IT' WHEN DEPARTMENT_ID = 90 THEN 'EX' ELSE NULL END "DEPARTMENT" ...
insert into users (username, password, enabled) values ('waylau', '<PASSWORD>', true); insert into users (username, password, enabled) values ('admin', '<PASSWORD>', true); insert into authorities (username, authority) values ('waylau', 'ROLE_USER'); insert into authorities (username, authority) values ('admin', '...
DROP TABLE `event_outcome_options`; DROP TABLE `event_outcomes`; ALTER TABLE `events` ADD `sum_score` bigint(20) DEFAULT NULL, ADD `destroy_score` bigint(20) NOT NULL DEFAULT '0', ADD `sum_votes` bigint(20) NOT NULL DEFAULT '0', ADD `effective_destroy_score` bigint(20) NOT NULL DEFAULT '0', ADD `winning_opti...
<filename>src/main/resources/db/migration/V1_1__init_tables.sql -- NB Flyway requires lowercase for table names create schema if not exists dbjuddata; CREATE TABLE judicial_user_profile( elinks_Id varchar(256) NOT NULL, personal_code varchar(32) NOT NULL, title varchar(64) NOT NULL, known_as varchar(64) NOT NULL, ...
<filename>sql/install-2.0.0.sql ALTER TABLE `PREFIX_genzo_krona_player_history` ADD `id_order` INT NOT NULL AFTER `id_action_order`, ADD `coins` INT NOT NULL AFTER `change`, ADD `points` INT NOT NULL AFTER `change`, ADD `force_display` INT NULL DEFAULT NULL AFTER `change`, ADD `loyalty_expire_date` ...
/* you can use this script manually against an existing warehouse * for new warehouse instances, these schema changes have been incorporated into the create script */ ALTER TABLE [dbo].[Dimension_Operation] ALTER COLUMN [Operation] NVARCHAR(128) NOT NULL; GO INSERT [dbo].[Dimension_Operation] VALUES ( 'Reinstal...
{% test unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %} {{ return(adapter.dispatch('test_unique_combination_of_columns', 'dbt_utils_justos')(model, combination_of_columns, quote_columns)) }} {% endtest %} {% macro default__test_unique_combination_of_columns(model, combination_of_...
-- Deploy ggircs-portal:types/search_certification_url_result to pg -- requires: schema_ggircs_portal begin; drop type ggircs_portal.search_certification_url_result; commit;
UPDATE samply.job_schedule SET paused = false, cron_expression = '0 0 0/6 ? * * *' WHERE job_key='MaintenanceGroup.ReportToMonitoringJob'; INSERT INTO samply.configuration(name, setting, visible) values('CENTRAL_MDS_DATABASE_WHITELIST', 'urn:dktk:dataelement:54;urn:dktk:dataelement:26;urn:dktk:dataelement:1;urn:dktk:da...
/* Sure, we say FORALL is fast, but how fast, really? And how does it compare to "pure" SQL (which of course you should use whenever possible!)? */ CREATE TABLE parts (partnum NUMBER, partname VARCHAR2 (15)); CREATE TABLE parts2 (partnum NUMBER, partname VARCHAR2 (15)); CREATE OR REPLACE TYPE parts_ot IS OBJECT ...
<filename>atc/db/migration/migrations/1579713178_add_first_occurrence_to_build_resource_config_version_inputs.up.sql ALTER TABLE build_resource_config_version_inputs ADD COLUMN first_occurrence boolean;
-- Membuat Schema table Aplikasi SEKAWAN -- 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_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; CREATE TABLE IF NOT EXISTS katego...
-- -- -- DROP FUNCTION IF EXISTS qf_help(); DROP FUNCITON IF EXISTS qf_dbs_info();
create class test_class (date_col date, time_col time, timestamp_col timestamp, datetime_col datetimeltz); insert into test_class(datetime_col) values ('01/02/10999 23:59:59'); insert into test_class(datetime_col) values (datetimeltz '0-01-01 00:00:00.000'); insert into test_class(datetime_col) values (datetimeltz '2...
-- MySQL dump 10.13 Distrib 5.7.12, for Win32 (AMD64) -- -- Host: localhost Database: introdbmp -- ------------------------------------------------------ -- Server version 5.7.20-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */...
<filename>assets/data/dump.sql -- phpMyAdmin SQL Dump -- version 4.6.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Dec 02, 2017 at 11:38 AM -- Server version: 5.7.12-log -- PHP Version: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_S...
--Pruebas para Pareja Entity delete from ServicioEntity_ProveedorEntity; delete from RegaloEntity_UbicacionEntity; delete from PagoEntity; delete from TarjetaCreditoEntity; delete from TareaEntity; delete from calificacionentity; delete from OpcionServicioEntity; delete from RegaloEntity; delete from InvitadoE...
<reponame>Glightman/Estudo_Banco_Dados /**/ /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*AQUI EU CRIEI A PRIMEIRA TABELA QUE SE REFERE A MINHA ENTIDADE PRINCIPAL, NESSE CASO, COMO VOU FALAR DE CARROS, CRIEI UMA TABELA DE MARCAS DE CARROS. EXE...
<filename>specs/lib/models/0020_model/migrates/0020-insert_1.sql INSERT INTO "0020_model" (title) VALUES ('record 20'); -- DOWN INSERT INTO "0020_model" (title) VALUES ('DROP record 20');
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Client : localhost -- Généré le : Ven 06 Avril 2018 à 17:24 -- Version du serveur : 10.0.34-MariaDB-0ubuntu0.16.04.1 -- Version de PHP : 7.0.28-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; ...
<filename>Projet_SQL/projet.sql<gh_stars>0  DROP schema projet CASCADE ; CREATE SCHEMA projet; ------------------------------------------------------------- CREATE TABLE ---------------------------------------------------------------------------------------------------------- CREATE TABLE projet.agents( id_agent SER...
SET lines 150 PAGES 999 TRIMS ON ECHO OFF VERIFY OFF FEEDBACK OFF PROMPT ACCEPT sid NUMBER PROMPT 'Enter SID: ' ACCEPT serial NUMBER PROMPT 'Enter SERIAL#: ' COLUMN sql_text HEADING "SQL Statement" Format a100 SELECT T.sql_text FROM v$session S, v$sqltext_with_newlines T WHERE S.sid = &sid AND S....
drop table Apps_NOT_Normalized; Create Table Apps_NOT_Normalized( App_No integer, StudentID integer, StudentName varchar(50), Street varchar(100), State varchar(30), ZipCode varchar(7), App_Year integer, ReferenceName varchar(100), RefInstitution varchar(100), ReferenceStatement varchar(500), Pri...
<gh_stars>1-10 -- name: create_schema# create table fitbit_token ( id text not null unique primary key, access_token text not null, refresh_token text not null, expires_at float not null, enable_steps boolean not null default false, enable_weight boolean not null default false ); create table withings_tok...
<filename>codeigniter.sql<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 07, 2016 at 10:20 PM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
CREATE TABLE `example` ( `id` int(10) unsigned NOT NULL, `email` varchar(64) NOT NULL, `org_id` int(10) unsigned NOT NULL, PRIMARY KEY (`id`) ); -- This query fails on the unique index part, just like V1.12. But I wonder if it also fails on the USING BTREE part? ALTER TABLE `example` ADD UNIQUE INDEX `unique_examp...
CREATE TABLE [Production].[ProductSubcategory] ( [ProductSubcategoryID] INT IDENTITY (1, 1) NOT NULL, [ProductCategoryID] INT NOT NULL, [Name] [dbo].[Name] NOT NULL, [rowguid] UNIQUEIDENTIFIER CONSTRAINT [DF_ProductSubcategory_rowguid] DEFAU...
-- -- PostgreSQL database dump -- -- Dumped from database version 11.10 (Raspbian 11.10-0+deb10u1) -- Dumped by pg_dump version 11.10 (Raspbian 11.10-0+deb10u1) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings =...
<reponame>Otajonov/ajax-login<filename>users.sql<gh_stars>1-10 CREATE TABLE `users` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NOT NULL, `email` VARCHAR(255) NOT NULL, `username` VARCHAR(60) NOT NULL, `password` VARCHAR(255) NOT NULL, `created_at` DATETIME NOT NULL, PRIMARY KEY (`id`) ) COLLATE=...
<reponame>garasijogi/mosacc-backend -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 29, 2019 at 01:18 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_...
<reponame>toburger/Rezoom.SQL<filename>src/Rezoom.SQL.Test/user-model-6/V1.model-a.sql create table Foos ( Id int primary key autoincrement , SlideId int references Slides(Id) );
-- file:arrays.sql ln:540 expect:true select string_to_array('abc', '', 'abc')
.import --csv --skip 1 data/case_info.csv case_info .import --csv --skip 1 data/case_jurisdiction.csv case_jurisdiction .import --csv --skip 1 data/docket_item.csv docket_item .import --csv --skip 1 data/decision_item.csv decision_item .import --csv --skip 1 data/party.csv party .import --csv --skip 1 data/party_attorn...
<reponame>vegetweb/warehouse-docker<filename>1.32.0/var/www/html/indicia/modules/indicia_setup/db/version_0_7_0/201104202018_reorder_site_roles.sql UPDATE site_roles SET title='Editor' WHERE id=2; UPDATE site_roles SET title='User' WHERE id=3; UPDATE users_websites SET site_role_id=CASE site_role_id WHEN 2 THEN 3 WHE...
<reponame>AmFn/move_online /* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 80019 Source Host : localhost:3306 Source Schema : move_online Target Server Type : MySQL Target Server Version : 80019 File Encoding ...
<reponame>adriens/liquibase -- Database: mssql -- Change Parameter: tableName=person DROP TABLE [person];
<gh_stars>1-10 -- Module 18 - Demo 1 -- Step 1 - Define an Extended Events session to capture the text of completed SQL statements -- when executed by the ADVENTUREWORKS\Student login CREATE EVENT SESSION SqlStatementCompleted ON SERVER ADD EVENT sqlserver.sql_statement_completed ( ACTION (sqlserver.sql_text,sqls...
BEGIN; CREATE EXTENSION IF NOT EXISTS oracle_fdw; DROP SERVER IF EXISTS wells_oradb CASCADE; CREATE SERVER wells_oradb FOREIGN DATA WRAPPER oracle_fdw OPTIONS (dbserver '//nrk1-scan.bcgov/envprod1.nrs.bcgov'); DROP USER MAPPING IF EXISTS FOR public SERVER wells_oradb; CREATE USER MAPPING FOR public SERVER wells_orad...
<reponame>viswaratha12/dbwarden /****** Object: StoredProcedure [dbo].[UpdateRunOpLog] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[UpdateRunOpLog] /**************************************************** ** ** Desc: Update selected items from instrument run ** ...
<reponame>Skatteetaten/dbh ALTER TABLE SCHEMA_DATA ADD SET_TO_COOLDOWN_AT TIMESTAMP; ALTER TABLE SCHEMA_DATA ADD DELETE_AFTER TIMESTAMP;
<gh_stars>1000+ SELECT 1 FROM system.one LIMIT 1 BY 1; SELECT 1 FROM system.one LIMIT 1 BY 1 AS one; SELECT 1 as one FROM system.one LIMIT 1 BY 1; SELECT 1 as one FROM system.one LIMIT 1 BY one; SELECT 1 as one FROM system.one LIMIT 1 BY rand(); SELECT number FROM numbers(10) LIMIT 2 BY number % 2; SELECT number FROM n...
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- The UDT for creating messages CREATE TYPE mq_new_t AS ( -- Unique message ID id UUID, -- Delay before message is processed delay INTERVAL, -- Number of retries if initial processing fails retries INT, -- Initial backoff between retries retr...
-- @author prabhd -- @created 2014-04-01 12:00:00 -- @modified 2012-04-01 12:00:00 -- @tags dml MPP-21090 ORCA -- @optimizer_mode on -- @description Tests for MPP-21090 \echo --start_ignore set gp_enable_column_oriented_table=on; \echo --end_ignore DROP TABLE IF EXISTS mpp21090_pttab_dropcol_addcol_addpt_idx_dml_floa...
<filename>configs/db/tables/gems__track_fields.40.sql CREATE TABLE if not exists gems__track_fields ( gtf_id_field bigint unsigned not null auto_increment, gtf_id_track int unsigned not null references gems__tracks (gtr_id_track), gtf_id_order int not null defa...
<gh_stars>1-10 ALTER TABLE event_information ADD is_deleted boolean default '0' NOT NULL; ALTER TABLE event_history ADD is_deleted boolean default '0' NOT NULL;
<filename>hasura/migrations/1625864292975_alter_table_schedule_StarredEvent_add_unique_eventId_registrantId/down.sql alter table "schedule"."StarredEvent" drop constraint "StarredEvent_eventId_registrantId_key";
<gh_stars>0 create table match_profile ( id varchar(36) not null, p_id varchar(255), orgnr varchar(255), source_id varchar(36) not null, type varchar(255) not null, status varchar(255) not null, title varchar(1024), description varchar(1024), ...
/* Navicat Premium Data Transfer Source Server : 192.168.0.168 Source Server Type : MySQL Source Server Version : 100508 Source Host : 192.168.0.168:3306 Source Schema : swooleapp Target Server Type : MySQL Target Server Version : 100508 File Encoding : 65001 Date: 0...
-- Adding APD status enum and APD details table CREATE TYPE apd_status_enum AS ENUM ( 'PENDING', 'ACTIVE', 'INACTIVE' ); ALTER TYPE apd_status_enum OWNER TO ${flyway:user}; CREATE TABLE apds ( id uuid DEFAULT public.gen_random_uuid() NOT NULL, name character varying NOT NULL, url character va...
<filename>sql/test_data.sql -- MySQL user (use authentication plugin instead of MySQL 8.0's caching_sha2_password) CREATE USER 'mandora'@'localhost' IDENTIFIED WITH mysql_native_password BY '<PASSWORD>'; GRANT ALL PRIVILEGES ON *.* TO 'mandora'@'localhost'; -- Address data INSERT INTO `address` (`postalcode`,`housenum...
<gh_stars>1-10 CREATE USER vdev_user PASSWORD '<PASSWORD>' SUPERUSER; CREATE DATABASE vdev_db owner vdev_user ENCODING = 'UTF-8';
SELECT f.Id, f.[Name], CONCAT(f.Size, 'KB') AS [Size] FROM Files AS f LEFT JOIN Files AS fi ON fi.ParentId = f.Id WHERE fi.Id IS NULL ORDER BY f.Id, f.[Name], f.Size DESC
-- ====== -- Description: -- 1. Drops if exists cleaned.weather -- 2. Creates table cleaned.weather data from raw.weathers_raw -- Last Updated: Aug 29, 2019 -- ====== DROP TABLE IF EXISTS cleaned.weather; CREATE TABLE if not exists cleaned.weather AS ( SELECT to_timestamp(NULLIF(time,''), 'YYYY/MM/DD HH24:MI:SS')...
CREATE TABLE [docs].[RepoObject_Adoc_T] ( [RepoObject_guid] UNIQUEIDENTIFIER NOT NULL, [cultures_name] NVARCHAR (10) CONSTRAINT [DF_RepoObject_Adoc_T_cultures_name] DEFAULT ('') NOT NULL, [AdocContent] NVARCHAR (MAX) CONSTRAINT [DF_RepoObject_Adoc_T_AdocConten...
CREATE INDEX HPA_ADDRESSES ON HPA.ADDRESSES ( PRISON_NUMBER ) INCLUDE ( STREET, TOWN, COUNTY, TYPE, PERSON ) WITH (ONLINE = ON); GO CREATE INDEX HPA_COURT_HEARINGS ON HPA.COURT_HEARINGS ( PRISON_NUMBER, DATE ) INCLUDE ( COURT ) WITH (ONLINE = ON); GO CREATE INDE...
<filename>src/test/resources/sql/drop_role/300c32cb.sql -- file:rowsecurity.sql ln:1436 expect:true DROP ROLE regress_rls_frank
<reponame>Shuttl-Tech/antlr_psql -- file:matview.sql ln:201 expect:true drop materialized view mvtest_error
<reponame>DevotionGeo/sailor<filename>test/dev-app/sql/sqlite3.sql -- SQLite3 drop table if exists users; create table users( 'id' integer primary key autoincrement, 'username' varchar(20), 'password' varchar(64) ); drop table if exists post; create table post( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `body` TEXT,...
<filename>sql/insert.sql INSERT INTO user (name,password,gender,created_at,deleted_at) VALUES ("<NAME>","57A9FABB-27E6-0B21-1307-F14D22ED96F1",1,"2011-11-22 02:50:25",NULL), ("<NAME>","626B7975-EA1F-2136-EAD8-244415B17EBD",1,"2015-05-06 00:40:05",NULL), ("<NAME>","75D2DB8E-45E5-08D5-6669-BBA06F615472",2,"2014-01-05 15:...
<gh_stars>0 insert into department(name) values( "Payroll"), ( "Dev"), ( "IT"); insert into role(title, salary, department_id) values("Accountant", 45000.00, 1), ("Payroll Admin", 55000.00, 1), ("Sr. Developer", 75000.00, 2), ("Jr. Developer", 60000.00, 2), ("Networking engineer", 65000.00, 3), ("Helpdesk Tech", 5000...
IF OBJECT_ID('tempdb..@visit_context_table', 'U') IS NOT NULL DROP TABLE @visit_context_table; SELECT c1.cohort_definition_id AS cohort_id, vo1.visit_concept_id, CASE WHEN vo1.visit_end_date < c1.cohort_start_date THEN 'Before' WHEN vo1.visit_start_date < c1.cohort_start_date AND vo1.visit_end_date >= c1...
<filename>src/main/resources/t_student_create.sql<gh_stars>0 DROP TABLE IF EXISTS `t_student`; CREATE TABLE `t_student` ( `id` bigint(20) AUTO_INCREMENT , `name` varchar(50) not NULL COMMENT '名称', `height` double(4,2) comment '身高', `class_no` int(11) COMMENT '所属班级', `sex` tinyint(1) COMMENT '性别', `iq` int(1...
<gh_stars>0 insert into EXCHANGE_VALUE (ID,FROM_CURRENCY,TO_CURRENCY,CONVERSION) values(1000,'USD','INR',75); insert into EXCHANGE_VALUE (ID,FROM_CURRENCY,TO_CURRENCY,CONVERSION) values(1001,'GBP','INR',90); insert into EXCHANGE_VALUE (ID,FROM_CURRENCY,TO_CURRENCY,CONVERSION) values(1002,'EUR','INR',85);
BEGIN DECLARE termOne varchar(45); DECLARE termTwo varchar(45); DECLARE termThree varchar(45); DECLARE termFour varchar(45); SET termOne = (SELECT a.term_id FROM `fci_term` AS a WHERE DATE_FORMAT(NOW(), '%m') = SUBSTR(a.term_month_1, 1, 2) AND DATE_FORMAT(NOW(), '%Y') = SUBSTR(a.term_month_1, 3, 4)); SET termTwo = (S...
<reponame>kyleneideck/ANDS-Online-Services /* Copyright 2012 The Australian National University 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 Un...
<filename>mar-crawlers/schema/crawlerdb.sql CREATE TABLE IF NOT EXISTS data ( model_id text PRIMARY KEY, filename text, name text, download_url text, size integer, license text, repo_id VARCHAR(255), creation_date integer, -- unix time last_update integer, -- unix time description text, topics tex...
<gh_stars>1-10 CREATE INDEX IF NOT EXISTS idx_channels_team_id_display_name ON channels(teamid, displayname); CREATE INDEX IF NOT EXISTS idx_channels_team_id_type ON channels(teamid, type); DROP INDEX IF EXISTS idx_channels_team_id;
-- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may not...
<filename>migrations/migrations/default/1621973118810_alter_table_railroad_systems_shipping_orders_add_column_created_at/up.sql alter table "railroad_systems"."shipping_orders" add column "created_at" timestamptz null default now();