sql
stringlengths
6
1.05M
CREATE TABLE type(id INTEGER, label INTEGER, singular_label INTEGER, icon INTEGER, top_mentioned_entities TEXT, PRIMARY KEY(id)); INSERT INTO `type` VALUES ('1','7','8','1', ''); INSERT INTO `type` VALUES ('2','9','10','2', ''); CREATE TABLE string(id INTEGER, language TEXT, text TEXT); INSERT INTO `string` VALUES ('0'...
SELECT DISTINCT ydotacion_v.numedota, ydotacion.clavdota, case when titular.codiempl is not null then (TO_CHAR(titular.codiempl) || ~' - ~' || Rtrim(titular.apellid1) || NVL(~' ~' || titular.apellid2,~'~') || ~', ~' || titular.nombre) else null end titular FROM ydotacion_v, ydotacion, ( SELECT yfasepues.codienti...
Drop Table If Exists #FollowsCandidate Select Distinct Candidate,Follower Into #FollowsCandidate From [Following] Inner Join [User] On Followee=Id Create Unique Clustered Index FollowsCandidate On #FollowsCandidate(Follower,Candidate) Select A.Candidate, Format(Count(Distinct A.Follower),'N0') As Follo...
<filename>src/main/resources/db/migration/V7__add_published_date_column.sql ALTER TABLE POSTS ADD PUBLISHED_AT TIMESTAMP DEFAULT NOW();
select T.str from ( select DISTINCT( C.name + ' ' + dbo.GetFormCoords( E.ID, F.IFORM ) ) as str from sg_language L join sg_class C on C.id_lang=L.id --OR C.id_lang=-1 OR C.id_lang is null join sg_entry E on E.id_class=C.id join sg_form F on F.id_entry=E.id where L.name='English' ) T order by LEN(T.str) DESC ...
CREATE DATABASE dbwebappdb; CREATE USER 'dbwebapp'@'%' IDENTIFIED BY 'dbwebapp'; GRANT ALL PRIVILEGES ON dbwebappdb.* TO 'dbwebapp'@'%';
<reponame>omkar-yadav-12/Hawk CREATE TABLE user ( email varchar(255) DEFAULT NULL, create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP, team varchar(255) DEFAULT NULL, grade varchar(45) DEFAULT NULL, first_name varchar(128) DEFAULT NULL, last_name varchar(128) DEFAULT NULL, info varchar(1024) DEFAULT 'Ad...
<filename>db/seeds.sql INSERT INTO department(name) VALUES ("Sales"); INSERT INTO role(title, salary, department_id) VALUES ("Manager", 100000, 1); INSERT INTO role(title, salary, department_id) VALUES ("Sales Associate", 24000, 1); INSERT INTO employee(first_name, last_name, role_id) VALUES ("Black", "Beard", 1); IN...
<reponame>agdespopoulos/cheesy-arena -- +goose Up CREATE TABLE alliance_teams ( id INTEGER PRIMARY KEY, allianceid int, pickposition int, teamid int ); CREATE UNIQUE INDEX alliance_position ON alliance_teams(allianceid, pickposition); -- +goose Down DROP TABLE alliance_teams;
-- Give IRB Admin role read privs on protocols. INSERT INTO KRIM_ROLE_PERM_T ( ROLE_PERM_ID, OBJ_ID, VER_NBR, ROLE_ID, PERM_ID, ACTV_IND ) VALUES (10363, SYS_GUID(), 1, 1119, 1024,'Y' ); --PERMISSION TO VIEW PROTOCOL ONLINE REVIEW DOCUMENTS. --PERMISSION IS ON THE PROTOCOL DOCUMENT. INSERT INTO KRIM_PERM_T (PERM_...
<reponame>Kycklingar/PBooru CREATE OR REPLACE FUNCTION alias_insert() RETURNS trigger AS $$ BEGIN -- Update all the paren_tags to reflect the new alias -- Have to use annoying selects because there is no -- IGNORE on updates in postgresql UPDATE parent_tags SET parent_id = NEW.alias_to WHERE p...
<reponame>divitngoc/jooq-flyway-example CREATE TABLE `author` ( `id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT, `name` VARCHAR(255) DEFAULT NULL, `email` VARCHAR(255) DEFAULT NULL ); CREATE TABLE `book` ( `id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT, `title` VARCHAR(255) DEFAULT NULL, `author_id`...
-- +migrate Up INSERT INTO hydra_oauth2_access (signature, request_id, requested_at, client_id, scope, granted_scope, form_data, session_data, subject, active, requested_audience, granted_audience) VALUES ('7-sig', '7-request', NOW(), '7-client', '7-scope', '7-granted-scope', '', '{}', '7-subject', true, '7-requested...
# Author: <NAME> select max(population) - min(population) from city;
-- product table Create table Orders ( Id int identity(1,1), CustomerName nvarchar(255) not null, CustomerEmail nvarchar(255) not null, TotalAmount DECIMAL(13,2) not null, CreatedUtc datetime2 not null default getutcdate(), UpdatedUtc datetime2 not null default getutcdate(), Deleted bit not ...
UPDATE "$SCHEMAom"."version" SET "number"='1.0.5'; ALTER TABLE "$SCHEMAom"."procedures" ADD "om_type" character varying(100);
ALTER TABLE "postgres-all-features-1-1$dev"."User" ALTER COLUMN "createdAt" SET DEFAULT CURRENT_TIMESTAMP; ALTER TABLE "postgres-all-features-1-1$dev"."User" ALTER COLUMN "isActive" SET DEFAULT false; ALTER TABLE "postgres-all-features-1-1$dev"."Work" ALTER COLUMN "createdAt" SET DEFAULT CURRENT_TIMESTAMP; ALTER TABLE ...
<reponame>amishakov/livehelperchat ALTER TABLE `lh_chat_online_user` ADD `chat_time` bigint(20) unsigned NOT NULL DEFAULT '0', COMMENT=''; ALTER TABLE `lh_chat_online_user` ADD `last_visit_prev` bigint(20) unsigned NOT NULL DEFAULT '0', COMMENT='';
<gh_stars>100-1000 CREATE STREAM george_martin WITH (kafka_topic = 'george_martin_books') AS SELECT * FROM all_publications WHERE author = '<NAME>';
ALTER TABLE `ko`.`ko_system_setting` DROP index value
SELECT p1.*, p2.* FROM summary_meta4_part1 AS p1 INNER JOIN summary_meta4_part2 AS p2 ON p1.locus_tag = p2.locus_tag;
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 15, 2015 at 08:45 PM -- Server version: 5.6.16 -- PHP Version: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
<filename>tests/parser-gen/D004.ddl -- test overlap of intervals def Main = { $$ = Choose { x = { Match1 ('0'..'7') ; Match1 ('a'..'y'); } ; y = { Match1 ('3'..'9') ; Match1 ('x'..'z'); } } ; END }
<reponame>Zhaojia2019/cubrid-testcases<gh_stars>1-10 -- create serial using NOMAXVALUE descending create serial ser1 INCREMENT BY -2 NOMAXVALUE ; select * from db_serial WHERE name='ser1'; drop serial ser1;
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 16, 2019 at 08:29 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
SET IDENTITY_INSERT [dbo].[Locations] OFF INSERT INTO [dbo].[Locations] ([Id],[RouteId],[Name]) VALUES (1,1,'Accueil') INSERT INTO [dbo].[Locations] ([Id],[RouteId],[Name]) VALUES (2,2,'Architecture') INSERT INTO [dbo].[Locations] ([Id],[RouteId],[Name]) VALUES (3,3,'Archives') INSERT INTO [dbo].[Locations] ([Id],[Ro...
{{ config( alias='aggregators') }} SELECT contract_address, name FROM ( VALUES ( '0x0a267cf51ef038fc00e71801f5a524aec06e4f07', 'GenieSwap' ), ( '0x0000000031f7382a812c64b604da4Fc520afef4b', 'Gem' ), ( '0xf24629fbb477e10f2cf331c2b7452d8596...
<gh_stars>0 update employees SET first_name = ?, last_name=?, role_id=(SELECT id FROM roles WHERE roles.title=?), manager_id = null WHERE employees.id=?;
<filename>db/scripts/01_create.sql DROP DATABASE IF EXISTS pbp_gfdb; CREATE DATABASE pbp_gfdb; USE pbp_gfdb; -- ----------------------------------------------------- -- Table `Korisnik` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `Korisnik` ( `uid` BIGINT(20) NOT NULL, `pril...
<filename>05SubqueriesAndJoins/14CountriesWithRivers.sql select top(5) c.CountryName, r.RiverName from Countries as c left join CountriesRivers as cr on cr.CountryCode = c.CountryCode left join Rivers as r on r.id = cr.RiverId where ContinentCode = 'AF' order by c.CountryName
<gh_stars>0 SELECT timestamp with time zone '2005-04-02 12:00:00-07' + interval '1 day';
create or replace package fsm authid definer as /* Package for generic management of a Finite State Machine (FSM) * @usage: The package contains the implementation of the abstract class * FSM_TYPE and provides generic functions for logging, administration * of events and status changes. ...
<filename>sql/script_drop_token.sql insert into stas_dict(key, value) values('token', '') on conflict (key) do update set value = '';
-- Verify sat-api-pg:20191211011147-fixindexperf on pg BEGIN; -- XXX Add verifications here. ROLLBACK;
insert into field_visit_header_info (json_data_id, field_visit_identifier, location_identifier, start_time, end_time, party, ...
<reponame>dwillis/openFEC<filename>data/sql_setup/prepare_schedule_a.sql -- Create simple indices on filtered columns create index on sched_a (rpt_yr) where rpt_yr >= :START_YEAR_ITEMIZED; create index on sched_a (entity_tp) where rpt_yr >= :START_YEAR_ITEMIZED; create index on sched_a (image_num) where rpt_yr >= :STAR...
<reponame>skylerdesign/maps<filename>sandbox/phpESP/scripts/db/mysql_populate.sql DROP TABLE IF EXISTS realm; CREATE TABLE realm ( name CHAR(16) NOT NULL, title CHAR(64) NOT NULL, changed TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY(name) ); -- # table of respondents (people who enter d...
<filename>cnprc_ehr/resources/schemas/dbscripts/sqlserver/obsolete/cnprc_ehr-16.292-16.293.sql /* * Copyright (c) 2016-2017 LabKey Corporation * * 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 Licens...
<gh_stars>0 CREATE OR REPLACE PROCEDURE grant_meta_data_user (table_name IN VARCHAR, do_grant IN BOOLEAN) IS BEGIN /* DO NOTHING; no longer needed since meta_data_user has hdb_meta_role Do not delete procedure because is called by Meta Data App IF do_grant THEN EXECUTE IMMEDIATE 'grant insert, update, del...
SET NAMES utf8; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for `yunzhi_teacher` -- ---------------------------- DROP TABLE IF EXISTS `photo`; CREATE TABLE `photo` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '相片ID', `name` varchar(30) DEFAULT '' COMMEN...
-- Remove new column pd_verified ALTER TABLE students DROP COLUMN IF EXISTS pd_verified;
<reponame>andrecontisilva/SQL-aprendizado<gh_stars>0 /* Site: HackerRank Type: Practice Subdomain: Advanced Select Difficulty: Medium Skill: SQL (Oracle) Problem: The PADS URL: https://www.hackerrank.com/challenges/the-pads/problem */ -- SOLUTION: -- v1: Without PL/SQL SELECT name || '(' || SUBSTR(occupation, ...
<reponame>zharmedia386/Progate-Course-Repo -- get the total by date and character where the total is greater than 30 SELECT SUM(price),purchased_at,character_name FROM purchases GROUP BY purchased_at,character_name HAVING SUM(price) > 30 ;
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th10 01, 2020 lúc 11:46 AM -- Phiên bản máy phục vụ: 10.1.32-MariaDB -- Phiên bản PHP: 5.6.36 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
<filename>Form/700/SQL Program Behavior/dbo.ExecuteDayForChart.sql  CREATE proc ExecuteDayForChart(@m nvarchar(2),@y nvarchar(4)) as select top 15 * from plannings.dbo.ExecuteDay(@m,@y) order by SuccessDate desc
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 16, 2018 at 02:46 PM -- Server version: 10.1.32-MariaDB -- PHP Version: 5.6.36 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
USE `evento`; -- -- All countries with a 2-digit code from ISO 3166-1 alpha-2 -- INSERT INTO `country` (`name`, `code`) VALUES ('Afghanistan', 'AF'), ('Åland Islands', 'AX'), ('Albania', 'AL'), ('Algeria', 'DZ'), ('American Samoa', 'AS'), ('Andorra', 'AD'), ('Angola', 'AO'), ('Anguilla'...
<filename>addons/fyly_sun/db.sql /* Navicat MySQL Data Transfer Source Server : 本地 Source Server Version : 50553 Source Host : localhost:3306 Source Database : tc Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2018-02-09 09:15:13 */ SET FOREIG...
CREATE OR REPLACE FUNCTION createReport() RETURNS VOID AS $$ DECLARE /* c1: Data set containing all universities */ c1 CURSOR IS SELECT University.name AS University FROM University; /* c2: Data set containing all universities, their countries, and the number of students from each country */ c2 CURSOR (...
-- AlterTable ALTER TABLE "User" ALTER COLUMN "beSeenBeyondRange" DROP DEFAULT;
CREATE TABLE `tenders` ( `tenderid` int(11) NOT NULL DEFAULT '0', `location` varchar(5) NOT NULL DEFAULT '', `address1` varchar(40) NOT NULL DEFAULT '', `address2` varchar(40) NOT NULL DEFAULT '', `address3` varchar(40) NOT NULL DEFAULT '', `address4` varchar(40) NOT NULL DEFAULT '', `address5` varchar(20...
<filename>l2j_datapack/dist/sql/game/posts.sql<gh_stars>0 CREATE TABLE IF NOT EXISTS `posts` ( `post_id` int(8) NOT NULL DEFAULT '0', `post_owner_name` varchar(255) NOT NULL DEFAULT '', `post_ownerid` int(8) NOT NULL DEFAULT '0', `post_date` bigint(13) unsigned NOT NULL DEFAULT '0', `post_topic_id` int(8) NOT...
<gh_stars>1-10 -- Create Temporary Table and truncating the original table create temp table <TEMP-TABLE-NAME> as select * from <ORIGINAL-TABLE-NAME>; truncate <ORIGINAL-TABLE-NAME>; insert into <ORIGINAL-TABLE-NAME> (select * from <TEMP-TABLE-NAME>); drop table <TEMP-TABLE-NAME>;
-- Add migration script here CREATE TABLE IF NOT EXISTS auth_sessions ( user_id BIGINT PRIMARY KEY, token TEXT NOT NULL );
<filename>server/app/migrations/models/4_20210903095040_update.sql<gh_stars>10-100 -- upgrade -- ALTER TABLE "channels" ADD "transport_stream_id" INT; -- downgrade -- ALTER TABLE "channels" DROP COLUMN "transport_stream_id";
-- [Q] Still At It -- "Tipsy" McManus SAI SET @ENTRY := 28566; SET @GOSSIP := 9713; UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100+0,@ENTRY*100+1,@ENTRY*100+2,@ENTRY*100+3,@ENTRY*100+4,@ENTRY*100+5,@ENTRY*100+6,@ENTRY*100+7,@...
<filename>REPSI_Tool_02.00_Development/sql/Performance Scripts/Performance_11_DB_Top_5_User_IO.sql SELECT * FROM (SELECT sql_text, sql_id, elapsed_time, cpu_time, user_io_wait_time FROM SYS.v_$sqlarea ORDER BY 5 DESC) WHERE ROW...
------------------------------------------------------------------------------- -- activity info ------------------------------------------------------------------------------- CREATE TABLE ACTIVITY_INFO( ID BIGINT NOT NULL, NAME VARCHAR(200), CONTENT VARCHAR(65535), LOCATION VARCHAR(200), STATUS VARCHAR...
DROP PROCEDURE IF EXISTS sp_get_user_attributes; delimiter // CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_get_user_attributes`(p_username varchar(255)) begin select 'email' as 'key', email as 'value' from users where username=p_username union select 'firstname' as 'key', firstname as 'value' from users where userna...
CREATE TABLE `scanner_results` ( `id` int(11) NOT NULL AUTO_INCREMENT, `process_uuid` varchar(45) NOT NULL, `scan_core` varchar(45) DEFAULT NULL, `issue_type` varchar(245) DEFAULT NULL, `primary_key_value` varchar(545) DEFAULT NULL, `primary_data_schema` varchar(245) DEFAULT NULL, `primary_data_val...
<reponame>xDataIQ/Template-dbt-Package {%- macro reason_for_arr_change_seat_change(quantity,previous_quantity,arr,previous_arr) -%} CASE WHEN {{ previous_quantity }} != {{ quantity }} AND {{ previous_quantity }} > 0 THEN ZEROIFNULL({{ previous_arr }} /NULLIF({{ previous_quantity }},0) * ({{ quantity ...
ALTER TABLE rpt.invoice ALTER COLUMN external_id DROP NOT NULL; ALTER TABLE rpt.payment ALTER COLUMN external_id DROP NOT NULL; ALTER TABLE rpt.refund ALTER COLUMN external_id DROP NOT NULL;
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for cron_job -- ---------------------------- DROP TABLE IF EXISTS `cron_job`; CREATE TABLE `cron_job` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(45) COLLATE utf8_unicode_ci NOT NULL, `project_id` bigi...
<filename>SQL Query Files/SQL-master/verifySQLFiles.sql /* directories e:\dexma\ssis e:\mssql\ DATA LDF TRN e:\mssql.1\mssql\ data ldf TRN g:\mssql\ DATA h:\mssql LDF g:\mssql.1\mssql\ DATA h:\mssql.1\mssql LDF Directory roots :\mssql\ :\mssql.1\mssql\ Directories Data LDF BAK Drives ...
EXECUTE dbo.drop_schema 'inventory'; GO CREATE SCHEMA inventory; GO CREATE TABLE inventory.units ( unit_id integer IDENTITY PRIMARY KEY, unit_code national character varying(24) NOT NULL, unit_name nationa...
# Sample level data for rs6025 and hereditary thrombophilia trait # for use in the Factor V Leiden data story. SELECT sample_id, chromosome, locusBegin, locusEnd, reference, allele1Seq, allele2Seq, zygosity, has_Hereditary_thrombophilia_includes_Factor_V_Leiden_and_Prothrombin_G20210A AS has_Hered...
<reponame>iuskye/SREWorks ALTER TABLE `am_app_package_component_rel` CHANGE `app_id` `app_id` VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应用唯一标示';
CREATE OR REPLACE FUNCTION sslutils_version() RETURNS text AS 'MODULE_PATHNAME', 'sslutils_version' LANGUAGE C IMMUTABLE; COMMENT ON FUNCTION sslutils_version() IS 'Returns the current version of sslutils'; CREATE OR REPLACE FUNCTION openssl_rsa_generate_key(integer) RETURNS text AS 'MODULE_PATHNAME', 'openssl_rsa_gen...
INSERT INTO `info_block` (`id`, `title`, `snippet`, `keywords`, `header`, `description`, `content`, `date_update`) VALUES (1, 'Шампуни для собак', 'Самые лучшие шампуни для собак доступны для вас сегодня!', '', 'Шампуни для собак', '', '<h2>Шампуни для собак от экспертов</h2>\r\n<p>А вы знаете самый простой способ пров...
<filename>fixtures/doctests/rules/025/input.sql Aggregate (cost=4.44..4.45 rows=1 width=0) (actual time=0.042..0.042 rows=1 loops=1) -> Index Only Scan using wrd_word on wrd (cost=0.42..4.44 rows=1 width=0) (actual time=0.039..0.039 rows=0 loops=1) Index Cond: (word = 'caterpiler'::text) Heap F...
<reponame>OpenMPDK/SMDK -- This is the import table into which a single value will be pushed by kafkaimporter. LOAD classes sp.jar; file -inlinebatch END_OF_BATCH ------- Kafka Importer Tables ------- CREATE TABLE kafkaimporttable1 ( KEY BIGINT NOT NULL, value BIGINT NOT NU...
-- @testpoint: opengauss关键字float(非保留),作为同义词对象名,部分测试点合理报错 --前置条件 drop table if exists float_test; create table float_test(id int,name varchar(10)); --关键字不带引号-成功 drop synonym if exists float; create synonym float for float_test; insert into float values (1,'ada'),(2, 'bob'); update float set float.name='cici' where fl...
-- CreateTable CREATE TABLE "Post" ( "id" SERIAL NOT NULL, "title" TEXT NOT NULL, PRIMARY KEY ("id") ); -- CreateIndex CREATE UNIQUE INDEX "Post.title_unique" ON "Post"("title");
<gh_stars>0 IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'RelationshipTypes') BEGIN DELETE FROM RelationshipTypes END
<filename>create.sql create table "users" ( "id" serial primary key not null, "name" varchar(127) not null, "email" varchar(127) not null, "password" varchar(255) not null, "gender" varchar(7) not null, "birth_at" date not null, "remember_token" varchar(100) null, "created_at" timestamp(0) without time ...
<gh_stars>0 -- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versi server: 10.4.19-MariaDB - mariadb.org binary distribution -- OS Server: Win64 -- HeidiSQL Versi: 10.3.0.5771 -- -----------------------------------...
INSERT INTO city VALUES(0, "Sofia"); INSERT INTO city VALUES(0, "Plovdiv"); INSERT INTO city VALUES(0, "Varna"); INSERT INTO city VALUES(0, "Burgas"); INSERT INTO city VALUES(0, "Ruse"); INSERT INTO city VALUES(0, "Pleven"); INSERT INTO city VALUES(0, "Shumen"); INSERT INTO type_of_goods VALUES(0, "Meat produc...
<gh_stars>0 --------------------------------------------------------------- -- table: ons_oas_population_male --------------------------------------------------------------- -- drop table marc; create table ons_oas_population_male ( oa11cd character varying(9) not null, lsoa11cd character varying(9) not null, al...
<filename>hw28-spring-jdbc/src/main/resources/db/migration/V1__initial_schema.sql -- Для @GeneratedValue(strategy = GenerationType.SEQUENCE) create sequence hibernate_sequence start with 1 increment by 1; create table client ( id bigserial not null primary key, name varchar(50) );
DROP table if exists equityPosition; create table equityPosition ( transactionID INTEGER auto_increment comment '主键', tradeID INTEGER not null comment 'TradeID', version INTEGER not null default 1, securityCode INTEGER not null, quantity INTEGER not null, action INTEGER not null, primary ...
<filename>Cap13/02-WebApp/sql/create_table.sql CREATE TABLE `appdb`.`tbl_user` ( `user_id` INT NOT NULL AUTO_INCREMENT, `user_name` VARCHAR(45) NULL, `user_email` VARCHAR(45) NULL, `user_password` VARCHAR(45) NULL, PRIMARY KEY (`user_id`)); grant insert on tbl_user to appuser;
<gh_stars>1-10 CREATE TABLE t1(a,INT,b,INTEGER, c TEXT, d BLOB, e,ANY, UNI a,ba) ON CONFLICT ignore, PRIMARY KEY(b), UNIQUE(c) ON CONFLICT fail ) WITHOUT ROWID; CREATE INDEX t1d ON t1(d); CREATE UNIQUE INDEX t1e ON t1(e); INSERT INTO t1(a,b,c,d,e) VALUES(1,2,'abc','b3',3.5); INSERT INTO t1 VALUES(2,2,'xyz',...
CREATE DATABASE IF NOT EXISTS `AutNode` USE `AutNode`; -- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: localhost Database: AutNode -- ------------------------------------------------------ -- Server version 5.7.17-log -- -- Table structure for table `servico` -- DROP TABLE IF EXISTS `servico`...
<reponame>Chromico/bk-base /* * Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. * * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. * * BK-BASE 蓝鲸基础平台 is licensed under the MIT License. * * License for BK-BASE 蓝鲸基础平台: * -------------------...
<reponame>ulise/hetida-designer ALTER TABLE Filter ALTER COLUMN Value TYPE TEXT;
<reponame>andrewspadaro/employeeManagment<gh_stars>0 DROP DATABASE IF EXISTS employees; CREATE DATABASE employees; USE employees; CREATE TABLE department ( -- CREATE id, name COLUMNS -- MAKE id AS PRIMARY KEY -- YOUR CODE HERE id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, NAME VARCHAR(30) UNIQUE NOT NULL ); ...
CREATE VIEW [dbo].[MappingEntity] AS SELECT m.[Id] AS [MappingId], se.[Data] AS [EntityData] FROM [dbo].[Mapping] m INNER JOIN [dbo].[OperationSourceSystemEntity] osse ON m.[CurrentOperationSourceSystemEntityId] = osse.[Id] INNER JOIN [dbo].[SerializedEntity] se ON osse.[SerializedEntityId] = se.[Id]
-- Drop table if exists (for testing purposes) drop table if exists customer_lifecycle; -- Create table DDL create table customer_lifecycle ( customer_id int primary key , total_revenue float , first_30_days_revenue float , first_30_days_tier varchar(2) , first_film text[] , last_film text[] ...
<reponame>reetahan/ears<filename>Database/user_display.sql DELIMITER // DROP PROCEDURE IF EXISTS USER_DISPLAY; CREATE PROCEDURE USER_DISPLAY( userId_ INT ) BEGIN SELECT * FROM Account NATURAL JOIN User WHERE UserId = userId_ ; END // DELIMITER ;
/* Navicat PostgreSQL Data Transfer Source Server : postgres Source Server Type : PostgreSQL Source Server Version : 100017 Source Host : 172.18.150.90:5432 Source Catalog : seata_product Source Schema : public Target Server Type : PostgreSQL Target Server Version : 100...
SELECT Continent, COUNT(Name) AS Countries_quantity FROM world.country GROUP BY Continent ORDER BY CAST(Continent AS CHAR);
ALTER TABLE users ADD never_expires BOOLEAN DEFAULT FALSE NOT NULL; UPDATE users SET never_expires=TRUE WHERE email='admin';
<filename>src/Frapid.Web/Areas/Frapid.Config/db/SQL Server/1.x/1.0/src/10.policy/access_policy.sql<gh_stars>1-10 DECLARE @office_id integer = core.get_office_id_by_office_name('Default'); EXECUTE auth.create_api_access_policy '{*}', @office_id, 'config.kanban_details', '{*}', 1; EXECUTE auth.create_api_access_policy '...
<gh_stars>10-100 /* Navicat Premium Data Transfer Source Server : learn_leapy_cn Source Server Type : MySQL Source Server Version : 50726 Source Host : 192.168.3.11:3306 Source Schema : learn_leapy_cn Target Server Type : MySQL Target Server Version : 50726 File Enc...
<gh_stars>100-1000 INSERT INTO `sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1010085935326470146', 'syllabusSubscribeRecord', 'syllabus', '[0],[syllabus],', '团操课预约记录', '', '/syllabusSubscribeRecord', '99', '2', '1', NULL, '1', '0'); I...
-- Tags: distributed -- regression for endless loop with connections_with_failover_max_tries=0 set connections_with_failover_max_tries=0; select * from remote('127.2', system.one);
--TEST: [Merge Statement] the column that is referenced in the ON condition can be updated in a merge statement. drop table if exists t1; drop table if exists t2; create table t1(a int, b int); insert into t1 values(1, 22); create table t2(a int, b int); insert into t2 values(1, 10); insert into t2 values(2, 100); ...
<gh_stars>0 create or replace package body param as c_true constant parameter_group.pgr_is_modifiable%type := &C_TRUE.; c_false constant parameter_group.pgr_is_modifiable%type := &C_FALSE.; c_max_char_length constant number := 32767; c_max_raw_length constant number := 2000; g_parameter_rec parame...
insert into users (id, login_name, password_hash, role_name) values (-1, 'user', 'PBKDF2WithHmacSHA256:2048:e9vXAAs/amAf2/PT/eVw2UbG6DcdtIZArf0FqMG8ClI=:UTOAQ8LsucZL3nua/RQj3VyDid3KhaSUFc5AaVI8T4A=', 'USER') insert into users (id, login_name, password_hash, role_name) values (-2, 'manager', 'PBKDF2WithHmacSHA256:2048:e...
<filename>routines/form_create.sql DELIMITER ENDROUTINE CREATE PROCEDURE form_create ( IN arg_form_meta ${ARTICLE_META_TYPE} , OUT arg_form_id ${ARTICLE_ID_TYPE} ) LANGUAGE SQL NOT DETERMINISTIC MODIFIES SQL DATA SQL SECURITY DEFINER BEGIN CALL article_create_with_meta ('form', CONCAT('form_', arg_form...