sql
stringlengths
6
1.05M
<filename>chapter_008/src/main/java/firsttask/first_task.sql<gh_stars>0 CREATE TABLE roles ( role varchar (30) primary key, description varchar (30) ); INSERT INTO roles (role, description) VALUES ('admin', 'all permissions'); INSERT INTO roles (role, description) VALUES ('moderator', 'read/write permissions'...
CREATE TABLE `user` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `email` VARCHAR(255) NOT NULL COMMENT '邮箱', `name` VARCHAR(255) NOT NULL COMMENT '用户名', `password` VARCHAR(80) NOT NULL COMMENT '密码', `gmt_create` DATETIME NOT NULL COMMENT '创建时间', `gmt_modify` DATETIME NOT NULL COMMENT '修改时间',...
<reponame>aspectcapital/dbt-utils<gh_stars>100-1000 {% test relationships_where(model, column_name, to, field, from_condition="1=1", to_condition="1=1") %} {{ return(adapter.dispatch('test_relationships_where', 'dbt_utils')(model, column_name, to, field, from_condition, to_condition)) }} {% endtest %} {% macro defau...
% PiCO QL query SELECT name, lon, lat, ele FROM MapTrack JOIN TrackWayPoint ON TrackWayPoint.base = MapTrack.trackwaypoints_id WHERE ele > 20 UNION SELECT name, lon, lat, ele FROM MapWayPoint WHERE ele > 20;
<filename>usr/share/roundcube/SQL/postgres/2013052500.sql CREATE TABLE "cache_shared" ( cache_key varchar(255) NOT NULL, created timestamp with time zone DEFAULT now() NOT NULL, data text NOT NULL ); CREATE INDEX cache_shared_cache_key_idx ON "cache_shared" (cache_key); CREATE INDEX cache_shared_created_id...
select 'uri://forms.google.com' as namespace, form_id as surveyIdentifier, struct( 2022 as schoolYear ) as schoolYearTypeReference, form_title as surveyTitle from {{ ref('stg_google_forms') }}
-- /*************************************************************************** -- (c) Copyright IBM Corp. 2011 All rights reserved. -- -- The following sample of source code ("Sample") is owned by International -- Business Machines Corporation or one of its subsidiaries ("IBM") and is -- copyrighted and licensed, not ...
<filename>examples/compose/config/init_db.sql # This file is executed immediately after mysql_install_db, # to initialize a fresh data directory. ############################################################################### # Equivalent of mysql_secure_installation ####################################################...
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'; ALTER TABLE `assurenote`.`assurance_case` DROP FOREIGN KEY `fk_assurance_case_user` ; ALTER TABLE `assurenote`.`ass...
<filename>flaming-code/flaming-sms/sql/outgoingSmses.sql CREATE TABLE `outgoingSmses` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `gatewayName` varchar(100) COLLATE utf8_general_ci NOT NULL, `gatewayId` varchar(100) COLLATE utf8_general_ci DEFAULT NULL, `content` text COLLATE utf8_general_ci NOT NULL, `p...
<reponame>mhconradt/analytics-toolbox-core<filename>modules/processing/bigquery/sql/ST_DELAUNAYPOLYGONS.sql<gh_stars>10-100 ---------------------------- -- Copyright (C) 2021 CARTO ---------------------------- CREATE OR REPLACE FUNCTION `@@BQ_PREFIX@@carto.ST_DELAUNAYPOLYGONS` (points ARRAY<GEOGRAPHY>) RETURNS ARRAY<G...
create temp table copytest3 ( c1 int, "col with , comma" text, "col with "" quote" int) distributed by (c1); copy copytest3 from stdin csv header; this is just a line full of junk that would error out if parsed 1,a,1 2,b,2 \. copy copytest3 to stdout csv header; -- copy with error table CREATE TABLE number (a I...
<gh_stars>0 CREATE TABLE [ASData_PL].[Resv_Course]( [CourseId] [varchar](20) NOT NULL, [Title] [varchar](500) NOT NULL, [Level] [tinyint] NOT NULL, [EffectiveTo] [datetime] NULL, [AsDm_UpdatedDateTime] datetime2 default getdate(), PRIMARY KEY CLUSTERED ([CourseId] ASC )) ON [PRIMARY] GO
<filename>migrations/sqls/20220316210348-products-table-down.sql /* DOWN */ DROP TABLE products;
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.0.4.1 -- http://www.phpmyadmin.net -- -- Máquina: 127.0.0.1 -- Data de Criação: 29-Out-2014 às 03:07 -- Versão do servidor: 5.5.32 -- versão do PHP: 5.4.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
<filename>source/Database/Data.sql CREATE TABLE [demo].[Data] ( [Id] INT NOT NULL IDENTITY(1,1) PRIMARY KEY, [DataValue] VARCHAR(256) NOT NULL )
<filename>Commencement.Db/Schema Objects/Schemas/dbo/Tables/Keys/FK_Commencements_TermCodes.fkey.sql ALTER TABLE [dbo].[Ceremonies] ADD CONSTRAINT [FK_Commencements_TermCodes] FOREIGN KEY ([TermCode]) REFERENCES [dbo].[TermCodes] ([id]) ON DELETE NO ACTION ON UPDATE NO ACTION;
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 22 Jan 2019 pada 18.52 -- Versi Server: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*...
<reponame>palomak/Lab_Tec -- phpMyAdmin SQL Dump -- version 4.4.15.5 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1:3306 -- Generation Time: Apr 24, 2017 at 07:33 AM -- Server version: 5.6.34-log -- PHP Version: 7.0.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_...
/*team*/ insert into team(id, color, name) values (default, 'Red', 'Sith'); insert into team(id, color, name) values (default, 'Blue', 'Rebel'); /*insert student*/ insert into person(da, username, firstname, lastname, email) values (1111111, '<NAME>', 'Joshua', 'Leblanc', '<EMAIL>'); insert into "user"(id, da, passwor...
SELECT `first_name`, `last_name`, `job_title` FROM `employees` WHERE `salary` >= 20000 AND `salary` <= 30000;
<gh_stars>1-10 DECLARE @V_Cmd NVARCHAR(max); SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON DECLARE @V_DBName SYSNAME = '{0}'; -- drop DB IF( DB_ID( @V_DBName ) IS NOT NULL ) BEGIN SET @V_Cmd = ' ALTER DATABASE ' + QUOTENAME( @V_DBName ) + ' SET SINGLE_USER WITH ROLLBACK IMMEDIATE ; ' ; EXEC ( @V_Cmd ); S...
<reponame>isabella232/Ore-1<filename>ore/conf/evolutions/default/95.sql<gh_stars>100-1000 # --- !Ups ALTER TABLE users ADD COLUMN language VARCHAR(16); ALTER TABLE notifications ADD COLUMN message_args VARCHAR(255)[]; UPDATE notifications SET message_args = ARRAY[message]; ALTER TABLE notifications DROP COLUMN messa...
-- Deploy seattleflu/schema:warehouse/identifier/triggers/barcode-distance-check to pg -- requires: warehouse/identifier -- requires: functions/hamming_distance begin; -- This is the core of our CualID implementation, akin to running: -- -- cual-id create ids --existing-ids ... -- -- CAUTION ADVISED when changing ...
-- Sub-queries and presence or absence!! -- This chapter is an introduction to sub-queries and their potential impacts on query performance. It also examines the different methods used to determine if the data in one table is present, or absent, in a related table. -- Uncorrelated sub-query -- A sub-query is anothe...
create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_OWNER" as ( -- Final base SQL model select _AIRBYTE_CHILDREN_HASHID, OWNER_ID, _AIRBYTE_EMITTED_AT, _AIRBYTE_OWNER_HASHID from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDR...
<gh_stars>1-10 SELECT dcp_name, dcp_projectid, dcp_projectname, dcp_projectbrief, dcp_borough, dcp_communitydistricts, dcp_ulurp_nonulurp, dcp_leaddivision, dcp_ceqrtype, dcp_ceqrnumber, dcp_easeis, dcp_leadagencyforenvreview, dcp_alterationmapnumber, dcp_sischoolseat, dcp_sisubdivision, ...
<reponame>shenlink/edu-admin /* Navicat Premium Data Transfer Source Server : root Source Server Type : MySQL Source Server Version : 80012 Source Host : localhost:3306 Source Schema : edu Target Server Type : MySQL Target Server Version : 80012 File Encoding ...
<reponame>adityasamaroo/adityasamaroo.github.io<filename>portfolio/UniversityDB/Group10_Database_Implementation.sql create database Group_10 go use Group_10; -- Encryption Stuff create master key encryption by password = '<PASSWORD>'; create certificate TestCertificate with subject = 'University Group 10 Test Certi...
<filename>src/main/resources/META-INF/io/github/drmashu/koshop/dao/ItemImageDao/selectByItemIdWithoutBlob.sql SELECT /*%expand*/* FROM item_image WHERE item_id = /* arg0 */'hoge'
SELECT COUNT(*) FROM title t,movie_info mi,movie_companies mc,cast_info ci,movie_keyword mk WHERE t.id=mi.movie_id AND t.id=mc.movie_id AND t.id=ci.movie_id AND t.id=mk.movie_id AND ci.role_id=2 AND mi.info_type_id=16 AND t.production_year>2010 AND mc.company_id=22956; SELECT COUNT(*) FROM title t,movie_info mi,movie_c...
-- 用户 insert into sys_user (user_name,password,sex,age) values ('admin','$<PASSWORD>FKyGkvKfo<PASSWORD>','0',20); insert into sys_user (user_name,password,sex,age) values ('<PASSWORD>','<PASSWORD>','1',18); insert into sys_user (user_name,password,sex,age) values ('李雷','<PASSWORD>','0',19); -- 菜单 insert into sys_men...
<filename>Ontology_Lookup/UpdateUserPermissions.sql /****** Object: StoredProcedure [dbo].[UpdateUserPermissions] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE dbo.UpdateUserPermissions /**************************************************** ** ** Desc: Updates user permissions in t...
<reponame>jankytara2/dbt select * from {{ target.schema }}.seed
define column domain hist_action generate-check-constraint (constraint-name (alias-name || "_" || column-name || "_ck") check-rule(column-name || " in ('I','U','D')")) ( varchar2(1) not null );
/* The Flyway tool applies this migration to create the database. Follow this style guide https://about.gitlab.com/handbook/business-ops/data-team/platform/sql-style-guide/ use VARCHAR(63) for names in organization and schema Copy a version of this comment into the next migration */ /* This SQL creates tables to...
<filename>idata-migration/src/main/resources/db/migration/ops/V0.9.0.1__ops_ddl.sql alter table dev_job_history add state varchar(32) null comment '作业当前状态' after duration;
<reponame>hbraha/ovirt-engine -- This was merged by mistake and replaced with sql code that does nothing --select fn_db_add_config_value('VdsCertificateValidityInDays','398','general'); SELECT 1;
<filename>migrations/20170730210840_create_files/up.sql CREATE TABLE files ( id UUID PRIMARY KEY NOT NULL, name TEXT NOT NULL, file_type TEXT NOT NULL );
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50716 Source Host : localhost:3306 Source Database : dreamcrm Target Server Type : MYSQL Target Server Version : 50716 File Encoding : 65001 Date: 2016-12-27 06:17:11 */ SET FOREIGN_KEY_CHECKS=0;...
<reponame>JaggedComet/Employee-Tracker INSERT INTO department (id, name) VALUES (1, "Engineering"), (2, "Finance"), (3, "Legal"), (4, "Sales"); INSERT INTO role (id, title, salary, department_id) VALUES (1, "Sales Manager", 250000, 4), (2, "Sales Person", 90000, 4), (3, "...
<gh_stars>1-10 --Create trigger with 'BEFORE' action_time and retrieve the information from virtual class db_trig create class test_class(col1 integer, col2 varchar(20)); insert into test_class values(999,'nhn'); create trigger test_trigger after insert on test_class execute print 'Insert into a new record to t...
-- @testpoint:opengauss关键字tsfield(非保留),作为表空间名 --关键字不带引号,创建成功 drop tablespace if exists tsfield; CREATE TABLESPACE tsfield RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; drop tablespace tsfield; --关键字带双引号,创建成功 drop tablespace if exists "tsfield"; CREATE TABLESPACE "tsfield" RELATIVE LOCATION 'hdfs_tablespac...
<gh_stars>0 -- @testpoint:建表指定其中一列是唯一约束,冲突后使用insert...nothing语句 --预置条件enable_upsert_to_merge为off drop table if exists mykey_2a; --建表指定id列是唯一约束 create table mykey_2a ( name nvarchar2(20), id number unique , address nvarchar2(50) ) ; --常规insert语句插入一条数据('bibly',1,'shenzhen') insert into mykey_2a values('bibly',...
CREATE SCHEMA keycloak;
<reponame>evandibona/walllet  CREATE TABLE Models.BankAccounts ( [Id] int IDENTITY(1,1) NOT NULL, --Identity( seed, increment ) [Name] nvarchar(50) NULL, ) GO ALTER TABLE [Models].[BankAccounts] ADD CONSTRAINT [PK_Models.BankAccounts] PRIMARY KEY CLUSTERED ( [Id] ASC ) GO AUTOPROC Insert,Delete,...
<reponame>bachtuyetx7chulun/gamebox /* Warnings: - You are about to drop the column `engine` on the `Game` table. All the data in the column will be lost. */ -- RedefineTables PRAGMA foreign_keys=OFF; CREATE TABLE "new_Game" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "name" TEXT NOT NULL, "des...
<filename>database/online_shop.sql -- MySQL dump 10.13 Distrib 5.7.20, for Linux (x86_64) -- -- Host: localhost Database: online_shop -- ------------------------------------------------------ -- Server version 5.7.20-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @O...
<reponame>fraillove/pljson create or replace package pljson_ext as /** * <p>This package contains the path implementation and adds support for dates * and binary lob's. Dates are not a part of the JSON standard, so it's up to * you to specify how you would like to handle dates. The * current implementatio...
##Criando tabela comclien_bkp com a mesma estrutura de dados da tabela comclien. create table comclien_bkp( select * from comclien where c_estaclien = 'SP' ); create table comcontato( n_numecontato int primary key not null auto_increment, c_nomecontato varchar(200), c_fonecontato varchar(30), c_cidacontato var...
-- This SQL script contains the relationships between users and businesses. -- The first 1000 entries contain the primary adminstrators of businesses. -- The next 2000 entries contain adminstrators of businesses. insert into users_businesses (user_id, businesses_id) values (1, 1); insert into users_businesses (user_id...
<reponame>SierraChapman/employee-management-system -- To create the database and tables, paste the contents of this file into MySQL Workbench and run. -- -- Create "employee_management_db" database -- CREATE database employee_management_db; USE employee_management_db; -- Create "employee" table -- CREATE TABLE emplo...
<filename>modelbuilder/scripts/polder/02_uitknippen_deelgebied.sql /* Dit script selecteerd uit de gecontroleerde gegevens alles dat binnen een deelgebied ligt. Het deelgebied is een poldercluster. Telkens wordt ook een selectie gedaan op 'isuable' of objecten in de nowayout vlakken, dus alleen objecten die correct zij...
<reponame>gandhist/vyserion /* SQLyog Job Agent v10.42 Copyright(c) Webyog Inc. All Rights Reserved. MySQL - 5.5.5-10.1.13-MariaDB : Database - hris ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNI...
<filename>src/main/resources/schema.sql CREATE TABLE PERSON ( ID INTEGER, FIRSTNAME VARCHAR(128) NOT NULL, LASTNAME VARCHAR(128) NOT NULL, PRIMARY KEY (id) );
<filename>sqlserver.sql CREATE TABLE Users( Id INT IDENTITY PRIMARY KEY, Email VARCHAR(255) NOT NULL, Password VARCHAR(255) NOT NULL, Nickname VARCHAR(255), Email_Verified BIT DEFAULT 'FALSE' );
<gh_stars>1-10 ALTER TABLE agent ADD COLUMN IF NOT EXISTS abc BIGINT; COMMENT ON COLUMN agent.abc IS 'This agent supports credit system or not.';
 CREATE PROCEDURE [dbo].[SelectNextBatchToProcess] @serverId INT, @scriptInstanceId INT, @maxRetries INT, @mode NVARCHAR(50), @batchSize INT AS BEGIN DECLARE @status TABLE (Id INT) IF @mode = 'encrypt' BEGIN ...
<reponame>timshadel/subdivision-list<filename>data/pl/postgres/subdivisions_AD.postgres.sql CREATE TABLE subdivision_AD (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "subdivision_AD" ("id", "name", "level") VALUES (E'AD-07', E'Andora', E'parish'); INSERT INTO "su...
<filename>.sql files/bookstore_customer.sql CREATE TABLE customer ( CustID int NOT NULL, CustName tinytext, CustPhnum bigint NOT NULL, CustAddress mediumtext, PRIMARY KEY (CustID) );
<filename>tests/api/file_status_data_api_ut.pkb create or replace package body file_status_data_api_ut as -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- c_filename constant file_status_data.filename%type...
<gh_stars>10-100 -- file:horology.sql ln:49 expect:true SELECT time without time zone '040506.789-08'
<filename>src/test/resources/sql/create_view/b5329a23.sql -- file:updatable_views.sql ln:790 expect:true CREATE VIEW rw_view1 AS SELECT a FROM base_tbl WHERE a < b
<filename>SQL/Basic Select/Select By ID.sql -- github.com/RodneyShag SELECT * FROM CITY WHERE ID = 1661;
<filename>migrations/base.sql CREATE TABLE books ( id serial PRIMARY KEY, title text NOT NULL, short text NOT NULL, author text NOT NULL, year integer NOT NULL, created_at timestamptz NOT NULL DEFAULT now() ); CREATE TABLE recipes ( id serial PRIMARY KEY, name text NOT NULL, book_id...
CREATE OR REPLACE PROCEDURE GET_CONSORTIUM_COSTS ( AW_PROPOSAL_NUMBER IN OSP$BUDGET_PERIODS.PROPOSAL_NUMBER%TYPE, AI_VERSION_NUMBER IN OSP$BUDGET_PERIODS.VERSION_NUMBER%TYPE, AW_BUDGET_PERIOD IN OSP$BUDGET_PERIODS.BUDGET_PERIOD%TYPE, aw_sponsor in varchar2, cur_generic IN OUT result_sets.cur_generic)...
SELECT * FROM User WHERE username = "USERNAME";
<reponame>Grinalda/MJ CREATE VIEW ver_categoria AS SELECT `categ`.`Cat_nome` AS `Cat_nome`, `categ`.`Cat_id` AS `Cat_id` FROM `mj`.`categoria_legislacao` `categ`;
<filename>sql/patch_23_24.sql -- Copyright [1999-2013] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute -- -- 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 -- ...
<reponame>dkondriu/drill-test-framework select columns[0] as col1, columns[1] as col2,columns[2] as col3,columns[8] as col9, columns[11] as col12 from `/drill/testdata/text_storage/drill950.csv`;
<filename>Data/lechong_notes.sql /* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50542 Source Host : localhost Source Database : LCGW Target Server Type : MySQL Target Server Version : 50542 File Encoding : ut...
<reponame>josdem/vetlog-spring-boot<filename>src/main/resources/db/migration/V1.2__insert_fishes.sql INSERT INTO `breed` VALUES (70,'2017-06-04 13:55:01','Betta','FISH'),(71,'2017-06-04 13:55:01','Goldfish','FISH'),(72,'2017-06-04 13:55:01','Achilles Tang','FISH'),(73,'2017-06-04 13:55:01','Molly','FISH'),(74,'2017-06-...
<reponame>fuboki10/Railway-Management-System Use RailWaySystemDB SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <NAME> -- ============================================= CREATE PROCEDURE DeleteUserPhone -- Add the parameters for the stored procedure here @...
<reponame>Colinr1994/CovidTrack<gh_stars>0 CREATE TABLE IF NOT EXISTS `covidtrack`.`users` ( `email` VARCHAR(320) NOT NULL, `fName` VARCHAR(45) NULL, `lName` VARCHAR(45) NULL, `manager` VARCHAR(320) NULL, `passed` TINYINT ZEROFILL NULL, PRIMARY KEY (`email`)) ENGINE = InnoDB
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64) -- -- Host: 127.0.0.1 Database: blog -- ------------------------------------------------------ -- Server version 5.6.36 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /...
/* Navicat MySQL Data Transfer Source Server : DFGW Source Server Version : 50714 Source Host : localhost:3306 Source Database : dfgw-index Target Server Type : MYSQL Target Server Version : 50714 File Encoding : 65001 Date: 2018-12-29 10:35:06 */ SET FOREIGN_KEY_CHECKS=0; -- ---...
<filename>src/bibliotheque_de_fonctions_utiles/heure_monde.sql -- Création de la table table_des_decalages_horaires -- CREATE TABLE IF NOT EXISTS table_des_decalages_horaires( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, nom_de_la_timezone VARCHAR(100) NOT NULL, decalage_par_rapport_a_UTC INTEGER NOT NULL, indica...
<reponame>Mausy5043/lnxdiagd<filename>mysql-tables/table15.sql # MySQL script # create table for logfile counters USE domotica; DROP TABLE IF EXISTS syslog; CREATE TABLE `syslog` ( `sample_time` datetime, `sample_epoch` bigint(20) unsigned, `host` varchar(24), `p0` int(11) unsigned, ...
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 28, 2017 at 04:22 AM -- Server version: 10.1.16-MariaDB -- PHP Version: 5.6.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
<gh_stars>0 insert into corp_energy_consumption (corp_id, year, category, renewable, non_renewable, total) select distinct cect.corp_id, cect.year, cect.category, cect_r.consumption, cect_n.consumption, cect_r.consumption + cect_n.consumption from corp_energy_consumption_tall as cect inner join ( select c.corp_id...
<filename>sql/tables.sql CREATE TABLE user(id_tl bigint PRIMARY KEY, username varchar(255), sex BOOLEAN, age int); CREATE TABLE category(name varchar(255) PRIMARY KEY, counter int); CREATE TABLE question(id int PRIMARY KEY AUTO_INCREMENT, name varchar(255), category_name varchar(255), FOREIGN KEY(category_name) REFE...
<gh_stars>1-10 SET DEFINE OFF; ALTER TABLE AFW_11_VERSN ADD ( CONSTRAINT AFW_11_VERSN_FK3 FOREIGN KEY (REF_APLIC) REFERENCES AFW_11_APLIC (SEQNC) ON DELETE CASCADE ENABLE VALIDATE) /
USE SystemMonitor; #Begin master data DELIMITER // CREATE PROCEDURE systemMonitorInsertMasterData(IN serial VARCHAR(255), IN cpuCountLogical DECIMAL(30, 2) UNSIGNED, IN cpuCount DECIMAL(30, 2) UNSIGNED) BEGIN INSERT INTO SystemMonitor.MasterData(`serial`, `cpuCountLogical`, `cpuCount`) VALUES (serial, cpuCountLogica...
create table foo ( foo int64, bar int64 ) primary key (), interleave in parent foobar
<gh_stars>1000+ ------------------------ -- Rename/add columns -- ------------------------ alter table sites rename id to site_id; alter table sites add column first_hit_at timestamp; update sites set first_hit_at=created_at; alter table sites alter column first_hit_at set not null; alter table sites drop constraint si...
-- tkt-80ba201079.test -- -- db eval { -- CREATE TABLE t1(a); -- INSERT INTO t1 VALUES('A'); -- CREATE TABLE t2(b); -- INSERT INTO t2 VALUES('B'); -- CREATE TABLE t3(c); -- INSERT INTO t3 VALUES('C'); -- SELECT * FROM t1, t2 -- WHERE (a='A' AND b='X') -- OR (a='A' AND EXISTS (S...
CREATE SCHEMA ca_population; USE ca_population; CREATE TABLE pop_proj( county_code VARCHAR(45) NOT NULL, county_name VARCHAR(45) NOT NULL, date_year INT NOT NULL, race_code INT NOT NULL, race TEXT NOT NULL, gender VARCHAR(6) NOT NULL, age INT NOT NULL, population INT NOT NULL ); /* Load ...
<filename>Agile_usage.sql -- CREATE TABLE `Agile_usage` ( `period_from` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `period_to` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `power_usage` double DEFAULT NULL ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Indexes for table `Agile_us...
{% test accepted_values_or_null(model, column_name, values) %} with validation as ( select {{ column_name }} as check_field from {{ model }} ), validation_errors as ( select check_field from validation where check_field is not null and check_field not in {{values}} ) select ...
-- Name: FilesVisibilityByPatientSeries -- Schema: posda_files -- Columns: ['file_id', 'visibility'] -- Args: ['patient_id', 'series_instance_uid'] -- Tags: ['duplicates', 'dup_sops', 'hide_dup_sops', 'sops_different_series'] -- Description: Return a count of duplicate SOP Instance UIDs -- select distinct file_id, v...
INSERT INTO frauds (id, name) VALUES (1, 'josh'); INSERT INTO frauds (id, name) VALUES (2, 'marcin');
<reponame>jiandiao/flowable-engine<filename>distro/sql/upgrade/content/flowable.oracle.upgradestep.6.2.1.to.6.3.0.content.sql UPDATE ACT_CO_DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = '192.168.1.5 (192.168.1.5)', LOCKGRANTED = to_timestamp('2019-03-14 18:06:54.623', 'YYYY-MM-DD HH24:MI:SS.FF') WHERE ID = 1 AND L...
--[er]create list partition table with int data type having 1024 partitions and add another 1025th partition create table list_test(id int not null , test_int int, test_char char(50), test_varchar varchar(2000), test_datetime timestamp,primary key(id,test_int)) PARTITION BY LIST (test_int) ( PARTITION P...
<gh_stars>1-10 /* GROUP_CONCAT string aggregate for SQL Server - https://groupconcat.codeplex.com Copyright (C) 2011 <NAME> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the L...
<filename>third_party/chromite/cidb/migrations/00007_create_childconfigperbuild_table.sql CREATE TABLE childConfigPerBuildTable ( build_id INT NOT NULL, child_config VARCHAR(80) NOT NULL, PRIMARY KEY (build_id, child_config), FOREIGN KEY (build_id) REFERENCES buildTable(id), INDEX (build_id) ); INSERT IN...
<reponame>dotrietpho/CayGiaPha-Angular use CayGiaPhaAPI --Dong bo khoa ngoai Node_Id va IdNodeCha go create trigger trg_NodeParentId on Nodes after insert, update as begin declare @parentId int, @nodeId int, @temp1 int, @temp2 int select @temp1 = Node_Id from inserted select @temp2 = IdNodeCha from inserted if...
<reponame>ridhasardiyeni/invoice -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Waktu pembuatan: 09 Apr 2020 pada 09.45 -- Versi server: 10.1.38-MariaDB -- Versi PHP: 7.2.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "...
/* Navicat MySQL Data Transfer Source Server : nlp Source Server Version : 50173 Source Host : bdm256143399.my3w.com:3306 Source Database : bdm256143399_db Target Server Type : MYSQL Target Server Version : 50173 File Encoding : 65001 Date: 2018-06-04 16:52:41 */ SET FOREIGN_KEY_C...
-- -- PostgreSQL database dump -- -- Dumped from database version 10.9 -- Dumped by pg_dump version 11.5 -- Started on 2019-10-24 12:29:51 -03 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_ca...
<reponame>joudi12/try -- DROP TABLE IF EXISTS facts; -- CREATE TABLE facts( -- id SERIAL PRIMARY KEY, -- text VARCHAR(255), -- type VARCHAR(10000) -- ) DROP TABLE IF EXISTS details; CREATE TABLE details( id SERIAL PRIMARY KEY, title VARCHAR(255), authors VARCHAR(10000), description VARCHA...