sql
stringlengths
6
1.05M
-- Drop table DROP TABLE users_roles; CREATE TABLE users_roles ( user_id serial NOT NULL, -- Unique Identifier role_id varchar(4) NOT NULL, CONSTRAINT users_roles_pkey PRIMARY KEY (user_id, role_id) );
DROP PROCEDURE IF EXISTS customer_sales $$ CREATE PROCEDURE customer_sales (in_customer_id INT) READS SQL DATA BEGIN DECLARE total_sales NUMERIC(8,2); SELECT SUM(sale_value) INTO total_sales FROM sales WHERE customer_id=in_customer_id; SELECT CONCAT('Total sales for ',in_custom...
<reponame>giuliobosco/HibernateMaven<gh_stars>0 /* * The MIT License * * Copyright 2018 giuliobosco. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including wi...
EXEC sp_rename 'dbo.Comments.CreatedAt', 'Date', 'COLUMN';
<filename>06. Built-in Functions - Exercise/13. User Email Providers.sql # 13. User Email Providers # # Find information about the email providers of all users. Display the user_name # and the email provider. Sort the results by email provider alphabetically, # then by username. USE diablo; SELECT u.user_name, S...
<filename>SQL/6kyu/table_totaling/solution.sql SELECT RANK() OVER(ORDER BY SUM(points) DESC), COALESCE(NULLIF(clan, ''), '[no clan specified]') AS clan, SUM(points) AS total_points, COUNT(*) AS total_people FROM people GROUP BY 2 ORDER BY 3 DESC;
---------------------------------------- DROP TABLES AND SEQUENCES-------------------------------------------------------------- DROP SEQUENCE FIRMA_id_firma_SEQ; DROP SEQUENCE PROIECT_id_proiect_SEQ; DROP SEQUENCE SACINA_id_sarcina_SEQ; DROP SEQUENCE DEPARTAMENT_id_departament_SEQ; DROP SEQUENCE ECHIPA_id_echipa_...
<filename>prisma/migrations/20210603015612_make_usre_id_as_id_on_tasks/migration.sql /* Warnings: - The primary key for the `Task` table will be changed. If it partially fails, the table could be left without primary key constraint. */ -- AlterTable ALTER TABLE "Task" DROP CONSTRAINT "Task_pkey", ADD PRIMARY KEY ...
INSERT INTO api_organization(name, type, location) VALUES ('Client', 'OAO', 'Moscow'), ('Contractor', 'OOO', 'Tyumen'); INSERT INTO api_contract(number, content, client_id, contractor_id) VALUES ('N425-2020', 'Contract data', 1, 2), ('N426-2020', 'Another Contract data', 1, 2); -- INSERT INTO api_employ...
<filename>SQL/ObservationsSACTN/Clean Data.sql<gh_stars>0 use ObservationsSACTN Update Instrument set Latitude = null, Longitude = null, Elevation = null where Code like 'SACTN%' --Update Observation set Latitude = null where Latitude is not null --Update Observation set Longitude = null where Longitude is not null --U...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 1172.16.31.10 -- Generation Time: Apr 19, 2021 at 09:18 AM -- Server version: 10.4.18-MariaDB -- PHP Version: 8.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
<reponame>bcarter/beaconScan -- Create the beacon Schema -- -- Author: <NAME> -- -- 2017-08-18 SET SERVEROUTPUT ON SET ECHO ON WHENEVER SQLERROR EXIT BEGIN EXECUTE IMMEDIATE 'DROP USER beacon CASCADE'; EXCEPTION WHEN OTHERS THEN IF SQLCODE <> -1918 THEN RAISE; END IF; END; / CREATE USER beacon IDE...
create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1" as ( -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select to_varchar(get_path(pa...
create table table_users_chat ( id int auto_increment primary key, name_user varchar(100) not null unique, password text not null ); create table table_users_chat_online ( id text not null, name_user varchar(100) not null unique, date_time text not null ); c...
<reponame>na0fu3y/bqfunc CREATE OR REPLACE FUNCTION zerobyte.ZEROBYTE_TO_TIME(a ARRAY< STRUCT< _ STRUCT< INT64 > > >) AS ( TIME_ADD('00:00:00', INTERVAL zerobyte.ZEROBYTE_TO_INT64(a) MICROSECOND) );
<filename>src/test/resources/sql/alter_table/6e606354.sql<gh_stars>10-100 -- file:alter_table.sql ln:556 expect:true alter table atacc3 add test2 bool
-- file:foreign_data.sql ln:334 expect:true ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET STORAGE PLAIN
CREATE DATABASE IF NOT EXISTS `db-class-example` CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE `db-class-example`; CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `password` varchar(50) COLLATE utf8_unicode_ci NOT N...
DROP DATABASE IF EXISTS `feedback`; CREATE DATABASE IF NOT EXISTS `feedback`; USE `feedback`; DROP TABLE IF EXISTS `tbl_users`; CREATE TABLE IF NOT EXISTS `tbl_users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `email` varchar(250) COLLATE utf8_unicode_ci NOT NULL, `passwd` varchar(250) COLLATE utf8_unicode_...
CREATE TABLE [Staging].[IOStats] ( [InstanceID] INT NOT NULL, [SnapshotDate] DATETIME2 (2) NOT NULL, [database_id] SMALLINT NOT NULL, [file_id] SMALLINT NOT NULL, [sample_ms] BIGINT NOT NULL, [num_of_reads] BI...
<filename>eppdev-jee-web/src/main/resources/schema.sql -- ------------------------------------------------ -- 修订历史: -- ------------------------------------------------ -- 修改人:jinlong.hao -- 修改时间:2019-08-16 -- 修改类型:修改库表 -- 修改内容: -- - 修改表信息:_eppdev_index -- - 修改字段:table_id -- - 修改字段:index_name -- ---------------------...
INSERT INTO spell_threat VALUES (20243,101), (30016,101), (30022,101);
INSERT INTO `pw_windid_school` (`schoolid`, `name`, `areaid`, `typeid`, `first_char`) VALUES (975673, '湖南省郴州市广播电视大学', 43, 3, 'H'), (989889, '湖南省郴州市农业学校', 43, 3, 'H'), (972525, '湖南省党校', 43, 3, 'H'), (976117, '湖南省道县师范学校', 43, 3, 'H'), (982327, '湖南省道州师范学院', 43, 3, 'H'), (980231, '湖南省第一师范', 43, 3, 'H'), (991861, '湖南省电大邵阳分...
<reponame>kawaja/Kilda DROP INDEX ON :`connected_device` (`type`);
<filename>scripts/kubernetes/repo_groups.sql -- Add repository groups update gha_repos set repo_group = 'Kubernetes' where name in ( 'kubernetes/kubernetes', 'GoogleCloudPlatform/kubernetes', 'kubernetes' ); update gha_repos set repo_group = 'CSI' where org_login = 'kubernetes-csi'; update gha_repos set repo_g...
<reponame>machine-intelligence/arbital-open-source /* This table contains pages that have been submitted to a domain. */ CREATE TABLE pageToDomainSubmissions ( /* Id of the submitted page. FK into pageInfos. */ pageId VARCHAR(32) NOT NULL, /* Id of the domain it's submitted to. FK into pageInfos. */ domainId VARCHA...
CREATE TYPE public.temp_t_channels_stats as ( zone character varying, client_id character varying, connection_id character varying, channel_id character varying, zone_counerparty character varying, is_opened boolean, ibc_tx_1d integer, ibc_tx_1d_diff integer, ibc_tx_1d_failed integer, ibc_tx_1d_failed_diff...
<gh_stars>100-1000 SELECT cab_type, count(*) FROM ##TAB## GROUP BY cab_type
<reponame>asantoz/trino<gh_stars>1000+ -- database: presto_tpcds; groups: tpcds; requires: io.trino.tempto.fulfillment.table.hive.tpcds.ImmutableTpcdsTablesRequirements WITH frequent_ss_items AS ( SELECT "substr"("i_item_desc", 1, 30) "itemdesc" , "i_item_sk" "item_sk" , "d_date" "solddate" , "count"...
<filename>test/sl_sequel_SUITE_data/model/select.sql SELECT * FROM sequel_model WHERE id = ? LIMIT 1
@@job_instance_data_ddl.sql @@execution_instance_data_ddl.sql @@step_execution_instance_data_ddl.sql @@job_status_ddl.sql @@step_status_ddl.sql @@checkpoint_data_ddl.sql
<reponame>bitsnaps/YiiSpace<gh_stars>10-100 /* SQLyog Ultimate v11.11 (64 bit) MySQL - 5.6.21-log : Database - yiispace ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_C...
<filename>sql/_09_64bit/_02_bigint/cases/1011.sql<gh_stars>1-10 create class test_class (bigint_col bigint, smallint_col smallint, int_col int, numeric_col numeric,float_col float, double_col double); insert into test_class(bigint_col, smallint_col, int_col, numeric_col, float_col, double_col) values (-100, 1, 2, 3.3, ...
country tablosunda bulunan country sütunundaki ülke isimlerinden 'A' karakteri ile başlayıp 'a' karakteri ile sonlananları sıralayınız. select * from country where country like 'A%a' country tablosunda bulunan country sütunundaki ülke isimlerinden en az 6 karakterden oluşan ve sonu 'n' karakteri ile sonlananları sırala...
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 1192.168.127.12 -- Tiempo de generación: 27-05-2019 a las 17:17:27 -- Versión del servidor: 10.1.37-MariaDB -- Versión de PHP: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00...
<reponame>yangyangv2/leet-code<filename>problems/src/main/java/prob175/combine/two/tables/Solution.sql<gh_stars>0 select FirstName, LastName, City, State from Person p left join Address a on p.PersonId = a.PersonId;
-- This file should undo anything in `up.sql` drop table user; drop table interest; drop table country; drop table country_city; drop table accommodation_service; drop table experience; drop table experience_contributor; drop table experience_image; drop table experience_video; drop table experience_interest; drop tabl...
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `cache` ( `module` varchar(255) CHARACTER SET ascii NOT NULL, `key` varchar(255) CHARACTER SET ascii NOT NULL, `value` longblob NOT NULL, `expires` datetime NOT NULL, `autoclear` tinyint(1)...
-- phpMyAdmin SQL Dump -- version 4.7.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 04, 2017 at 10:43 PM -- Server version: 5.6.35 -- PHP Version: 7.1.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `mysql` -- -- ------------------------------...
create table school ( schoolId int not null identity(1,1) primary key, schoolName varchar(250) not null, [UID] varchar(250) null, eMail varchar(250) null, active bit not null ) create table teacher ( teacherId int not null identity(1,1) primary key, schoolId int foreign key references school(schoolId), FirstNa...
<gh_stars>0 create database shortcut; use shortcut; CREATE TABLE Employee ( availability_E BOOLEAN NOT NULL, id_E CHAR(10) NOT NULL, name_E VARCHAR(100) NOT NULL, lastName_E VARCHAR(100) NOT NULL, phoneNumber_E CHAR(10) NOT NULL, email_E VARCHAR(50) NOT NULL, type_E CHAR(50) NOT NULL, commissionPerc_E ...
<filename>src/main/resources/data.sql INSERT INTO company (id, name) VALUES (1, 'SCPSA') INSERT INTO app_user (id, email, company_id) VALUES (1, '<EMAIL>', 1)
<filename>db/schema.sql DROP DATABASE IF EXISTS cms_db; CREATE DATABASE cms_db; USE cms_db; CREATE TABLE department ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(30) NOT NULL ); CREATE TABLE role ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, title VARCHAR(30) NOT NULL, department_id INT,...
CREATE TABLE Teachers ( TeacherID INT IDENTITY(101, 1) NOT NULL, [Name] VARCHAR(50) NOT NULL, ManagerID INT, CONSTRAINT PK_Teachers PRIMARY KEY(TeacherID), CONSTRAINT FK_Teachers_Teachers FOREIGN KEY(ManagerID) REFERENCES Teachers(TeacherID) ) INSERT INTO Teachers([Name], ManagerID) VALUES ('J...
<filename>src/main/resources/db/migration/nomis/ddl/V1_273__OFFENDER_PROFILES.sql<gh_stars>1-10 CREATE TABLE "OFFENDER_PROFILES" ( "OFFENDER_BOOK_ID" NUMBER(10,0) NOT NULL, "PROFILE_SEQ" NUMBER(6,0) NOT NULL, "CHECK_DATE" DATE NOT NULL, "MODIFY_USER_ID" VARCHAR2(32 CHAR), "CREATE_DATETIME" TIME...
create table address ( address_id int auto_increment, street varchar(255) not null, city varchar(255) not null, state varchar(255) not null, zip varchar(255) null, country varchar(255) not null, constraint address_address_id_uindex unique (address_id) ); alt...
ALTER TABLE "public"."offer" ALTER COLUMN "start_date" SET NOT NULL;
ALTER TABLE public.webui_dashboarditem_trl ALTER COLUMN isactive SET DEFAULT 'Y';
<filename>booking/database_schema/upgrades/2.3/data.sql insert into roles values (4, 'Schedule Admin', 4); insert into dbversion values('2.3', now());
<reponame>Ed-Fi-Alliance-OSS/Ed-Fi-MigrationUtility -- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information....
CREATE TABLE AUTHORS ( ID UUID PRIMARY KEY, NAME VARCHAR(50), CREATEDON TIMESTAMP );
<reponame>bydan/pre<filename>erp_ejb/src_facturacion/com/bydan/erp/facturacion/resources/general/ProductosMarcas_Postgres.sql select (select nombre from inventario.unidad where id=d.id_unidad) as nombre_unidad, (select nombre from inventario.producto where id=d.id_producto) as nombre_producto, sum(d.cantidad) as...
select AL.airline ,bt.batch ,tl.Titles ,F.* from ( select t1.rn ,t1.issuekey ,t1.summary ,t1.issue ,T1.OLDSTRING ,T1.NEWSTRING ,t1.Transition ,isnull(t2.transitiontime,t1.CREATED) Start_Date_Time ,t1.transitiontime End_Date_Time ,datediff(day,isnull(t2.transitiontime,t1.CREATED),t1.transitiontime) Duration from ( se...
DELETE FROM spaces where id='171d52ff-fa00-46d7-ac24-94269908ad7a'; INSERT INTO spaces (id, name) VALUES ('171d52ff-fa00-46d7-ac24-94269908ad7a', 'test space'); -- empty query name -- this should fail DELETE FROM queries; INSERT INTO queries(title, fields, space_id, creator) VALUES ('', '{"assignee": "me"}', '171d52f...
<filename>modules/domain/src/main/resources/tables/user_online.sql<gh_stars>1-10 -- Table: user_online DROP TABLE IF EXISTS user_online CASCADE; CREATE TABLE user_online( id bigserial NOT NULL, -- USER ONLINE identity uid bigint NOT NULL, -- USER identity login_at timestamp without time zone NOT NULL DEFAULT ...
#standardSQL # WebVitals distribution by device WITH base AS ( SELECT device, fast_fid, avg_fid, slow_fid, fast_lcp, avg_lcp, slow_lcp, small_cls, medium_cls, large_cls, fast_fcp, avg_fcp, slow_fcp, fast_ttfb, avg_ttfb, slow_ttfb, ...
<reponame>HappyFacade/kafka-tutorials CREATE STREAM actingevents_drama AS SELECT NAME, TITLE FROM ACTINGEVENTS WHERE GENRE='drama'; CREATE STREAM actingevents_fantasy AS SELECT NAME, TITLE FROM ACTINGEVENTS WHERE GENRE='fantasy'; CREATE STREAM actingevents_other AS SELECT NAME...
<reponame>pdv-ru/ClickHouse -- Tags: distributed SET max_distributed_connections = 1; SELECT count() + 1 FROM remote('127.0.0.{2,3}', system, one);
--TEST: [Function Based Index] Function Based Index will not be used when a table has an alias name in query. --+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; create table t1 (a varchar(10), b varchar(10)); create index i1 on t1 (upper(a)); insert into t1 values ('a', 'a'), ('b', 'b'); --test: index ...
/*L Copyright SAIC, Ellumen and RSNA (CTP) Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/national-biomedical-image-archive/LICENSE.txt for details. L*/ -- Delete non-exist user data DELETE FROM query_history_attribute WHERE query_history_pk_id IN (SELECT query_histor...
<reponame>liuqian1990/postgres-xl /* contrib/stormstats/stormstats--unpackaged--1.0.sql */ ALTER EXTENSION stormstats ADD function storm_database_stats(); ALTER EXTENSION stormstats ADD view storm_database_stats;
CREATE TABLE teams ( team_id BIGSERIAL PRIMARY KEY UNIQUE );
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 13 Jan 2021 pada 14.10 -- Versi server: 10.4.17-MariaDB -- Versi PHP: 7.4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
<gh_stars>0 CREATE TABLE test ( project int, id int, name VARCHAR(50), description VARCHAR(500), lastExecution DATETIME, state ENUM('validate', 'refused', 'not executed'), CONSTRAINT PK_ID PRIMARY KEY (project, id), FOREIGN KEY (project) REFERENCES project(id) ON DELETE CASCADE ); DELI...
<reponame>JohanVanSteenbrugghe/DotNetExampleWebsite INSERT INTO Tag (Post_Id, Name) VALUES (0, ''), (1, 'Tag 1'), (1, 'Tag 2'), (1, 'Tag 3'), (1, 'Tag 4'), (1, 'Tag 5')
/* Navicat Premium Data Transfer Source Server : postgres Source Server Type : PostgreSQL Source Server Version : 110005 Source Host : localhost:5432 Source Catalog : postgres Source Schema : public Target Server Type : PostgreSQL Target Server Version : 110005 File En...
/* SQLyog Ultimate v12.5.1 (64 bit) MySQL - 10.4.13-MariaDB : Database - db_kasir ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE...
<reponame>IceIce1ce/QLDT-Database-HCMUS<gh_stars>0 -- CREATE DATABASE USE master GO CREATE DATABASE QUANLYDETAI GO USE QUANLYDETAI GO -- CREATE TABLE + PRIMARY KEY CREATE TABLE THAMGIADT ( MAGV CHAR(5), MADT CHAR(5), STT INT, PHUCAP FLOAT, KETQUA NVARCHAR(10), CONSTRAINT PK_THAMGIADT PRIMARY K...
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Feb 25, 2017 at 02:06 AM -- Server version: 10.1.19-MariaDB -- PHP Version: 7.0.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
<reponame>ProtoZxn99/WiRe -- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.5.5-10.0.17-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATI...
-- Makes it so all of the following code will affect empltracker -- USE empltracker; -- create some data to add to tables above INSERT INTO department(name) VALUES ("Management"), ("Logistics"), ("Sales"), ("Research"); INSERT INTO role (title,salary,department_id) VALUES ("CEO",1000,1), ("Accountant",70,2), ("Sal...
/************************************************************* -- Get All DB Mail Profiles/Accounts/Server Relevant Info *************************************************************/ SELECT sysmail_profile.profile_id , sysmail_profileaccount.account_id AS account_id , sysmail_profile.name AS profile_na...
ALTER TABLE egcl_paymentDetail_audit ADD COLUMN receiptdate BIGINT; ALTER TABLE egcl_paymentDetail_audit ADD COLUMN receipttype character varying(256);
<filename>plumeria/core/storage/migrations/V1__initial.sql<gh_stars>10-100 CREATE TABLE IF NOT EXISTS plumeria_migrations ( plugin VARCHAR(100) NOT NULL PRIMARY KEY, version INTEGER NOT NULL, name VARCHAR(100) NOT NULL ) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE TABLE [dbo].[UserConfirmations] ( [Id] INT NOT NULL IDENTITY(1,1) PRIMARY KEY, [UserId] BIGINT NOT NULL, [Token] NVARCHAR(100) NOT NULL, [DateCreated] DATETIME NOT NULL DEFAULT GETDATE(), [Used] BIT NOT NULL DEFAULT 0, CONSTRAINT [FK_SubscribeConfirm_Subscribe] FOREIGN KEY ([UserId]) R...
CREATE TABLE "peer" ( "id" TEXT NOT NULL, "port" INTEGER NOT NULL, "ip_addr" TEXT NOT NULL ); CREATE TABLE "sensor_mapping" ( "sensor_id" INTEGER PRIMARY KEY NOT NULL, "peer_id" TEXT NOT NULL, "remote_id" INTEGER NOT NULL ); CREATE TABLE "prog" ( "id" INTEGER PRIMARY KEY, "description" TEXT ...
<filename>tesuto-admin-services/tesuto-admin-core/src/flyway/resources/db.migration/V2.86__add_permission_view_placement_decision.sql insert into security_permission (security_permission_id, created_on_date, last_updated_date, description) values ('VIEW_CURRENT_USER_PLACEMENT_DECISION', timestamp 'now', timestamp '...
<filename>migrations/sql/V2019.05.08.14.57__remove_placeholder_default_date.sql -- mine_location expiry_date ALTER TABLE mine_location ALTER COLUMN expiry_date DROP NOT NULL, ALTER COLUMN expiry_date DROP DEFAULT; UPDATE mine_location SET expiry_date = NULL WHERE expiry_date = '9999-12-31'::date; -- permit_status_cod...
alter table Attachment modify attachedAt DATETIME(6); alter table AuditTaskImpl modify activationTime DATETIME(6); alter table AuditTaskImpl modify createdOn DATETIME(6); alter table AuditTaskImpl modify dueDate DATETIME(6); alter table AuditTaskImpl modify lastModificationDate DATETIME(6); alter table BAMTaskSummary...
<filename>kinto/core/storage/postgresql/migrations/migration_004_005.sql DROP INDEX IF EXISTS idx_records_user_id; DROP INDEX IF EXISTS idx_records_resource_name; DROP INDEX IF EXISTS idx_records_last_modified; DROP INDEX IF EXISTS idx_records_id; ALTER TABLE records ADD PRIMARY KEY (id, user_id, resource_name); ...
<filename>src/test/regress/sql/int2.sql<gh_stars>10-100 -- -- INT2 -- CREATE TABLE INT2_TBL(f1 int2); INSERT INTO INT2_TBL(f1) VALUES ('0 '); INSERT INTO INT2_TBL(f1) VALUES (' 1234 '); INSERT INTO INT2_TBL(f1) VALUES (' -1234'); INSERT INTO INT2_TBL(f1) VALUES ('34.5'); -- largest and smallest values INSER...
-- @testpoint: opengauss关键字scope(非保留),作为游标名,部分测试点合理报错 --前置条件 drop table if exists explain_test cascade; create table explain_test(cid int,fid int); --关键字不带引号-成功 start transaction; cursor scope for select * from explain_test order by 1; close scope; end; --关键字带双引号-成功 start transaction; cursor "scope" for select * fro...
<reponame>hadli30/Project_ipam-master -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 06 Sep 2019 pada 12.52 -- Versi server: 10.4.6-MariaDB -- Versi PHP: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zon...
/****** Object: Table [dbo].[OpenIddictScopes] Script Date: 26/04/2017 11:55:20 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[OpenIddictScopes]( [Id] [nvarchar](450) NOT NULL, [Description] [nvarchar](max) NULL, CONSTRAINT [PK_OpenIddictScopes] PRIMARY KEY CLUSTERED ( [Id] ASC ...
<reponame>nextstepitt/NS61001_Student_Files create table country_codes ( country_code_id varchar(3) not null, name varchar(20) not null, constraint pk_country_code primary key(country_code_id) ); create table customers { customer_id bigint not null generated always as identity (start with 1, increment ...
<reponame>developersociety/WikiRumours<filename>db_setup/dev-setup.sql CREATE USER 'wikirumors'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; GRANT ALL PRIVILEGES ON * . * TO 'wikirumors'@'localhost'; FLUSH PRIVILEGES;
-- resize-ops-metric.sql -- look back through AWR for excessive resize operations -- it may be that SGA needs an increase before ORA-4031 occurs -- when AMM/ASMM is used SGA memory is divided into pools -- sometimes Oracle will throw ORA-4031 even though there is sufficient memory in another subpool -- see mem-subpoo...
-- -------------------------------------------------------- -- Host: localhost -- Server version: 10.2.3-MariaDB-log - mariadb.org binary distribution -- Server OS: Win32 -- HeidiSQL Version: 9.4.0.5125 -- ---------------------------------------------...
<reponame>marlam/PROJ --- This file has been generated by scripts/build_db_create_ignf_from_xml.py from the http://librairies.ign.fr/geoportail/resources/IGNF.xml definition file. DO NOT EDIT ! INSERT INTO "metadata" VALUES('IGNF.SOURCE', 'http://librairies.ign.fr/geoportail/resources/IGNF.xml'); INSERT INTO "metadata...
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 25, 2015 at 03:27 AM -- 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_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 05, 2020 at 09:21 PM -- 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"; /*!40...
CREATE TABLE `repoStats` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `createdAt` datetime DEFAULT NULL, `nameWithOwner` varchar(1024) DEFAULT NULL, `stargazersCount` int(11) DEFAULT NULL, `forksCount` int(11) DEFAULT NULL, `watchersCount` int(11) DEFAULT NULL, `issuesOpenCount` int(11) DEFAULT NULL, ...
<reponame>tied/innovation-funding-service -- IFS-6673 H2020 terms and conditions -- add the new terms INSERT INTO terms_and_conditions (id, name, template, version, type, created_by, created_on, modified_on, modified_by) VALUES (24, 'Horizon 2020', 'h2020-terms-and-conditions', 1, 'GRANT', 15, now(), now(), 15); SET ...
CREATE TABLE T_BILLS ( ID VARCHAR(36), CONTRACT_ID VARCHAR(36) NOT NULL, STARTDATE DATE NOT NULL, -- valid from, inclusive ENDDATE DATE NOT NULL, -- valid to, inclusive VALUE DECIMAL(9,2) NOT NULL, -- value PRIMARY KEY(ID) ) ;
<reponame>luizgribeiro/airbyte create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3" as ( -- SQL model to build a hash column based on the values of this record select *, md5(cast( coalesce(cast(_AIRB...
<reponame>jdkoren/sqlite-parser<gh_stars>100-1000 -- randexpr1.test -- -- db eval {SELECT case when (c between 11 and t1.e*t1.a | c) then case when (case when (b=(select max((t1.c))-min(t1.d) from t1)*b) then t1.c else 17 end-e>t1.d and a between d and d) then c else d end when exists(select 1 from t1 where (11)>19) o...
-- file:transactions.sql ln:102 expect:true SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE
/* Issue #2929 Standardize use of title case and lower case across screens, and update text accordingly. */ UPDATE fda_hphc.active_task_master_attribute SET display_name = 'Number of disks' WHERE display_name = 'Number of Disks'; UPDATE fda_hphc.active_task_master_attribute SET display_name = 'Puzzle solved/unsol...
------------------------------------------------------------------------------------------------------ -- ATTENDEES NEWS ------------------------------------------------------------------------------------------------------ create table public.attendees_news ( id bigint generated by defaul...
CREATE TABLE [dbo].[Room] ( [Id] NVARCHAR (50) NOT NULL, [RoomName] NVARCHAR (150) NOT NULL, [Projector] BIT NOT NULL, [Sitting] INT NOT NULL, [location] NVARCHAR (50) NOT NULL, [VideoConferencing ] BIT N...