sql
stringlengths
6
1.05M
<reponame>neumann-tokyo/sql-quiz create table books( id integer primary key ,title varchar(500) ,publication_date timestamp ,gape_count integer ,isbn_10 varchar(10) ,isbn_13 varchar(14) ,created_at timestamp default (datetime('now', 'localtime')) ,updated_at timestamp default (datetime('now', 'localtime...
INSERT INTO `medicaldb`.`person` (`person_id`, `name`, `password`, `tel`, `email`, `user_types`) VALUES ('1', '管理员', '1', '<PASSWORD>', '<EMAIL>', '0'); INSERT INTO `medicaldb`.`person` (`person_id`, `name`, `password`, `tel`, `email`, `user_types`) VALUES ('2', '院长', '2', '<PASSWORD>', '<EMAIL>', '1'); INSERT INTO `me...
ALTER TABLE teams DROP COLUMN leader, ADD COLUMN leaders jsonb NOT NULL DEFAULT '[]'::jsonb;
ALTER TABLE payment_request_to_interchange_control_numbers ADD CONSTRAINT interchange_control_number_payment_request_id_edi_type_uniq_key UNIQUE (interchange_control_number, payment_request_id, edi_type); ALTER TABLE payment_request_to_interchange_control_numbers DROP CONSTRAINT interchange_control_number_payment_reque...
<filename>software/cnip/databaseSetup.sql -- -- -- -- --DROP DATABASE IF EXISTS cnip; --CREATE DATABASE cnip; -- -- -- -- -- https://postgis.net/install/ -- Enable PostGIS (as of 3.0 contains just geometry/geography) CREATE EXTENSION postgis; -- Enable Topology CREATE EXTENSION postgis_topology; -- Enable Post...
CREATE DATABASE [domaindb]; GO CREATE TABLE [domaindb].[dbo].[domaindata] ( [Id] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY, [Name] NVARCHAR(MAX) NULL ); GO INSERT INTO [domaindb].[dbo].[domaindata] ([Id], [Name]) VALUES (N'31a35ebc-2de9-4cda-ac9e-7b06775f7527', N'Object 1') INSERT INTO [domaindb].[dbo].[domaindata...
CREATE TABLE [dbo].[ReportSettings] ( [Id] BIGINT IDENTITY (1, 1) NOT NULL, [EmailBody] NVARCHAR (4000) NULL, [EmailSubject] NVARCHAR (400) NULL, [PartitionId] BIGINT NOT NULL, [ReferenceKey] NVARCHAR (200) NOT NULL, [ReferenceType] INT NOT NUL...
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 02-Nov-2015 às 21:48 -- Versão do servidor: 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 */...
<gh_stars>1-10 select fn_db_add_column('business_entity_snapshot', 'started_at', 'timestamp with time zone DEFAULT CURRENT_TIMESTAMP'); select fn_db_add_column('async_tasks', 'started_at', 'timestamp with time zone DEFAULT NULL');
ALTER TABLE assembly MODIFY COLUMN taxon_id INT(10) unsigned DEFAULT NULL; ALTER TABLE file MODIFY COLUMN file_id INT(10) unsigned NOT NULL DEFAULT '0'; ALTER TABLE image MODIFY COLUMN mapstats_id INT(10) unsigned NOT NULL DEFAULT '0'; ALTER TABLE individual MODIFY COLUMN species_id INT(10) unsigned DEFAULT NULL; ALT...
CREATE TABLE public.{{ table }} ( {% for column in columns %} {{ column }}{% if not loop.last %},{% endif %} {% endfor %} );
SELECT art_txt AS typ, gem_bfs as bfs_nr, ST_Multi(geometrie) as geometrie FROM av_avdpool_ng.tseinteilung_toleranzstufe ;
41960 Bahawal Bassi 11618 Bhawal Bassi 41964 Bhagu 11612 Bhagu 41966 Bishan Pura 11645 Bishan Pura 41967 Burj Hanumangarh 11676 Burj Hanumangarh 41969 Ch Kala Tibba 11627 Chak Kala Tibba 41974 Dodewala 11611 Dodewala 11613 Himatpura 41979-> Himmat Pura SELECT v.survey_mapped,v.village_id FROM villages as v left...
ALTER SEQUENCE tags_id_seq RESTART WITH 1; INSERT INTO "tags" ("created_at","updated_at","deleted_at","name","description") VALUES ('2016-08-17T00:00:00+02:00','2016-08-17T00:00:00+02:00',NULL,'accompagnement','Il peut s''agir d''un accompagnement social ou personnalisé pour assister une personne dans la réalisation ...
<reponame>cboswel1/burger-logger INSERT INTO burgers (burger_name) VALUES ('Royale with Cheese', 0); INSERT INTO burgers (burger_name) VALUES ('Crabby Patty', 0); INSERT INTO burgers (burger_name) VALUES ('Big Kahuna Burger', 0); INSERT INTO burgers (burger_name) VALUES ('Le Big Mac', 0);
<filename>src/main/resources/data.sql INSERT INTO USER_ROLE VALUES(600, 'ADMIN'); INSERT INTO USER_ROLE VALUES(700, 'USER'); INSERT INTO USER_ADDITIONAL_DATA VALUES (1000,'1998-05-22','Rafał','MEN','Lublin', false,'Kacprzak','111000666', 'https://cdn1.iconfinder.com/data/icons/man-user-human-profile-avatar-business-pe...
<reponame>Wind010/Microservices /* 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. Exampl...
delete from role_permission; delete from user_role; delete from permissions; delete from roles; delete from users; delete from order_items; delete from orders; delete from payments; delete from customers; delete from addresses; delete from products; delete from categories; INSERT INTO permissions (id, nam...
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'; DROP SCHEMA IF EXISTS `forumdb`; CREATE SCHEMA IF NOT EXISTS `forumdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_gener...
/****** Object: User Defined Function dbo.KingdomCount Script Date: 5/1/2004 6:12:42 PM ******/ CREATE FUNCTION dbo.KingdomCount ( @SectorID int ) RETURNS int BEGIN RETURN(SELECT COUNT(kdID) FROM Kingdoms WHERE SectorID = @SectorID) END
<reponame>Jonathanshaulis/DBA-Toolbox -- SQL variable declare DECLARE @PreviousDate DATETIME DECLARE @Year VARCHAR(4) DECLARE @Month VARCHAR(2) DECLARE @MonthPre VARCHAR(2) DECLARE @Day VARCHAR(2) DECLARE @DayPre VARCHAR(2) DECLARE @FinalDate INT -- Table and email variable declare DECLARE @Body...
USE KisesaDSSClinicLinkSystem GO -- get directory of eligible files DECLARE @folder NVARCHAR(2048), @cmd VARCHAR(2048), @filename NVARCHAR(2048), @sql NVARCHAR(max), @MachineName varchar(255) = Host_Name(); SET @folder = N'C:\LinkSystemImport\'; SET @cmd = N'dir /b ' + @folder + '*.bak'; IF Object_I...
<reponame>yusufshakeel/SQL-Project --Create a view with custno, fname, lname of cust table. create view v1 as select cust_id,fname,lname from cust; --Retrieve all customers name from cust table select fname,lname from v1; --Create another view for those customers who have been issued movies. create view v2 as selec...
<filename>test/fixtures/db_definitions/oracle_odbc2.sql create table courses ( id number(10) not null primary key, name varchar(255) not null ); create sequence courses_seq minvalue 10000;
<filename>general_evaluation/sql/503.sql CREATE TABLE t0(c DEFAULT '000'); PRAGMA table_info(t0); PRAGMA table_info(t0);
-- Copyright (c) 2017-2021, Mudit<NAME>.o.o. All rights reserved. -- For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md BEGIN TRANSACTION; INSERT OR REPLACE INTO "templates" ("_id","text","lastUsageTimestamp") VALUES (1,'Thanks for reaching out. I can''t talk right now, I''ll call you later',4); INSERT OR...
<gh_stars>1-10 /* Copyright (C) 2015 IASA - Institute of Accelerating Systems and Applications (http://www.iasa.gr) 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/licen...
<gh_stars>0 DROP TABLE IF EXISTS Student CASCADE; CREATE TABLE Student (ID INTEGER,Name VARCHAR(15)); INSERT INTO Student (ID, Name) VALUES(10,'Venus');
ALTER TABLE persons ADD last_login_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
UPDATE exp.PropertyValidator SET TypeURI = 'urn:lsid:labkey.com:PropertyValidator:textlength' WHERE TypeURI = 'urn:lsid:labkey.com:PropertyValidator:length' AND PropertyId IN ( SELECT PropertyId FROM exp.PropertyDescriptor WHERE PropertyURI LIKE '%:package-snd%Package%' )
CREATE TABLE IF NOT EXISTS `sys_admin` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', `login_mode` INT UNSIGNED NOT NULL COMMENT '登录类型(1:database, 2:ldap)', `sys_role_id` BIGINT UNSIGNED NOT ...
select * from Table(KOCEL.Describe('Kocel.SHEETS')) select * from Table(KOCEL.Describe('Kocel.V_SHEETS')) select * from Table(KOCEL.Describe('Kocel.V_BOOK_CELLS')) select * from Table(KOCEL.Describe('Kocel.SHEETS')) select * from Table(KOCEL.Describe('Kocel.SHEETS')) select * from Table(KOCEL.Describe('Kocel.SHEETS')) ...
<filename>Tellma.Database.Application/dbo/Functions/dbo.fn_Ethiopian_DatePart.sql CREATE FUNCTION [dbo].[fn_Ethiopian_DatePart] ( @DatePart CHAR (1), -- 'y', 'q', 'm' or 'd' @Date DATETIME ) RETURNS INT AS BEGIN -- Get the Julian Date Number and use it to calculate the various Ethiopian date parts -- http://www.ge...
INSERT INTO abkuerzungen (abkuerzung) VALUES ('ARM'); -- Mit dem folgenden Insert-Statement kann die erste oder eine weitere Bedeutung -- für eine Abkürzung hinzugefügt werden INSERT INTO bedeutungen (abkuerzung, bedeutung) SELECT abk_id, 'Advanced RISC Machines' FROM abkuerzungen ...
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600897',@CutoffDate = N'2017-09-30',@EPS = N'1.1022',@EPSDeduct = N'0',@Revenue = N'12.22亿',@RevenueYoy = N'8.24',@RevenueQoq = N'-2.41',@Profit = N'3.28亿',@ProfitYoy = N'1.23',@ProfiltQoq = N'-10.34',@NAVPerUnit = N'11.1700',@ROE = N'9.86',@CashPerUnit = N'0.9771',@GrossProfitRate ...
--dml okidaci --after tip okidaca nakon update komande USE TestDB GO CREATE TRIGGER TR_ProductReview_Update ON Production.ProductReview AFTER UPDATE AS BEGIN SET NOCOUNT ON; UPDATE PR SET PR.ModifiedDate = SYSDATETIME() FROM Production.ProductReview AS PR INNER JOIN inserted AS I ON I.ProductReviewID = PR.Produ...
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 2017-01-12 02:39:13 -- 服务器版本: 10.1.10-MariaDB -- PHP Version: 7.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!401...
<reponame>pablokawan/ABx<filename>sql/schema.014.sql ALTER TABLE public.game_items ADD COLUMN trade_able integer NOT NULL DEFAULT 0; UPDATE public.game_items SET trade_able = 1 WHERE idx IN( 500, 501, 502, 503, 504, 505, 506, 507, 508, 100000, 100001, 100002 ); UPDATE public.versions SET value = value + 1 WHERE na...
<filename>db/sqlite/sql/DataModels/CREATE/TABLE/ReimbursableAgreements.sql CREATE TABLE ReimbursableFunds ( ReimbursableFundId INTEGER, RPIO INTEGER, BFY INTEGER, FundCode TEXT(255), AccountCode TEXT(255), RcCode TEXT(255), DivisionName TEXT(255), BocCode INTEGER, DocumentControlNumber TEXT(255), Agreeem...
/* Tablica ispit je imala NEKE dvostruke zapise redova Da bi smo to rješili napravli smo novu tablicu ispit2 ispit2 sada ima podatke ali je izgubio kljuceve referencijalnog integriteta sada brišemo podatke iz tablice ispit (prethidno backup!) Nakon toga pretočimo podatke iz ispit2 u ispit Nakon toga obrisemo tablicu is...
-- Procedure GalleryCategory_GetDuplicate SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [GalleryCategory_GetDuplicate] ( @CategoryID int, @Title nvarchar(256) ) AS SET NOCOUNT ON SELECT CategoryID FROM GalleryCategory WHERE (Title = @Title) AND (CategoryID <> @CategoryID...
<filename>data/open-source/extracted_sql/Crate_crate_ruby.sql<gh_stars>1-10 select * from #{table_name} Select * from posts Select * from posts where id = '#{id}' CREATE TABLE "#{table_name}" (#{cols}) select count(*) from #{table_name} select table_name from information_schema.tables where schema_name = 'doc' create t...
<filename>www/html/bitrix/modules/socialnetwork/install/db/mysql/install_ft.sql CREATE fulltext index IXF_SONET_LOG_INDEX on b_sonet_log_index (CONTENT); CREATE fulltext index IXF_SONET_GROUP on b_sonet_group (SEARCH_INDEX);
CREATE DATABASE IF NOT EXISTS `persistr` /*!40100 DEFAULT CHARACTER SET utf8mb4 */; USE `persistr`; -- MySQL Server version 5.7.12 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CO...
-- file:triggers.sql ln:307 expect:true SELECT pg_get_triggerdef(oid, false) FROM pg_trigger WHERE tgrelid = 'main_table'::regclass AND tgname = 'modified_a'
<reponame>flexsocialbox/una<gh_stars>100-1000 SET @sName = 'bx_protean';
-- ========================================== -- Alter Partition Function Split template -- ========================================== USE <database_name, sysname, AdventureWorks> GO -- Create the partition function with an original defined range CREATE PARTITION FUNCTION <partition_function_name, sysname, myRangePF> ...
<filename>Sources/PT.PM.SqlParseTreeUst.Tests/Data/plsql_patterns.sql ----------------------------------------------------------------------- -- Dangerous Function CREATE PROCEDURE dangerous_function IS BEGIN DBMS_UTILITY.EXEC_DDL_STATEMENT@remote_db('create table t1 (id number)'); END; --------------------------...
<filename>respaldo/basecelulares.sql -- phpMyAdmin SQL Dump -- version 4.4.15.10 -- https://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 14-09-2018 a las 18:24:24 -- Versión del servidor: 10.1.36-MariaDB -- Versión de PHP: 5.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"...
----------- -- Add new columns ----------- ALTER TABLE [Notification].[Notification] ADD [HasSpecialHandlingRequirements] BIT NULL ALTER TABLE [Notification].[Notification] ADD [SpecialHandlingDetails] NVARCHAR(2048) NULL GO ----------- -- Migrate data ----------- DECLARE @notificationId uniqueidentifier DECLARE @ha...
<filename>integration_tests/models/sql/test_get_relations_by_pattern.sql {{ config(materialized = 'table') }} {% set relations = dbt_utils_justos.get_relations_by_pattern(target.schema ~ '%', 'data_events_%') %} with unioned as ( {{ dbt_utils_justos.union_relations(relations) }} ) select user_id, ...
-- -- Copyright 2016 Liaison Technologies, Inc. -- This software is the confidential and proprietary information of -- Liaison Technologies, Inc. ("Confidential Information"). You shall -- not disclose such Confidential Information and shall use it only in -- accordance with the terms of the license agreement you...
<filename>myadmin.sql<gh_stars>0 /* Navicat Premium Data Transfer Source Server : localhost_3306 Source Server Type : MySQL Source Server Version : 50721 Source Host : localhost:3306 Source Schema : myadmin Target Server Type : MySQL Target Server Version : 50721 File Encoding...
/* Tau T2D General-purpose */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/general-purpose-machines#t2d_machines */ UPDATE instances SET series = 't2d', family = 'Scale-out optimized', cpuPlatform = 'Milan', spot = '1' WHERE ...
<reponame>shellposhy/pandora /*==============================================================*/ /* Table: TEST_USER */ /*==============================================================*/ create table TEST_USER ( ID NUMBER not null, USER_N...
CREATE TABLE os.ao_queue ( queue_id serial NOT NULL, status text NOT NULL check(status in ('queued', 'success', 'failed', 'processing')), queue_date timestamp without time zone NOT NULL, start_date timestamp without time zone, end_date timestamp, error_message text, num_rows int not null default 0, --from...
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 25, 2017 at 12:18 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
<reponame>abanoubamin/Hotel-Reservations-System insert into Customer values(1,'Ahmed','Ahmed.Mohamed',123456) insert into Customer values(2,'Mohamed','Mohamed_Ali',149657) insert into Customer values(3,'Alaa','Alaa_Ezzat',457813) insert into Customer values(4,'Amr','Amr_Mohamed',667012) insert into Customer values(...
<filename>egov/egov-bpa/src/main/resources/db/migration/main/V20190215103525__bpa_roleaction_mapping_for_suboccupancies.sql<gh_stars>1-10 INSERT INTO egbpa_occupancy(id, code, name, isactive, version, createdby, createddate, lastmodifiedby,lastmodifieddate, maxcoverage, minfar, maxfar, ordernumber, description) VALUES ...
DROP TABLE IF EXISTS groups CASCADE; CREATE TABLE groups ( id SERIAL PRIMARY KEY NOT NULL, name VARCHAR(255) NOT NULL, UNIQUE(name) );
select --schema_name(tab.schema_id) as schema_name, tab.name as table_name, --tab.create_date as created, --tab.modify_date as last_modified, p.rows as num_rows, ep.value as comments from sys.tables tab inner join (select distinct p.object_id...
SELECT row_number, obligations_delivered_orde_cpe, ussgl490100_delivered_orde_cpe, ussgl498100_upward_adjustm_cpe FROM award_financial WHERE submission_id = {} AND COALESCE(obligations_delivered_orde_cpe,0) <> COALESCE(ussgl490100_delivered_orde_cpe,0) + COALESCE(ussgl498100_upward_adjustm_cpe,0);
create or alter procedure dbo.GetExportBatch @ProcessCode varchar(50), @BatchId int = null as declare @Today date = getdate(); select 1 as Id, dateadd(day, -1, @Today) as FromDate, @Today as ToDate; go
<filename>src/migrations/20170327221549_create_bid_table.sql -- bid create table bid ( id int not null auto_increment primary key, asin varchar(10) unique, sales_price int, shipping_costs int, memo varchar(2048), created datetime, updated datetime );
 Create PROC [dbo].[RPT_BinCardNonFood] ( @warehouse int, @store int, @commodity int, @project nvarchar(50) ) as BEGIN select * from ( select [Ordering] = 1,tr.Name Transporter, tr.NameAM TransporterAM, r.DriverName,r.PlateNo_Prime, r.ReceiptDate [Date],r.GRN as Identification, d.Name as ToFro...
-- start_ignore SET gp_create_table_random_default_distribution=off; -- end_ignore reindex database gptest; vacuum full; create table sync2_reindex_vacuum_full_test1 (i int) partition by range(i) (start(1) end(1000) every(1)); create table sync2_reindex_vacuum_full_test2 (i int) partition by range(i) (start(1) end(100...
<reponame>knocknote/sqlboiler SELECT "c".* FROM cats as c FULL JOIN dogs d on d.cat_id = cats.id;
<filename>openGaussBase/testcase/PROCEDURE/PROC_EXPR_PARAM/Opengauss_Function_Procedure_Expression_Case0020.sql -- @testpoint: 表达式做为参数的存储过程测试——类型转换-CHR(),CHAR() --创建存储过程 CREATE OR REPLACE PROCEDURE PROC_EXPR_PARAM_020(P1 CHAR) AS BEGIN raise info 'P1=:%',P1; EXCEPTION WHEN NO_DATA_FOUND THEN raise info 'NO_DATA_FOUND...
<reponame>charlesroper/Recorder-6-SQL USE NBNReporting; declare @first_date as smalldatetime; declare @last_date as smalldatetime; -- Note about dates: http://stackoverflow.com/a/22081848/1944 --------------------------------------------------------------- -- INITIAL EXPORT -- All records on or before ...
SELECT * FROM some_table
<gh_stars>0 ROLLBACK; BEGIN; CREATE TABLE ip_main ( ip_addr INET ); CREATE TABLE ip_banned ( ip_addr INET ); CREATE MATERIALIZED VIEW public.mv_ip_addr AS SELECT DISTINCT ON (m.ip_addr) m.ip_addr AS "ip_addr", b.ip_addr AS "banned_ip", COALESCE(m.ip_addr = b.ip_addr, FALSE) AS "banned" FROM ip_main m LEFT JOIN ip_b...
<reponame>giggals/Software-University<gh_stars>0 CREATE PROCEDURE usp_GetTownsStartingWith(@letter VARCHAR(50)) AS SELECT [Name] AS Town FROM Towns WHERE SUBSTRING([Name],1,LEN(@letter)) = @letter EXEC dbo.usp_GetTownsStartingWith 'Be'
<filename>database/db_rweb20.sql -- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 24, 2020 at 04:04 PM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_z...
-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Client : mysql:3306 -- Généré le : Dim 09 Avril 2017 à 21:37 -- Version du serveur : 5.7.17 -- Version de PHP : 7.0.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_...
<reponame>JelF/rest-psql-web-server<gh_stars>0 --- requires ./utils.sql CREATE OR REPLACE FUNCTION app.system_pages__not_found(request app.request) RETURNS app.response AS $$ SELECT app.render_json(404, '{"result": "not_found"}') $$ LANGUAGE SQL;
<filename>.config/migrations/20210206113903_member_attributes.down.sql<gh_stars>0 DROP TABLE `member_attributes`;
DROP TABLE first_game_actions;
CREATE TYPE example_domain_object_with_map AS ( a text, b hstore );
<reponame>plusplus7/Cirno6<filename>db_setup.sql<gh_stars>1-10 CREATE TABLE Article ( link varchar(50), contentType varchar(20), content text, PRIMARY KEY(link) ); CREATE TABLE ArticleInfo ( link varchar(50), contentType varchar(20), createdDate timestamp, content text, tags varcha...
alter table AccountEntityMaster DROP CONSTRAINT accountentitymaster_name_key;
-- -- PostgreSQL database dump -- 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 search_path = public, pg_catalog; ALTER TABLE IF EXISTS ONLY public.homeowner...
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'SQL_ASCII'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS ...
CREATE TABLE `stable_id_event` ( `old_stable_id` varchar(128) collate latin1_bin default NULL, `old_version` smallint(6) default NULL, `new_stable_id` varchar(128) collate latin1_bin default NULL, `new_version` smallint(6) default NULL, `mapping_session_id` int(10) NOT NULL default '0', `type` enum('gene','...
<gh_stars>1000+ --insert into Foo values(1,'Foo_Name');
<filename>backend/de.metas.ui.web.base/src/main/sql/postgresql/system/41-de.metas.ui.web.base/5464650_sys_gh441webui_WEBUI_Board_tables_and_window.sql -- 2017-06-08T22:41:16.990 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Table (AccessLevel,ACTriggerLength,AD_Client_ID,AD_Org_ID,AD_...
<filename>sql/updates/0.6/2330_realmlist.sql ALTER TABLE `realmd`.`realmlist` ADD `port` int(11) NOT NULL default '8085' AFTER `address`;
/* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50538 Source Host : localhost:3306 Source Database : ns51_admin Target Server Type : MYSQL Target Server Version : 50538 File Encoding : 65001 Date: 2016-11-24 18:20:05 */ SET FOREIGN_KEY_C...
<filename>sql-examples/images-current-month.sql<gh_stars>0 SELECT year(e.dt) YR, month(e.dt) MO, day(e.dt) DAY, count(distinct(e.ip)) N, url.value URL FROM entries e INNER JOIN vhost ON e.id_vhost = vhost.id INNER JOIN url ON e.id_url = url.id WHERE vhost.value REGEXP '(www\.)?edsuom.com' AND e.http != 404 AND 12*(ye...
#standardSQL # 03_03a: % of pages with custom elements ("slang") CREATE TEMPORARY FUNCTION containsCustomElement(payload STRING) RETURNS BOOLEAN LANGUAGE js AS ''' try { var $ = JSON.parse(payload); var elements = JSON.parse($._element_count) return Object.keys(elements).filter(e => e.includes('-')).length > 0; }...
-- Create a database for test CREATE DATABASE IF NOT EXISTS testdb; USE testdb; -- Create a database user for the test database GRANT ALL ON testdb.* TO test@localhost IDENTIFIED BY 'test'; -- Ensure UTF8 on the database connection SET NAMES utf8; -- Table User DROP TABLE IF EXISTS User; CREATE TABLE User ( ...
DROP DATABASE IF EXISTS corona; CREATE DATABASE corona; USE corona; DROP TABLE IF EXISTS ill; DROP TABLE IF EXISTS country_codes; DROP TABLE IF EXISTS region_codes; DROP TABLE IF EXISTS district_codes; DROP TABLE IF EXISTS infectivity; CREATE TABLE ill( id INTEGER NOT NULL AUTO_INCREMENT, date_of_infection DAT...
<filename>public/db/schema.sql DROP database if exists buildAndFlex_db; CREATE DATABASE buildAndFlex_db;
<reponame>asifcre85/Work1 -- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Mar 16, 2020 at 02:02 PM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 21, 2018 at 06:37 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
<reponame>andreyleskov/MightyCalc<filename>build/persistence/initPostgres.sql CREATE DATABASE journal; CREATE DATABASE snapshotstore; CREATE DATABASE readmodel;
DROP TABLE IF EXISTS `iptable_whitelist`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `iptable_whitelist` ( `ip_address` varchar(15) NOT NULL, PRIMARY KEY (`ip_address`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_clie...
begin; insert into rules("from", "to", created, updated, kind, why, who, is_regex) values ('/tjejer-kodar-todo', 'http://izettle.github.io/tjejer-kodar-todo-app/', '2015-10-22 20:50:42.095188', '2016-09-01 13:16:21.390641', 'Permanent', 'Migrated from Mission Control', '<EMAIL>', false), ('/faq', '/help', '2016-08-15 ...
<filename>authentication-service/src/main/resources/db/migration/V1_0__initial_user_account.sql<gh_stars>1-10 CREATE TABLE user_account ( id VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, created_date DATETIME NOT NULL, verified BOOLEAN NO...
CREATE TABLE table_12 ( codigo VARCHAR(2) NOT NULL PRIMARY KEY, descripcion VARCHAR(11) NOT NULL ); INSERT INTO table_12(codigo, descripcion) VALUES ('01', 'Factura – emitida para corregir error en el RUC') , ('02', 'Factura – emitida por anticipos') , ('03', 'Boleta de Venta – emitida por antic...
<reponame>Shuttl-Tech/antlr_psql -- file:alter_table.sql ln:2274 expect:true SELECT attinhcount, attislocal FROM pg_attribute WHERE attrelid = 'part_3_4'::regclass AND attnum > 0