sql
stringlengths
6
1.05M
<reponame>mi4-corporation/Enverus-Drillinginfo-Direct-Access Use DrillingInfo if not exists (select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = N'dbo' and TABLE_NAME = N'OrderLocations') begin create table OrderLocations(Mi4OrderLocationID int primary key identity, AppOrderLocationId int null...
<reponame>maiha/facebook.cr CREATE TABLE page_broadcast ( id String, scheduled_time Nullable(String), status Nullable(String) ) ENGINE = Log
<filename>src/test/resources/sql/grant/1abbf99c.sql -- file:privileges.sql ln:438 expect:true GRANT USAGE ON LANGUAGE sql TO regress_user1
<filename>schemas/payroll/mssql/up-99-job-2019-12-04-00-00-00-daily-time-entry-except-customer-service.sql use payroll execute p_add_time_entry @employee_id=28, @entry_date='2019-12-04 00:00:00', @hours_worked=6 execute p_add_time_entry @employee_id=47, @entry_date='2019-12-04 00:00:00', @hours_worked=6 execute p_add...
<gh_stars>1-10 CREATE TABLE "public"."comment" ( "id" int4 NOT NULL, "table" varchar(50) COLLATE "default", "item_id" int4, "user" int4, "datestamp" timestamp(0), "comment" text COLLATE "default", CONSTRAINT "comment_pkey" PRIMARY KEY ("id") ) WITH (OIDS=FALSE); CREATE TABLE "public"."continents" ( "id" int4...
DROP TABLE offer IF EXISTS; DROP TABLE currency IF EXISTS; CREATE TABLE currency ( currency_code CHAR(3) PRIMARY KEY ); CREATE TABLE offer ( offer_id VARCHAR(255) PRIMARY KEY, merchant_id VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, offering_id VARCHAR(...
FIND_PROJECT = SELECT * FROM PROJECT WHERE $if(clientId) {CLIENT_ID = :clientId} AND $if(projectName) {PROJECT_NAME LIKE :%projectName%}
CREATE TABLE company ( companyid character varying(255) NOT NULL, phonenumber character varying(255) NOT NULL, invoicingemailaddress character varying(255) NOT NULL, created timestamp without time zone NOT NULL, salesemailaddress character varying(255) NOT NULL, companyname character varying(255...
<gh_stars>1-10 create trigger [ServerTriggerWithUninitialisedVariable] on all server for LOGON as begin declare @a int -- @A is uninitialised. This should be flagged as a problem print isnull(@A, -1) end
-- 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...
<filename>mill-db-repo/src/test/resources/db_init.sql grant all privileges on mill.* to "user"@"localhost" identified by "pass"; flush privileges;
CREATE TABLE customer ( customer_id BIGINT IDENTITY NOT NULL PRIMARY KEY , first_name VARCHAR(45) NOT NULL , middle_name VARCHAR(45), last_name VARCHAR(45) NOT NULL, address1 VARCHAR(255) NOT NULL, address2 VARCHAR(255), city VARCHAR(50) NOT NULL, state VARCHAR(20) NOT NULL, postal_code CHAR(5) NOT N...
<filename>database/migration/src/main/resources/changesets/failure_metadata_scripts/causedBy_lists.sql UPDATE METADATA_ENTRY SET METADATA_KEY = REPLACE(METADATA_KEY, "causedBy:", "causedBy[0]:") WHERE METADATA_KEY LIKE "%failures%causedBy:%";
PQfname(res, 0) foo PQfname(res, 1) BAR PQfnumber(res, "FOO") 0 PQfnumber(res, "foo") 0 PQfnumber(res, "BAR") -1 PQfnumber(res, "\"BAR\"") 1
-- @testpoint:opengauss关键字template(非保留),作为视图名 --关键字explain作为视图名,不带引号,创建成功 CREATE or replace VIEW template AS SELECT * FROM pg_tablespace WHERE spcname = 'pg_default'; drop view template; --关键字explain作为视图名,加双引号,创建成功 CREATE or replace VIEW "template" AS SELECT * FROM pg_tablespace WHERE spcname = 'pg_default'; drop ...
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.1.16-MariaDB - mariadb.org binary distribution -- Server OS: Win32 -- HeidiSQL Version: 9.4.0.5125 -- ------------------------------------------------...
DROP TABLE IF EXISTS user; DROP TABLE IF EXISTS task; CREATE TABLE user ( id INTEGER PRIMARY KEY AUTOINCREMENT, email TEXT UNIQUE NOT NULL, password TEXT NOT NULL ); CREATE TABLE task ( id INTEGER PRIMARY KEY AUTOINCREMENT, author_id INTEGER NOT NULL, finish INTEGER NOT NULL, title TEXT NOT NULL, body T...
USE burgers_db; INSERT INTO burgers (burger_name) VALUES ("Cheeseburger"), ("Bacon burger"), ("Burger burger");
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 20, 2020 at 03:14 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...
<gh_stars>0 /* Post-Deployment Script Template -------------------------------------------------------------------------------------- This file contains SQL statements that will be appended to the build script. Use SQLCMD syntax to include a file in the post-deployment script. Example: :r .\myfile....
CREATE OR REPLACE FUNCTION mtp_upsert_cs8(i_json json) RETURNS json AS $BODY$ #init cols = [] vals = [] v_sql = "" result = null #input v_table = i_json.table # column name of primark key v_pkey = i_json.pkey #modified on 2014-05-10 20:50:19 #set default column name of primary key if not v_pkey v_pkey = "id"...
#niv_lib (NIVEAU) #Compter le nombre d'entrées pour chaque jour (ENTREE) #ENTREE, NIVEAU : niv_id #Resultat : total jour i >= total de chaque jour #Une requete contenenat une sous requete avec utilisation de l'opérateur ALL CREATE VIEW `E303` AS SELECT DATE_FORMAT( MAKEDATE( YEAR( NOW() ...
<reponame>krlosexe/urbahub -- phpMyAdmin SQL Dump -- version 4.5.0.2 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 09-05-2018 a las 17:21:24 -- Versión del servidor: 10.0.17-MariaDB -- Versión de PHP: 5.5.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 ...
use DB214DWESProyectoTema5; insert into T01_Usuario values ('admin', SHA2('adminpaso',256), 'Usuario administrador', null, 0, 'administrador', null), ('albertoF',SHA2('albertoFpaso',256),'AlbertoF', null, 0, 'usuario', null), ('outmane',SHA2('outmanepaso',256),'Outmane', null, 0, 'usuario', null), ('rodrigo',SHA2('rod...
<reponame>lgcarrier/AFW<filename>5.2.3/Database/Constraints/AFW_21_PLUGN_ITEM_MENU_CK1.sql<gh_stars>1-10 SET DEFINE OFF; ALTER TABLE AFW_21_PLUGN_ITEM_MENU ADD ( CONSTRAINT AFW_21_PLUGN_ITEM_MENU_CK1 CHECK ( ref_dv_contn_item_menu is not null and niv_item = 1 or ref_dv_contn_item_menu is null ) ENABLE VALID...
<reponame>dsalunga/mPortal SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WebUser]') AND type in (N'U')) BEGIN CREATE TABLE [dbo].[WebUser]( [UserId] [int] NOT NULL, [UserName] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,...
-- -------------------------------------------------------- -- Hôte : 127.0.0.1 -- Version du serveur: 5.7.19 - MySQL Community Server (GPL) -- SE du serveur: Win64 -- HeidiSQL Version: 9.4.0.5125 -- -------------------------------------------------------- /*...
CREATE TABLE IF NOT EXISTS reddit_comments( sub text NOT NULL, currency text NOT NULL, post_id text NOT NULL, contents text NOT NULL, sentiment decimal, subjectivity decimal );
-- file:numeric_big.sql ln:270 expect:true INSERT INTO num_exp_mul VALUES (5,8,'-5546455599206321494.067658342111990430030710529637772381647219200786614776476150186587523282481413578369797618349310688543687608131521783462172090647807479859611664564025146084235055380625622396302343063106602438936451568876519437316138557...
-- file:rowsecurity.sql ln:260 expect:true COPY t3(a,b,c) FROM stdin WITH (oids)
<filename>src/db/sqlite/sql/authentication-success.sql -- UPDATE authentication SET last_authentication = strftime('%s', 'now') WHERE identifier = :identifier
<filename>server/migrations/committed/000020.sql --! Previous: sha1:e708c9b98c37a8baa88bcd09f664cd3f8e665ead --! Hash: sha1:ac9abc3c21e539fb3d48791be313bfb5ac49b0f6 -- Enter migration here CREATE TABLE IF NOT EXISTS questionnaire_response(id uuid DEFAULT uuid_generate_v4() NOT NULL, ...
INSERT INTO crp.sample(crp,cep) VALUES ('AC00-000','69900-000'), ('AC49-708','69949-708'), ('AC99-999','69999-999'); INSERT INTO crp.sample(crp,cep) VALUES ('RR00-000','69300-000'), ('RR49-850','69349-850'), ('RR99-999','69399-999'); INSERT INTO crp.sample(crp,cep) VALUES ('AP00-000','68900-000'), ('AP49-602','6894...
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,RULE_ID,UPDATE_TIMESTAMP,UPDATE_USER,QUESTION_SEQ_NUMBER,VER_NBR,OBJ_ID) select SEQ_QUESTIONNAIRE_REF_ID.NEXTVAL QUESTIONNAIRE...
DELIMITER / INSERT INTO IACUC_EXCEPTION_CATEGORY ( EXCEPTION_CATEGORY_CODE, EXCEPTION_CATEGORY_DESC, ACTIVE_FLAG, UPDATE_TIMESTAMP, UPDATE_USER, OBJ_ID, VER_NBR ) VALUES ( 101, 'Food/Water restriction', 'Y', NOW(), 'admin', UUID(), 1 ) / INSERT INTO IACUC_EXCEPTION_CATEGORY ( EXCEPTION_CATEGORY_CODE, EXCEPTION_CATEG...
select o_orderpriority, count(*) as order_count from orders where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate < l_receiptdate ) group by o_orderpriority order by o_orderpriority; SELECT last_statement_duration_us / 100000...
insert into config (app_id, config_id, config_data) values ('data-sharing-manager','application', '{ "appUrl" : "http://localhost:8080" }' ); insert into config (app_id, config_id, config_data) values ('data-sharing-manager','database', '{ "url" : "jdbc:mysql://localhost:3306/data_sharing_manager...
<filename>sql/tables/Envelope.sql create table Envelope ( Id int primary key identity(1,1), BudgetId int not null foreign key references Budget(Id) on delete cascade, Name varchar(256) not null, Capacity float not null, Balance float not null default(0.0), [Guid] uniqueidentifier not null default(newid()) ) crea...
-- Update the REG_PATH_ID column mapped with the REG_RESOURCE table -- UPDATE REG_RESOURCE_TAG SET REG_PATH_ID=(SELECT REG_PATH_ID FROM REG_RESOURCE WHERE REG_RESOURCE.REG_VERSION=REG_RESOURCE_TAG.REG_VERSION); UPDATE REG_RESOURCE_COMMENT SET REG_PATH_ID=(SELECT REG_PATH_ID FROM REG_RESOURCE WHERE REG_RESOURCE.REG_VE...
ALTER TABLE AUTH_USER_STATUS CHANGE reference ref VARCHAR(200);
-- phpMyAdmin SQL Dump -- version 4.4.15.10 -- https://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 2020-01-21 17:32:16 -- 服务器版本: 5.5.57-log -- PHP Version: 5.4.45 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40...
---------------------------- -- Copyright (C) 2022 CARTO ---------------------------- CREATE OR REPLACE FUNCTION QUADBIN_POLYFILL( geom GEOMETRY, resolution INT ) RETURNS BIGINT[] AS $BODY$ SELECT CASE WHEN resolution < 0 OR resolution > 26 THEN @@PG_PREFIX@@carto.__CARTO_ERROR(FORMAT('Invalid resolution "%...
<filename>hasura/migrations/1627733817299_insert_into_conference_ConfigurationKey/up.sql INSERT INTO "conference"."ConfigurationKey"("name", "description") VALUES (E'FILLER_VIDEOS', E'List of S3 URLs.');
-- phpMyAdmin SQL Dump -- version 4.5.4.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Mar 26, 2018 at 05:31 PM -- Server version: 5.7.20 -- PHP Version: 5.6.30-11+deb.sury.org~trusty+3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=...
<reponame>BayrexR/BBB-Samples drop database if exists bbb_db; create database bbb_db; use bbb_db; CREATE TABLE samples ( otu_id INT NOT NULL, otu_label VARCHAR(1000), BB_940 INT, BB_941 INT, BB_943 INT, BB_944 INT, BB_945 INT, BB_946 INT, BB_947 INT, BB_948 INT, BB_949 INT, ...
<filename>MAINTENANCE/SQL Server/sensitivity/sensitivity.sql SELECT o.name AS [Table Name] ,ac.name AS [Column Name] ,sc.label ,sc.information_type FROM sys.sensitivity_classifications sc INNER JOIN sys.objects o ON o.object_id = sc.major_id INNER JOIN sys.all_columns ac ON ac.column_id = sc.minor_id WHERE ac.object_id...
--Generated Upgrade For Version 0.0.0.0.0 --Generated on 2012-02-24 10:30:40
<filename>sigwakaf.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 23 Feb 2021 pada 16.01 -- Versi server: 10.1.30-MariaDB -- Versi PHP: 7.1.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = ...
DROP TABLE IF EXISTS co_data_nodes; DROP SEQUENCE IF EXISTS element_id_seq; CREATE SEQUENCE element_id_seq; CREATE TABLE co_data_nodes ( id BIGINT NOT NULL DEFAULT nextval('element_id_seq'), access_class VARCHAR(255) NOT NULL, last_access TIMESTAMP NOT NULL, read_security_id BIGINT DEFAULT NULL, write_securit...
SELECT COUNT(requests.RequestGuid) FROM v_userapprequests AS requests LEFT JOIN ( SELECT [apps].[ModelID] AS app_modelid, [localizedproperties].[Publisher] AS app_manufacturer, [localizedproperties].[Title] ...
<gh_stars>1-10 use employees; #Functions Intro SELECT COUNT(*) FROM employees; #Concat a list of strings (combines strings) SELECT concat("Hi", "Hi", "Hi"); #Concat adds strings together SELECT concat(first_name," ", last_name) AS full_name FROM employees LIMIT 10; #using SUBSTR SELECT SUBSTR('abcdef', 2, 4); SELE...
<filename>ansible/roles/provision-geo-location-db/templates/psql_schema.sql<gh_stars>10-100 CREATE TABLE IF NOT EXISTS {{ env }}_geo_location_city_temp(geoname_id INTEGER UNIQUE, locale_code VARCHAR(3), continent_code VARCHAR(3), continent_name VARCHAR(100), country_iso_code VARCHAR(5), country_name VARCHAR(100), subdi...
CREATE TABLE "public"."user"("id" serial NOT NULL, "role" varchar NOT NULL, "username" varchar NOT NULL, "account" varchar NOT NULL, "secret" varchar NOT NULL, "email" varchar NOT NULL, "email_verified" bool NOT NULL DEFAULT false, "verification_code" varchar NOT NULL, "created_at" timestamp without time zone NOT NULL ...
begin transaction; /* Create a staging table to hold the input data. Staging table is created with BACKUP NO option for faster inserts and also data temporary */ drop table if exists public.stg_customer_address; create table if not exists public.stg_customer_address (ca_address_id varchar(16) encode zstd ,ca_s...
INSERT INTO ligne (id,prix,temps,arrets) VALUES (1,10,180,"Lille > Paris"); INSERT INTO ligne (id,prix,temps,arrets) VALUES (2,8,210,"Lille > Arras > Paris"); INSERT INTO ligne (id,prix,temps,arrets) VALUES (3,8,210,"Lille > Compiègne > Paris"); INSERT INTO ligne (id,prix,temps,arrets) VALUES (4,6,240,"Lille > Arras > ...
<reponame>IUIDSL/kgap_lincs-idg<filename>cql/tdark_1.cql<gh_stars>1-10 //TDARK- //Tdark gene with lowest number of signatures filtered at +-8 zscore //signature-gray match (g:Gene {id:'94239'}) where g.tdl ="Tdark" with g match p=(g)-[r:SIGNATURE_GENE]-(s)-[:DRUG_SIGNATURE]-(),p2=(s)-[:CELL_SIGNATURE]-() where r.zsco...
<reponame>tutnatha/koperasi-server-fineract -- -- 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 Lic...
<reponame>DEFRA/prsd-iws<filename>src/EA.Iws.Database/scripts/Update/0001-Release1/Sprint06/20150429-150715-EA.Iws.sql GO PRINT N'Altering [Identity].[AspNetUsers]...'; GO ALTER TABLE [Identity].[AspNetUsers] ADD [FirstName] NVARCHAR (256) NULL, [Surname] NVARCHAR (256) NULL; GO PRINT N'Update compl...
delete from item; delete from user;
SELECT 'Upgrading MetaStore schema from 1.1.0 to 2.1.1' AS Status from dual; -- Upgrading schema from 1.1.0 to 2.0.0 excluding patches included in CDH-5.12.0. There are no patches from 1.1.0 to 1.2.0 @upgrade-1.1.0-to-1.2.0.oracle.sql; -- Upgrading schema from 2.0.0 to 2.1.1 excluding patches included in CDH-5.12.0. ...
<reponame>murrcha/kkaysheva<filename>chapter_006/src/main/resources/create.sql create database items_store; create table roles ( id serial primary key, role_name character varying (30) ); create table rules ( id serial primary key, rule_name character varying (30) ); create table role_rule ( id s...
<reponame>MesAdima/southern_cross CREATE TABLE `applicant_additional_info` ( `entry_id` int(11) NOT NULL AUTO_INCREMENT, `applicant_id` int(11) NOT NULL, `source_of_discovery` varchar(250) NOT NULL, `reason_for_study` varchar(250) NOT NULL, `student_declaration` varchar(250) NOT NULL, `parent_declaration` v...
<reponame>jmgonzmart/ensembl-analysis delete repeat_feature from attrib_type, seq_region_attrib, repeat_feature where attrib_type.code in ('patch_novel','patch_fix') and attrib_type.attrib_type_id = seq_region_attrib.attrib_type_id and seq_region_attrib.seq_region_id = repeat_feature.seq_region_id; delete prediction_e...
<gh_stars>0 ALTER TABLE `dc_equipment` ADD COLUMN `unit_voltage` varchar(10) NULL DEFAULT NULL AFTER `name`, ADD COLUMN `unit_amperage` varchar(10) NULL DEFAULT NULL AFTER `unit_voltage`, ADD COLUMN `active` int(3) NULL DEFAULT 1 COMMENT '0: inactive | 1:active' AFTER `unit_amperage`;
\c pg_db; SET search_path TO base_0_0_1, public; /* __ __ _ _ _ _ _____ _ _ _ _ \ \ / / | (_) | | | | / ____| | | | | (_) | | \ \ / /_ _| |_ __| | __ _| |_ ___ | | _ __ ___ __| | ___ _ __ | |_ _ __ _| |___...
<reponame>jovanpop-msft/srb SET QUOTED_IDENTIFIER OFF; -- Because I use "" as a string literal GO CREATE SCHEMA srb; GO CREATE TYPE srb.Strings AS TABLE( text NVARCHAR(MAX) ); GO CREATE TYPE srb.Integers AS TABLE( val INT ); GO CREATE TYPE srb.Messages AS TABLE( sequence_number BIGINT, data VARBINARY(MAX),...
<reponame>mollfpr/Connectivly_Laravel # ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.5.5-10.2.14-MariaDB) # Database: connectivly # Generation Time: 2018-09-23 17:37:5...
<gh_stars>0 -- -- Table structure for table `publicado` -- DROP TABLE IF EXISTS `publicado`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `publicado` ( `idpublicado` int(11) NOT NULL, `idrede` int(11) NOT NULL, `cpf` varchar(11...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 29 Jan 2019 pada 12.42 -- Versi Server: 10.1.29-MariaDB -- PHP Version: 7.2.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
USE tool; IF OBJECT_ID('StandardizeDate','FN') IS NOT NULL DROP FUNCTION StandardizeDate; CREATE FUNCTION dbo.StandardizeDate(@Date VARCHAR(255)) RETURNS DATE AS BEGIN IF @Date = '' SET @Date = NULL IF tool.dbo.RegexRemove(@Date,'[^0-9]') = '00000000' SET @Date = NULL ELSE SET @Date = CONVERT(DATE,@Da...
<filename>znodb/Scripts/import/import.2019.sql :setvar ZnoYear 2019 :setvar CSV_CODEPAGE 1251 :r .\import_csv.sql GO :r .\fill_Data_Parsed.2019.sql GO :r .\resolve_duplicated_schools.sql GO
<gh_stars>1-10 CREATE DATABASE CarRental USE CarRental CREATE TABLE Categories( Id BIGINT PRIMARY KEY IDENTITY NOT NULL, CategoryName NVARCHAR(20) NOT NULL, DailyRate INT, WeeklyRate INT, MonthlyRate INT, WeekendRate INT ) CREATE TABLE Cars( Id BIGINT PRIMARY KEY IDENTITY NOT NULL, PlateNumber INT NOT NULL, ...
<filename>services/drone_racing/backend/resources/database/migrations/V01__create_users.sql create table users ( id serial primary key, login varchar(100) unique, password_hash varchar(60), name varchar(100) )
<gh_stars>1-10 CREATE TABLE targetgroup ( id INT4 NOT NULL PRIMARY KEY, type VARCHAR(60) NOT NULL, validfrom TIMESTAMP WITH TIME ZONE, validto TIMESTAMP WITH TIME ZONE ); -- Table comment COMMENT ON TABLE targetgroup IS '{"description": "Target groups", "schemalastupdated": "06/03/2019", "dataversion": 1}'; --...
ALTER TABLE inventory ADD CONSTRAINT non_negative_stock CHECK (stock >= 0);
GO USE [SoftUni] GO SELECT * FROM [Employees] WHERE [JobTitle] = 'Sales Representative'
<filename>src/test/resources/sql/insert/d5f2e550.sql -- file:insert_conflict.sql ln:205 expect:true insert into insertconflicttest values (25, 'Fig') on conflict (fruit) do update set fruit = excluded.fruit
<gh_stars>1000+ -- Script: Get-TriggerDDL.sql -- Description: Return list of DDL triggers at the server level. -- This must be run with the master database select to get the trigger definition. SELECT name, OBJECT_DEFINITION(OBJECT_ID) as trigger_definition, parent_class_desc, create_date, modify_date, is_ms_s...
metadata :name => "systemtype", :description => "Checks system type out of file", :author => "Mirantis Inc", :license => "Apache License 2.0", :version => "6.0.0", :url => 'http://www.mirantis.com/', :timeout => 6...
SELECT COUNT(1) FROM requerimiento WHERE id = :id
CREATE TABLE `lh_group_work` ( `id` int(11) NOT NULL AUTO_INCREMENT, `group_id` int(11) NOT NULL, `group_work_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `group_id` (`group_id`)) DEFAULT CHARSET=utf8;
-- create helper function to get datatype name given oid CREATE FUNCTION OidToDataType(@Oid integer) RETURNS VARCHAR(50) AS BEGIN DECLARE @datatype VARCHAR(50); SET @datatype = (SELECT typname from pg_type where oid = @Oid); RETURN @datatype; END; GO -- create helper function to get procedure/t...
<filename>SQL/SQL_exercise_10/10_questions_and_solutions.sql -- Used SQLite3 for this example -- 10.1 Join table PEOPLE and ADDRESS, but keep only one address information for each person (we don't mind which record we take for each person). -- i.e., the joined table should have the same number of rows as table PEOPLE...
<reponame>sjasthi/tandana -- MySQL dump 10.13 Distrib 5.5.54, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: ics325sp1713 -- ------------------------------------------------------ -- Server version 5.5.54-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET...
<reponame>ivconsult/eNeg-OfferApp<filename>citPOINT.OfferApp.DataBase/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/uspConversationOfferSettingSelect.proc.sql CREATE PROC [dbo].[uspConversationOfferSettingSelect] @ConversationOfferSettingID UNIQUEIDENTIFIER AS SET NOCOUNT ON SET XACT_ABORT ON ...
<filename>cv.sql -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 23, 2019 at 05:49 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
<gh_stars>0 /* count total submissions of challenges of each user */ WITH data AS ( SELECT c.hacker_id as id, h.name as name, count(c.hacker_id) as counter FROM Hackers h JOIN Challenges c on c.hacker_id = h.hacker_id GROUP BY c.hacker_id, h.name ) /* select records from above */ SELECT id,name,counter FROM data WHERE ...
CREATE DATABASE IF NOT EXISTS iexpresso_test; CREATE DATABASE IF NOT EXISTS iexpresso_production; CREATE DATABASE IF NOT EXISTS iexpresso_development; USE iexpresso_development; DROP TABLE IF EXISTS `Students`; DROP TABLE IF EXISTS `Users`; DROP TABLE IF EXISTS `RouteStop`; DROP TABLE IF EXISTS `Routes`; DROP TABLE I...
<filename>server/mysql/sharedhere.sql<gh_stars>0 CREATE DATABASE IF NOT EXISTS `sharedhere` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `sharedhere`; -- MySQL dump 10.13 Distrib 5.5.16, for Win32 (x86) -- -- Host: localhost Database: sharedhere -- ------------------------------------------------------ -- S...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Czas generowania: 08 Kwi 2019, 18:36 -- Wersja serwera: 10.1.32-MariaDB -- Wersja PHP: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
-- -- iPeer Database -- SET foreign_key_checks = 0; -- -------------------------------------------------------- -- -- Table structure for table `acos` -- DROP TABLE IF EXISTS `acos`; CREATE TABLE IF NOT EXISTS `acos` ( `id` int(10) NOT NULL AUTO_INCREMENT, `parent_id` int(10) DEFAULT NULL, `model` varchar(255...
<reponame>pazuzu-io/pazuzu-registry INSERT INTO FEATURE (NAME, DESCRIPTION, CREATED_AT, UPDATED_AT, STATUS, AUTHOR, SNIPPET, TEST_SNIPPET) VALUES ('node', 'dummy node feature', now(), now(), 'APPROVED', 'Pazuzu team', 'RUN set -ex \ && for key in \ 9554F04D7259F04124DE6B476D5A82AC7E37093B \ 94AE36675C464...
<filename>_test/MySQL/6.sql -- 测试CHAR 和 VARCHAR CREATE TABLE test_str( a CHAR(5), b VARCHAR(5) ); INSERT test_str (a,b) VALUES ('name', 'name2'); INSERT test_str (a,b) VALUES ('', ''); INSERT test_str (a,b) VALUES ('a', 'a'); INSERT test_str (a,b) VALUES ('ab', 'ab'); INSERT test_str (a,b) VALUES ('abc', 'abc'...
<gh_stars>1-10 create database dashboard collate utf8_unicode_ci; use dashboard; create table tb_vendas( id int not null primary key auto_increment, data_venda datetime default current_timestamp, total float(10,2) not null ); create table tb_clientes( id int not null primary key auto_increment, cliente_ativo bo...
select track.title, artist.name, genre.name from track join genre join album join artist on track.genre_id = genre.genre_id and track.album_id = album.album_id and album.artist_id = artist.artist_id order by album.name;
<filename>Database Scripts/Views/Answer_Standards_InScope.view.sql CREATE VIEW [dbo].[Answer_Standards_InScope] AS select distinct mode='Q', a.assessment_id, a.answer_id, is_requirement=0, a.question_or_requirement_id, a.mark_for_review, a.comment, a.alternate_justification, a.question_number, a.answer_text, ...
<filename>surveys/surveys.postgres.sql<gh_stars>10-100 CREATE TABLE users ( id SERIAL PRIMARY KEY, email TEXT NOT NULL, password_digest TEXT NOT NULL, created_at TIMESTAMP NOT NULL, updated_at TIMESTAMP NOT NULL ); ALTER TABLE users ADD UNIQUE (email); CREATE TABLE surveys ( id SERIAL PRIMARY KEY, autho...
<reponame>LOLICOL1/CodeRepos<filename>samples/security-oauth-sample/security-5x/security-authorization-server/src/main/resources/data-mysql.sql<gh_stars>1-10 INSERT INTO `oauth_client_details`(`client_id`, `resource_ids`, `client_secret`, `scope`, `authorized_grant_types`, `web_server...
<reponame>phong016688/TTCN_WEB<filename>ttcn/src/main/resources/dbschema/testdata/user_test.sql<gh_stars>0 INSERT INTO public.user (email, password, firstname, lastname) VALUES ('<EMAIL>','$2a$10$8Cof0cOQrqgVy.Pa/dDRW.8ZTm9kltOS4kodL0qW9TFewHwe/AUcW','Gin','Do'); INSERT INTO public.user (email, password, firstname, las...
<filename>Computer_science/E01_MySQL/S1_Basic/S1_04_Filters.sql /* Filters */ USE classicmodels; --T-- WHERE (field1 <> 'value1') OR (field2 > 30 AND field3 < 67) OR (field4 = "Keyword") SELECT lastName, firstName, jobTitle FROM employees WHERE jobTitle <> 'Sales Rep'; --T-- WHERE field1 = 'v...