sql
stringlengths
6
1.05M
<reponame>johnsdouglass/cmdb DROP TRIGGER artifacts_updated_at on artifacts; DROP TABLE artifacts;
<reponame>bcgov/connectivity-intake -- Verify connectivity-intake:util_functions/upsert_policy on pg begin; select pg_get_functiondef('connectivity_intake_public.upsert_policy(text,text,text,text,text,text)'::regprocedure); select pg_get_functiondef('connectivity_intake_public.upsert_policy(text,text,text,text,text,t...
{% macro row_column_masked_view(table_name, source_schema, source_table, key_table, key_csv, user_csv, control_user) %} CREATE OR REPLACE VIEW ROW_COLUMN_MASKED AS SELECT * FROM {{ target.database }}.{{ target.schema }}."{{ table_name }}" WHERE {{ key_table }} IN (SELECT {{ key_csv }} ...
ALTER TABLE JOBS ADD COLUMN CALLBACK_URL VARCHAR(255);
-- This file and its contents are licensed under the Timescale License. -- Please see the included NOTICE for copyright information and -- LICENSE-TIMESCALE for a copy of the license. \set ECHO errors SELECT _timescaledb_internal.segment_meta_min_max_agg_max(i) = max(i), _timescaledb_internal.segment_meta_m...
<reponame>SKalt/pg_sql_parser_tests<gh_stars>0 DROP FUNCTION update_employee_salaries;
<reponame>Zhaojia2019/cubrid-testcases<filename>sql/_13_issues/_11_1h/cases/bug_bts_4919.sql create table t(a int); insert into t values (1),(1), (2); --return error message. this is good. select /*+ recompile */ a,count(*) from t order by a; --'a' column return NULL value. it is a strange result. we expect result is...
<filename>openGaussBase/testcase/SQL/DDL/cursor/Opengauss_Function_DDL_Cursor_Case0078.sql -- @testpoint:开启事务提取数据,参数为absolute count,抓取查询中的第count(>0)行; --前置条件 drop table if exists cur_test_78; create table cur_test_78(c_id int,c_num int,c_name varchar(10),c_city varchar(10),c_add varchar(20)); insert into cur_test_78 ...
<reponame>heholek/httplaceholder<gh_stars>0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'metadata';
<gh_stars>0 -- GAME DATABASE INITIALIZATION -- SER 322 Deliverable 3 -- Authors: <NAME> (jgoralcz), <NAME> (jcpowel5) -- create the database CREATE DATABASE IF NOT EXISTS `mygame_db`; USE `mygame_db`; -- TABLES -- game engine CREATE TABLE IF NOT EXISTS Engines ( id INTEGER AUTO_INCREMENT, name ...
use student; select * from employee; # arranging in ascending order select sname, roll, dept from employee order by sname,roll; #descending order select sname,roll, dept from employee order by dept desc; #count select count(dept) as Student_stength from employee; #minimum select min(roll) as Min_roll from employee...
drop database `almarusco`; create database `almarusco`; use `almarusco`; CREATE TABLE `organizations` ( `id` int(10) NOT NULL AUTO_INCREMENT, `code` varchar(255) DEFAULT NULL, `name` varchar(255) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `adminmail` varchar(200) DEFAULT NULL, `updated_at` dat...
restore database WideWorldImporters from disk = '/var/opt/mssql/WideWorldImporters-Full.bak' with move 'WWI_Primary' to '/var/opt/mssql/data/WideWorldImporters.mdf', move 'WWI_UserData' to '/var/opt/mssql/data/WideWorldImporters_UserData.ndf', move 'WWI_Log' to '/var/opt/mssql/data/WideWorldImporters.ldf', move 'WW...
INSERT INTO user (firstName, lastName, email, phoneNumber, password, bio, city, country, role, image_url, link1, link2, link3) VALUES ('Richard', 'Koln', '<EMAIL>', '07908236542', 'rkoln','Proffessional foodie, looking to put my skills to greater use', 'Toronto', 'Canada', 'job seeker', 'www.images.com', 'youtube.com'...
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 13, 2018 at 03:04 PM -- Server version: 5.6.26 -- PHP Version: 5.6.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 -- ================================================================================================= -- Author: <NAME> -- <NAME> -- <NAME> -- -- Description: Creates the database -- ===============================================================================================...
SELECT PERSON.FIRSTNAME, PERSON.LASTNAME, ADDRESS.CITY, ADDRESS.STATE FROM PERSON LEFT JOIN ADDRESS ON PERSON.PERSONID = ADDRESS.PERSONID;
<reponame>amenoyoya/native-php-blog use blog; create table articles(id int not null auto_increment, title varchar(200), body text, primary key (id));
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; CREATE TABLE `payment...
<filename>pl-sql/builds/GP_TRACKER_WRITER_SUMS VIEW STEP2.sql<gh_stars>1-10 CREATE OR REPLACE FORCE VIEW "AAE0376"."GP_TRACKER_WRITER_SUMS" AS SELECT GP_DATA.YEARMONTH, CASE WHEN GP_DATA.TYPE_OF_SALE IN ('Showroom', 'Showroom Direct') THEN 'Showroom' ELSE ...
<reponame>TSchwingle/ADF.procfwk CREATE VIEW procfwk.CurrentProperties AS SELECT [PropertyName], [PropertyValue] FROM [procfwk].[Properties] WHERE [ValidTo] IS NULL;
<filename>base de datos.sql<gh_stars>1-10 drop database fa_rrhh; create database fa_rrhh; use fa_rrhh; create table fa_tipovehiculo( cp_tipovehiculo int auto_increment, atr_descripcion varchar (200), constraint pk_tipovehiculo primary key(cp_tipovehiculo) ); create table fa_marca( cp_marca int auto_increment...
<reponame>sareronald/tic-tac-toe<filename>scripts/seedDB.sql<gh_stars>1-10 -- Seeds for tictactoeDB SQL database -- USE tictactoeDB; -- Inserting USERS into user table -- -- Inserting ONE TICTACTOE into tictactoe table as a test -- INSERT INTO Tictactoes (tictactoe_title, unit_title) VALUES ('<NAME>', 'Animals in Art...
<filename>src/test/resources/com/foundationdb/sql/unparser/select-19.sql select "t".* from "t"
<reponame>yosef7/db-2 -- Triggers, excepciones, if, set, -- variables (declare) CREATE DATABASE got; USE got; CREATE TABLE familia ( id INT PRIMARY KEY AUTO_INCREMENT, nombre VARCHAR(50) NOT NULL, frase VARCHAR(150) NOT NULL ); CREATE TABLE personajes ( id INT PRIMARY KEY AUTO_INCREMENT, nombre VA...
<reponame>oradrs/tpt-oracle -- Purpose : to generate -- cmd like ALTER SESSION SET optimizer_features_enable = '172.16.31.10'; -- hint /*+ optimizer_features_enable('9.2.0') */ -- Sometimes SQL do not perform in current version of Oracle but perform better in older releases of Oracle...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 19 Jan 2021 pada 08.31 -- Versi server: 10.4.14-MariaDB -- Versi PHP: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
-- Run this script from the parent directory, e.g. psql -f migrations/migrate-20171217.sql \cd updates \i NET-111-remove-domains.sql \i NET-112-jsonb.sql
-- Revert ggircs:ciip_table_production from pg begin; drop table ciip_2018.production; commit;
#standardSQL # Distribution of the different version of the top 20 technologies used on the web. SELECT category, app, info, month, client, pct FROM ( SELECT info, tech.category AS category, tech.app AS app, LEFT(_TABLE_SUFFIX, 10) AS month, IF(ENDS_WITH(_TABLE_SUFFIX, '_desktop'), 'd...
IF object_id(N'[EmployeeOrderCount]', N'FN') IS NOT NULL DROP FUNCTION [EmployeeOrderCount] GO create function [dbo].[EmployeeOrderCount] (@employeeId int) returns int as begin return (select count(orderId) from orders where employeeid = @employeeId); end GO IF object_id(N'[IsTopEmployee]', N'FN') IS NOT NULL ...
CREATE TABLE [dbo].[DriverPerformanceSummary] ( [Id] UNIQUEIDENTIFIER CONSTRAINT [DF_DriverPerformanceSummary_Id] DEFAULT (newid()) NOT NULL, [driverId] UNIQUEIDENTIFIER NOT NULL, [eventStart] DATETIMEOFFSET (7) NOT NULL, [eventEnd] DATETIMEOFFSET (7) NOT NUL...
<filename>FoodDataSQL/src/main/resources/sql/user/get_as_served_v1.sql SELECT as_served_sets.id, description, weight, url FROM as_served_sets JOIN as_served_images ON as_served_sets.id = as_served_set_id WHERE as_served_sets.id = {id} ORDER BY as_served_images.weight
USE company_db; -- ///////////////////////////////////////////////////////////// employee select (id, first name, last name, roles, manager) SELECT * FROM employees; SELECT id, first_name, last_name FROM employees WHERE manager_id IS NULL; INSERT INTO employees (first_name, last_name, roles_id, manager_id) VALUES (fi...
<gh_stars>0 CREATE PROCEDURE [dbo].[spCreateImportBatchSummaries] AS BEGIN BEGIN TRANSACTION; BEGIN TRY Delete ImportBatchSummary Insert Into ImportBatchSummary (ImportBatchID, SensorID, InstrumentID, StationID, SiteID, PhenomenonOfferingID, PhenomenonUOMID, Count, ValueCount, Minimum...
-- The rest of DML: Insert, Update, and Delete Insert into Genre values (100, 'misc'); -- best practice, name the columns you'll insert, in the order you want --necessary if some of the columns don't allow inserting -- helpful if some of the columns have default values you want Insert into Genre (GenreId,Name) values...
-- phpMyAdmin SQL Dump -- version 4.0.10.7 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jul 27, 2015 at 09:57 PM -- Server version: 5.5.41-cll-lve -- PHP Version: 5.4.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
<gh_stars>0 INSERT INTO tb_usuario (nome, email, senha) VALUES ('<NAME>', '<EMAIL>', '$2a$10$1/FNpSgwSqL1CNYKPphxT.0WI8pSth/1GjZ.A6DagoNBmjbsJabPO'); INSERT INTO tb_usuario (nome, email, senha) VALUES ('<NAME>', '<EMAIL>', '$2a$10$1/FNpSgwSqL1CNYKPphxT.0WI8pSth/1GjZ.A6DagoNBmjbsJabPO'); INSERT INTO tb_autorizacao (aut...
UPDATE Allocations SET Allocations.GoalCode = LEFT(Allocations.AccountCode, 1), Allocations.ObjectiveCode = RIGHT(LEFT(Allocations.AccountCode, 3), 2);
-- -- @lc app=leetcode id=595 lang=mysql -- -- [595] Big Countries -- -- @lc code=start # Write your MySQL query statement below select name ,population ,area from World where area >=3000000 or population >= 25000000 ; -- @lc code=end
<gh_stars>0 -- MySQL Script generated by MySQL Workbench -- Tue Aug 14 13:18:14 2018 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering 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, ...
<filename>Provided_info/pdfFile/20180117/20180116133233785/180117130739272_rialto (2).sql -- phpMyAdmin SQL Dump -- version 4.4.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 16, 2018 at 02:40 PM -- Server version: 5.6.25 -- PHP Version: 5.6.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET...
-- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jan 03, 2022 at 03:50 PM -- Server version: 5.7.36 -- PHP Version: 7.3.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
<filename>data/open-source/extracted_sql/google_guice.sql select e from JpaTestEntity as e where text = :text
CREATE PROCEDURE [dbo].[uspWorkExperienceDelete] @workExperienceId int AS BEGIN SET NOCOUNT ON DELETE FROM [dbo].[WorkExperience] WHERE [WorkExperienceId]=@workExperienceId SET NOCOUNT OFF END
<reponame>SunWarriorZLX/Web-Course-selection-inquiry-system INSERT INTO webexp.CLASS (CLASSID, CLASSNAME, REGTIME, SPECIALTY, REMARK) VALUES ('J01', 'C语言程序设计', '2021-06-29 12:27:21', '计算机', null); INSERT INTO webexp.CLASS (CLASSID, CLASSNAME, REGTIME, SPECIALTY, REMARK) VALUES ('J02', '数据结构', '2021-06-29 12:28:48', '计算...
BEGIN; DO $do$ BEGIN IF NOT EXISTS ( SELECT FROM pg_catalog.pg_roles WHERE rolname = 'app_user') THEN CREATE ROLE app_user LOGIN PASSWORD '<PASSWORD>'; END IF; END $do$; GRANT anonymous TO app_user; GRANT authenticated TO app_user; COMMIT;
<reponame>cymon1997/go-backend -- Generate UUID = md5(random()::text || clock_timestamp()::text)::uuid CREATE TABLE articles ( uid VARCHAR(10) PRIMARY KEY NOT NULL, title VARCHAR(20) NOT NULL, description VARCHAR(40), content TEXT, create_time TIMESTAMP DEFAULT now(), create_by varchar(10), ...
-- -- 分类表 -- 表的结构 `tx_goods_category` -- CREATE TABLE IF NOT EXISTS `tx_goods_category` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '分类id', `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类父id', `goods_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类商品数', `status` tinyint(3) un...
<filename>http/oracle/scripts/seata_order.sql -- Create branch_transaction table create table branch_transaction ( sysno number(20) not null CONSTRAINT branch_sysno_pk PRIMARY KEY, xid varchar2(128) not NULL UNIQUE , branch_id number(20) not null, args_json varchar2(512) default null, ...
-- 创建序列 create sequence business_sequence increment by 1 minvalue 1 no maxvalue start with 1; create sequence log_sequence increment by 1 minvalue 1 no maxvalue start with 1; -- 创建 user 表 create table sys_user ( id int not null primary key, username varchar(32) not null unique, password va...
/* Add English category name from category_names to category table for convenience */ UPDATE categories c SET name = n.name FROM category_names n WHERE c.id = n.category_id AND n.language = 'en'; -- Some categories do not have English names, fall back to German UPDATE categories c SET name = n.name FROM cat...
<filename>frontend/web/db.sql -- -------------------------------------------------------- -- Хост: 127.0.0.1 -- Версия сервера: 5.5.48 - MySQL Community Server (GPL) -- ОС Сервера: Win32 -- HeidiSQL Версия: 9.3.0.4984 -- ------------------------------...
-- allow user `root` from any host to access the server. Grant All Privileges ON *.* to 'root'@'%' Identified By 'root'; FLUSH PRIVILEGES; -- list of function procedures. SHOW FUNCTION STATUS; -- list all triggers. SHOW TRIGGERS; -- shows create table schema. SHOW CREATE TABLE `users` -- search full-text SELECT * F...
<filename>db/BIDBRF/Caracol/PRDSEG-2136-atuador_grupo-rollback.sql /** ----------------------------------------------------------------- * SCRIPT DE ROLLBACK * ----------------------------------------------------------------- * * História: PRDSEG-2136 * Base: Intranet, Gerenciadora * **/ delete from ...
<filename>update.sql ALTER TABLE `fantasy`.`vouchers` ADD COLUMN `batch_id` INT(11) DEFAULT '0' NULL AFTER `paid_plan`; CREATE TABLE `reseller_customers` ( `id` BIGINT(21) NOT NULL AUTO_INCREMENT, `reseller_id` BIGINT(21) DEFAULT NULL, `user_id` BIGINT(21) DEFAULT NULL, `subscribe_date` DATETIME DEFAULT NUL...
SELECT t1.name, count(*) FROM site as s, so_user as u1, question as q1, answer as a1, tag as t1, tag_question as tq1 WHERE q1.owner_user_id = u1.id AND a1.question_id = q1.id AND a1.owner_user_id = u1.id AND s.site_id = q1.site_id AND s.site_id = a1.site_id AND s.site_id = u1.site_id AND s.site_id = tq1.site_id AND s.s...
INSERT INTO burgers (name,devoured) VALUES ('Krusty Burger',false); INSERT INTO burgers (name,devoured) VALUES ('Ghost Burger',true); INSERT INTO burgers (name,devoured) VALUES ('Varsity Burger',false); INSERT INTO burgers (name,devoured) VALUES ('Umami Burger',true); INSERT INTO burgers (name,devoured) VALUES ("Ray's ...
<reponame>thluiz/sam-apinode<gh_stars>0 CREATE TABLE [dbo].[password_request] ( [id] INT IDENTITY (1, 1) NOT NULL, [person_id] INT NOT NULL, [token] NVARCHAR (150) NOT NULL, [created_at] DATETIME DEFAULT (getdate()) NOT NULL, PRIMARY KEY CLUSTERED ([id] ASC...
<filename>src/data/0001-init.sql CREATE TABLE IF NOT EXISTS Migrations ( id SERIAL PRIMARY KEY ); CREATE TABLE IF NOT EXISTS Users ( id BIGINT NOT NULL PRIMARY KEY, banned BOOLEAN NOT NULL DEFAULT FALSE, plevel BIGINT NOT NULL DEFAULT 0 ); CREATE TABLE IF NOT EXISTS Guilds ...
<filename>uai/2016/db/Data/dataDetalleDocumento.sql insert into DetalleDocumento (id_documento, id_producto, cantidad_producto) values (516, 17, 3); insert into DetalleDocumento (id_documento, id_producto, cantidad_producto) values (368, 16, 1); insert into DetalleDocumento (id_documento, id_producto, cantidad_producto...
<filename>prisma/migrations/20210321153118_add_notification_priotiry/migration.sql -- CreateEnum CREATE TYPE "NotificationPriority" AS ENUM ('high', 'low'); -- AlterTable ALTER TABLE "EmailNotifications" ADD COLUMN "priority" "NotificationPriority" NOT NULL DEFAULT E'low';
create or replace function partitions(cards int[10], subtotal int) returns int as $$ declare m int := 0; total int; begin m := 0; -- Hit for i in 1 .. 10 loop if (cards[i]>0) then total := subtotal+i; if (total < 21) then cards[i] := cards[i]-1; -- Stand m := m+1; ...
CREATE TABLE messages ( id BIGINT NOT NULL AUTO_INCREMENT, creation_date TIMESTAMP, last_modified_date TIMESTAMP, created_by VARCHAR(1000), last_modified_by VARCHAR(1000), name VARCHAR(100) NOT NULL, type VARCHAR(50) NOT NULL, title ...
WITH source AS ( SELECT * FROM {{ source('sheetload', 'manual_downgrade_dotcom_tracking') }} ), renamed AS ( SELECT namespace_id::NUMBER AS namespace_id, TRY_TO_DATE(downgraded_date) AS downgraded_date FROM source ) SELECT * FROM renamed
CREATE TABLE IF NOT EXISTS album_artist ( album_artist_id INTEGER PRIMARY KEY NOT NULL, album_artist_name TEXT NOT NULL COLLATE NOCASE, created_date INTEGER NOT NULL, UNIQUE (album_artist_name COLLATE NOCASE) )
<filename>sql/fl/2012_02_29_quest27166.sql INSERT INTO `creature` VALUES ('15581663', '44473', '0', '1', '1', '0', '44473', '1082.03', '-1145.06', '73.2271', '0.62143', '300', '0', '0', '1220', '0', '0', '0', '0', '0', '0'); INSERT INTO `creature` VALUES ('15581664', '44473', '0', '1', '1', '0', '44473', '1100.27', '-1...
<filename>src/test/resource/sql/SELECT01.sql -- subquery_factoring_clause SELECT /*+ hind */ DISTINCT column1 , column2 FROM table1 , ( SELECT UNIQUE column1 , column2 FROM table4 ) table2 , ( SELECT ALL ...
CREATE TABLE IF NOT EXISTS `institution_grade_students` ( `id` char(36) NOT NULL, `security_user_id` int(11) NOT NULL, `education_grade_id` int(11) NOT NULL, `academic_period_id` int(11) NOT NULL, `institution_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `institution_grade_students` A...
<filename>DMS5/T_Bionet_Hosts.sql /****** Object: Table [dbo].[T_Bionet_Hosts] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[T_Bionet_Hosts]( [Host] [varchar](64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [IP] [varchar](15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Alia...
-- +migrate Up ALTER TABLE key ADD COLUMN tmp_value bytea; UPDATE KEY SET tmp_value = value; ALTER TABLE key DROP COLUMN value; ALTER TABLE key RENAME COLUMN "tmp_value" to "value";
<gh_stars>1000+ SELECT SPACE(NULL); SELECT SPACE(0); SELECT SPACE(1); SELECT SPACE(2);
/* -- Query: SELECT * FROM careconnect.Patient where PATIENT_ID > 2 LIMIT 0, 1000 -- Date: 2017-10-03 13:49 */ INSERT INTO Patient (PATIENT_ID,RES_DELETED,RES_CREATED,RES_MESSAGE_REF,RES_UPDATED,active,date_of_birth,gender,registration_end,registration_start,NHSverification,ethnic,GP_ID,marital,PRACTICE_ID) VALUES (10...
<reponame>Utaria/feedback.utaria.fr CREATE TABLE `feedbacks` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `playername` VARCHAR(100) NOT NULL, `service` VARCHAR(255) NOT NULL, `description` TEXT NULL, `priority` INT(1) NOT NULL DEFAULT '0', `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ...
-- @testpoint:opengauss关键字double(非保留),作为序列名 --关键字不带引号-成功 drop sequence if exists double; create sequence double start 100 cache 50; drop sequence double; --关键字带双引号-成功 drop sequence if exists "double"; create sequence "double" start 100 cache 50; drop sequence "double"; --关键字带单引号-合理报错 drop sequence if exists 'doubl...
CREATE TABLE `tl_page` ( `faviconPath` varchar(255) NOT NULL default '', `faviconExternal` char(100) NOT NULL default '', `appleTouchIconPath` varchar(255) NOT NULL default '', `appleTouchIconExternal` char(100) NOT NULL default '', PRIMARY KEY (`id`), ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- enum values in caps DROP TYPE IF EXISTS invoice_type_caps; ALTER TABLE invoices RENAME COLUMN type TO old_type; ALTER TABLE invoices ADD COLUMN type INTEGER; UPDATE invoices SET type = 1 WHERE old_type = 'billing'; UPDATE invoices SET type = 2 WHERE old_type = 'payment'; ALTER TABLE invoices ALTER COLUMN type SET NO...
create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3" as ( -- SQL model to build a hash column based on the values of this record select *, md5(cast( coalesce(cast(_AIRBYTE_CONFLICT_STREAM_ARRAY_2_HASHID as...
DROP TABLE IF EXISTS {access_caches}; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE {access_caches} ( `id` int(9) NOT NULL AUTO_INCREMENT, `item_id` int(9) DEFAULT NULL, `view_full_1` binary(1) NOT NULL DEFAULT '0', `edit_1` binary(1) NO...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 24, 2019 at 08:04 PM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.0.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
/* Warnings: - A unique constraint covering the columns `[mobile]` on the table `users` will be added. If there are existing duplicate values, this will fail. */ -- CreateEnum CREATE TYPE "Role" AS ENUM ('USER', 'ADMIN', 'SUPER_ADMIN'); -- AlterTable ALTER TABLE "users" ADD COLUMN "firstName" TEXT, ADD COLUM...
<filename>data/5.[T1-Question Questionnaire Pairs].sql INSERT INTO [T1-Question Questionnaire Pairs]([Question ID],[Questionnaire ID]) VALUES (1,1); INSERT INTO [T1-Question Questionnaire Pairs]([Question ID],[Questionnaire ID]) VALUES (1,2); INSERT INTO [T1-Question Questionnaire Pairs]([Question ID],[Questionnaire ID...
SELECT COUNT(assistance_requests.*) AS total_assistances, teachers.name FROM assistance_requests JOIN teachers ON teacher_id = teachers.id WHERE teachers.name = '<NAME>' GROUP BY teachers.name;
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 15, 2017 at 04:17 PM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
<filename>dbms/database/hostel_management.sql -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 02, 2021 at 01:49 PM -- Server version: 10.4.21-MariaDB -- PHP Version: 8.0.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+...
<filename>app-gallery/migrations/2020-08-11-063445_create_users/up.sql -- Your SQL goes here CREATE TABLE secret_questions ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, question TEXT NOT NULL UNIQUE, active BOOLEAN NOT NULL DEFAULT 1 ); INSERT INTO secret_questions (id,question,active) VALUES (1, "Wh...
DROP TRIGGER prevent_qu_stock_change_after_first_purchase; CREATE TRIGGER cascade_change_qu_id_stock AFTER UPDATE ON products WHEN NEW.qu_id_stock != OLD.qu_id_stock BEGIN -- All amounts anywhere are related to the products stock QU, -- so apply the appropriate unit conversion to all amounts everywhere on change --...
SET IDENTITY_INSERT [AUTH].[ClientCorsOrigins] ON INSERT [AUTH].[ClientCorsOrigins] ([Id], [ClientId], [Origin]) VALUES (1, 4, N'http://localhost:5003') SET IDENTITY_INSERT [AUTH].[ClientCorsOrigins] OFF
INSERT INTO WWS_COUNTRIES (ID, NAME, ISO3, ISO2, PHONECODE, CAPITAL, CURRENCY, CREATED_AT, UPDATED_AT, FLAG, WIKIDATAID) VALUES (206, 'South Sudan', 'SSD', 'SS', '211', 'Juba', 'SSP', TO_TIMESTAMP('2018-07-20 16:41:03','YYYY-MM-DD HH24:MI:SS'), TO_TIMESTAMP('2019-08-02 21:38:23','YYYY-MM-DD HH24:MI:SS'), 1, 'Q958'); ...
<filename>java-utils/target/classes/mysql/mill.sql<gh_stars>1-10 ## 演示百万数据的sql函数 DELIMITER $$ CREATE FUNCTION mock_data () RETURNS INT BEGIN DECLARE num INT DEFAULT 5000000; DECLARE i INT DEFAULT 0; WHILE i < num DO INSERT INTO school_stu ( `name`, `email`, `phone`, `gender`, `password`, `age` ) VALUES ...
<filename>test/Procedures/UserGetByAlias.sql CREATE PROCEDURE UserGetByAlias ( @Alias VARCHAR(20) ) AS SELECT * FROM [User] WHERE Alias = @Alias
/* Navicat MySQL Data Transfer Source Server : Mysql Source Server Version : 50717 Source Host : localhost:3306 Source Database : j2ee Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2020-06-10 21:27:53 */ SET FOREIGN_KEY_CHECKS=0; -- --------...
<gh_stars>1-10 USE Diablo GO -- 14. Create Table Logs CREATE TABLE Logs( LogId INT PRIMARY KEY IDENTITY(1,1), AccountId INT FOREIGN KEY REFERENCES Accounts(Id), OldSum MONEY, NewSum MONEY ) GO CREATE TRIGGER tr_ChangeBalance ON Accounts AFTER UPDATE AS BEGIN INSERT INTO Logs(AccountID,OldSum,NewSum) SELECT i.Id, d....
<reponame>nordic-institute/misp2-install-source -- Add support for multiple X-Road instances per portal DO $$ BEGIN RAISE NOTICE '--- Running alter-script v 2.1.11: Support for multiple X-Road instances ---'; -- portal.xroad_instance is going to be interpreted as _Client_ instance from now on. -- Service ins...
CREATE TABLE IF NOT EXISTS tasks ( task_id INT PRIMARY KEY, title VARCHAR(255) NOT NULL, start_date DATE, due_date DATE, status INT NOT NULL, priority INT NOT NULL, description TEXT, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
<filename>CapsData/Create Scripts/Tables/Keys/FK_SimpleTranslation_Material.fkey.sql ALTER TABLE [dbo].[SimpleTranslation] ADD CONSTRAINT [FK_SimpleTranslation_Material] FOREIGN KEY ([MaterialID]) REFERENCES [dbo].[Material] ([MaterialID]) ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE experiment DROP COLUMN title;
<reponame>HuttonICS/germinate-server /**************************************************/ /* GERMINATE 3 */ /* MIGRATION SCRIPT */ /* v3.3.1 -> v3.3.2 */ /**************************************************/ SET sql_notes = 0...
<reponame>tparikh/apostille CREATE TABLE `tuf_files` ( `id` int(11) NOT NULL AUTO_INCREMENT, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `gun` varchar(255) NOT NULL, `role` varchar(255) NOT NULL, `version` int(11) NOT...
CREATE FUNCTION func798() RETURNS integer LANGUAGE plpgsql AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE426);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE125);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE375);val:=(SELECT COUNT(*)INTO MYCOU...