sql
stringlengths
6
1.05M
<reponame>kyle074613/burger INSERT INTO burgers_db.burgers (burger_name) VALUES ("Double Cheeseburger"), ("Big Mac"), ("Whopper");
select sum(ss_net_profit)/sum(ss_ext_sales_price) as gross_margin ,i_category ,i_class ,grouping(i_category)+grouping(i_class) as lochierarchy ,rank() over ( partition by grouping(i_category)+grouping(i_class), case when grouping(i_class) = 0 then i_category end order by sum(ss_net_profit)/sum(ss_ext_sales_price) asc) ...
<reponame>kyowill/derby-10.0.2.1<gh_stars>0 -- This tests that SQL92 formally reserved words are now unreserved -- -- INTERVAL create table interval(interval int); prepare interval as 'select * from interval'; execute interval; create index interval on interval(interval); drop table interval; remove interval;...
CREATE TABLE bag_mutaties_file ( id NUMBER(20) PRIMARY KEY, date_from DATE NOT NULL, date_to DATE NOT NULL, content BLOB NULL, status NUMBER(1) DEFAULT 0 NOT NULL, CONSTRAINT u_bag_mutaties_file UNIQUE (date_from) ); CREATE TABLE bag_mutatie ( id NUMBER(20) PRIMARY KEY, ...
<filename>timeregistration-parent-pom/timeregistration-common-pom/timeregistration-common-sql/src/main/resources/sql/views/timereg-views-user-password-create.sql create or replace view vw_user_password as SELECT `timereg`.`user_password`.`password`, `timereg`.`user_password`.`created` as password_created, `tim...
<filename>publiccms-parent/publiccms-core/src/main/resources/initialization/upgrade/V2016.0510-V2016.0828.sql -- 20160519 -- CREATE TABLE IF NOT EXISTS `log_upload` ( `id` bigint(20) NOT NULL auto_increment, `site_id` int(11) NOT NULL COMMENT '站点ID', `user_id` int(11) NOT NULL COMMENT '用户ID', `channel` varchar...
create extension fuzzystrmatch; create extension unaccent; drop index idx_feature_name_trigrams; create or replace function unaccent(text) returns text immutable strict language "sql" AS $$ select (coalesce(ts_lexize('unaccent',$1),ARRAY[$1]))[1]; $$; CREATE OR REPLACE FUNCTION trigrams_array(word text) ...
<reponame>dawsonlp/herd /* * Copyright 2015 herd contributors * * 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/licenses/LICENSE-2.0 * * Unless required by applic...
<reponame>JeromeRocheteau/emit INSERT INTO `topics` (`name`,`prefix`,`suffix`,`leaf`) VALUES (?,?,?,?);
<reponame>OHDSI/Circe-be<filename>src/main/resources/resources/cohortdefinition/sql/customEraStrategy.sql -- custom era strategy with ctePersons(person_id) as ( select distinct person_id from @eventTable ) select person_id, drug_exposure_start_date, drug_exposure_end_date INTO #drugTarget FROM ( select de.PERSON_ID...
---------------------------------------------------------------------------------- -- Table Name: [dbo].[PlanMiner_IndexOperations] -- -- Desc: This table contains information about the index operations (scan, seek, update, delete...) performed in -- an operation (node) in the execution plan mined out -- -- Columns: ...
<reponame>My-Colaborations/ada-awa pragma synchronous=OFF; /* Copied from awa-drop-sqlite.sql*/ /* File generated automatically by dynamo */ DROP TABLE IF EXISTS `awa_user`; DROP TABLE IF EXISTS `awa_session`; DROP TABLE IF EXISTS `awa_email`; DROP TABLE IF EXISTS `awa_access_key`; DROP TABLE IF EXISTS `awa_permission`...
<filename>fixtures/doctests/ddl/028/input.sql<gh_stars>0 CREATE TABLE products ( product_no integer PRIMARY KEY, name text, price numeric ); CREATE TABLE orders ( order_id integer PRIMARY KEY, shipping_address text, ... ); CREATE TABLE order_items ( product_no integer REFERENCES products, ...
<reponame>radoy/kasir ALTER TABLE order_detail ADD COLUMN orderDetailPorsi int;
<reponame>ColmanWebster/hw12_employees DROP DATABASE IF EXISTS employees_db; CREATE DATABASE employees_db; USE employees_db; CREATE TABLE department ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(50) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE role ( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(50) NOT NUL...
<gh_stars>0 CREATE TABLE notes ( id INTEGER PRIMARY KEY AUTOINCREMENT, note VARCHAR NOT NULL ); insert into notes (note) values('one'); insert into notes (note) values('two'); insert into notes (note) values('three');
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 20, 2020 at 12:34 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.2.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 25-Fev-2020 às 01:53 -- Versão do servidor: 10.4.8-MariaDB -- versão do PHP: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
<gh_stars>1-10 USE `alph`; SET GLOBAL log_bin_trust_function_creators = 1; DROP FUNCTION IF EXISTS `MACADDRESS`; DROP FUNCTION IF EXISTS `GENERATE_PRIVATE_IP`; DROP FUNCTION IF EXISTS `GENERATE_PUBLIC_IP`; DROP FUNCTION IF EXISTS `SPLIT_STR`; DROP FUNCTION IF EXISTS `IdDirectoryFromPath`; DROP FUNCTION IF EXISTS `IdF...
-- Add index ALTER TABLE action.actionplan ADD CONSTRAINT name_key UNIQUE (name);
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50516 Source Host : localhost:3306 Source Database : cms-canvas Target Server Type : MYSQL Target Server Version : 50516 File Encoding : 65001 Date: 2014-05-31 15:25:21 */ SET FOREIGN_KEY_CHECKS=0; --...
<gh_stars>1-10 -- MySQL dump 10.13 Distrib 8.0.22, for Linux (x86_64) -- -- Host: localhost Database: laravel_pweb -- ------------------------------------------------------ -- Server version 8.0.22 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER...
<reponame>richardswinbank/sprockit<filename>SprockitDb/Sprockit.Tests/sprockit__internal_ManageLogs/test GIVEN retention period in range THEN events deleted.sql CREATE PROCEDURE sprockit__internal_ManageLogs.[test GIVEN retention period in range THEN events deleted] AS -- ARRANGE DECLARE @cutoff DATETIME = '2021-07-0...
DELIMITER $$ DROP TABLE IF EXISTS `multi_key` $$ CREATE TABLE `multi_key` ( `first_id` int(11) NOT NULL, `my second id` varchar(45) COLLATE utf8_unicode_ci NOT NULL, `data` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `ME_BLOB` longblob, PRIMARY KEY (`first_id`,`my second id`) ) ENGINE=InnoDB DEFAULT CHA...
-- triggerC.test -- -- execsql { -- CREATE TABLE t2(a PRIMARY KEY); -- } CREATE TABLE t2(a PRIMARY KEY);
-- -- Database: `ignitedcms` -- -- -------------------------------------------------------- -- -- Table structure for table `assets` -- CREATE TABLE `assets` ( `id` int(11) NOT NULL, `name` varchar(300) NOT NULL, `fullsize` varchar(300) NOT NULL, `inactive` int(11) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=10 DE...
ALTER TABLE testcenter.dictionary MODIFY COLUMN dicitmevalue varchar(200) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '字典项值';
DROP DATABASE IF EXISTS employeetracker; CREATE DATABASE employeetracker; USE employeetracker; -- order matters so department first,roles and then employee TABLE CREATE TABLE Departments ( id INT NOT NULL AUTO_INCREMENT, Name VARCHAR(30) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE Roles ( id INT NOT NULL AUTO_IN...
DELETE FROM script_texts WHERE entry=-1604029; INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1604029,'%s transforms into a Mammoth!',14724,2,0,0,'moorabi EMOTE_TRANSFORMED');
CREATE TABLE IF NOT EXISTS `tags` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` char(128) UNIQUE COMMENT '标签名称', `alias` char(128) DEFAULT NULL COMMENT '标签别名', `sta...
-- 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. PRINT N'Creating primary key [StudentAcademicRecor...
/* Additional updates to DB stucture, as Python's model.py has limited abilities to do this */ DROP INDEX IF EXISTS well_latlong CASCADE; CREATE INDEX well_latlong ON well (latitude, longitude); DROP INDEX IF EXISTS bcgs_number_idx CASCADE; CREATE INDEX bcgs_number_idx ON bcgs_number (bcgs_number); COMMENT ON TABLE a...
<reponame>puppetlabs/phabricator<filename>resources/sql/patches/044.countdown.sql CREATE DATABASE IF NOT EXISTS phabricator_countdown; CREATE TABLE phabricator_countdown.countdown_timer ( id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, title VARCHAR(255) NOT NULL, authorPHID VARCHAR(64) BINARY NOT NULL, d...
-- BP 6.1D content: domain syschar: 3 INSERT INTO S_DOM VALUES (2232558, 'wims', 'This domain contains instance triplets related in various interesting ways: 1:1:1:1, 1:M:1:1, 1:1:M:1, M:1:1:1, 1:1:1:M, etc. Referential attributes are distributed variously for even better test coverage. The associative cases (1:1...
SELECT scratch_pads.id as id, scratch_pads.environment_data_id as environment_data_id, scratch_pads.name as name, scratch_pads.code as code, scratch_pads.data as data FROM scratch_pads, remote_endpoint_environment_data, remote_endpoints, apis WHERE scratch_pads.environment_data_id = remote_endpoint_environmen...
<reponame>grewscant/comp-sci-term-assignments INSERT INTO `time` ( day, month, year, quarter ) VALUES ( 3, 8, 2020, 3 ),( 1, 2, 2021, 1 ),( 2, 3, 2021, 4 ),( 1, 10, 2021, 2 ); INSERT INTO `item` ( brand, ...
-- Set up the necessary means for our pseudo-randomized ID-generation. -- The basic idea is that there is a `sequence` and an XTEA encryption key -- -- To use these facilities for a table, just call -- -- ```sql -- call prepare_randomized_ids('my_entity'); -- ``` -- -- where `'my_entity'` is just some descriptive name ...
<filename>query/mariadb/mariadb_server_public_network_access_disabled.sql select -- Required Columns s.id as resource, case when public_network_access = 'Enabled' then 'alarm' else 'ok' end as status, case when public_network_access = 'Enabled' then name || ' public network access enabled.' el...
SELECT 1 AS a \gset \echo :a \\ SELECT :a; \unset a SELECT 'test' \g testfile.txt \! cat testfile.txt SELECT CURRENT_TIMESTAMP; \watch 3
CREATE SEQUENCE IF NOT EXISTS MT_SEQ_USERS START WITH 1 INCREMENT BY 1; CREATE SEQUENCE IF NOT EXISTS MT_SEQ_TAGS START WITH 1 INCREMENT BY 1; CREATE SEQUENCE IF NOT EXISTS MT_SEQ_FILTERS START WITH 1 INCREMENT BY 1; CREATE SEQUENCE IF NOT EXISTS MT_SEQ_RULES START WITH 1 INCREMENT BY 1; CREATE SEQU...
--special input SELECT JSON_PRETTY('{}'); SELECT JSON_PRETTY(NULL); SELECT JSON_PRETTY('NULL'); --invalid input SELECT JSON_PRETTY('[1:2]'); SELECT JSON_PRETTY('{"a","10","b","15","x","25"}'); --select from table drop if exists t1; create table t1(id int auto_increment primary key, c json); insert into t1(c) val...
CREATE DATABASE IF NOT EXISTS `banhda` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `banhda`; -- MySQL dump 10.13 Distrib 5.5.35, for debian-linux-gnu (x86_64) -- -- Host: 127.0.0.1 Database: banhda -- ------------------------------------------------------ -- Server version 5.5.35-0ubuntu0.12.04.2 /*!40101 SET @...
DROP TABLE IF EXISTS `shop_admin`; CREATE TABLE IF NOT EXISTS `shop_admin` ( `adminid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID', `adminuser` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '管理员账号', `adminpass` CHAR(32) NOT NULL DEFAULT '' COMMENT '管理员密码', `adminemail` VARCHAR(50) NOT NULL DEFAULT '' COMMENT ...
SELECT Count(EventUrl) AS Count, EventUrl, MIN(EventTime) AS 'Event First Date', MAX(EventTime) AS 'Event Last Date', EventUrlReferrer as 'Referrer' FROM CMS_EventLog WHERE EventCode LIKE 'PAGENOTFOUND' GROUP BY EventUrl, EventUrlReferrer ORDER BY Count DESC
-- -- PostgreSQL database dump -- -- Dumped from database version 9.6.3 -- Dumped by pg_dump version 9.6.3 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min...
USE SoftUni GO CREATE PROCEDURE dbo.usp_GetTownsStartingWith (@String NVARCHAR(MAX)) AS SELECT [Name] FROM Towns WHERE LEFT([Name], LEN(@String)) = @String GO EXECUTE usp_GetTownsStartingWith @String = 'b' GO
<filename>portalwisata (4).sql -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 28, 2019 at 09:24 PM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone...
SELECT DISTINCT CITY FROM STATION WHERE CITY LIKE 'A%' OR CITY LIKE 'E%' OR CITY LIKE 'I%' OR CITY LIKE 'O%' OR CITY LIKE 'U%'
<gh_stars>0 CREATE TABLE [Audit].[AuditProductVendor] ( [AuditId] UNIQUEIDENTIFIER NOT NULL ROWGUIDCOL ,[AuditStatus] TINYINT NOT NULL ,[AuditAppUser] UNIQUEIDENTIFIER NOT NULL ,[AuditSqlUser] VARCHAR(256) NOT NULL ,[AuditDate] DATETIME NOT NULL ,[AuditBatchId]...
CREATE PROCEDURE [dbo].[spItems_GetByVendorId] @OwnerId int AS begin set nocount on; select [Id], [Name], [Description], [Price], [Sold], [OwnerId], [PaymentDistributed] from dbo.Items where OwnerId = @OwnerId; end
<reponame>SaltDogProject/SaltDog<gh_stars>0 -- This file is part of the Saltdog SQLite database -- Thanks to Zotero Schema! -- Used to init db structure DROP TABLE IF EXISTS charsets; CREATE TABLE charsets ( charsetID INTEGER PRIMARY KEY, charset TEXT UNIQUE ); CREATE INDEX charsets_charset ON charsets(charset...
-- MySQL dump 10.13 Distrib 5.7.24, for Win64 (x86_64) -- -- Host: localhost Database: sodermee -- ------------------------------------------------------ -- Server version 5.7.24 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*...
<gh_stars>0 DELIMITER $$ DROP procedure IF EXISTS `getUserActiveFeatureByGUID`; CREATE PROCEDURE `getUserActiveFeatureByGUID`( IN target_guid VARCHAR(255) ) BEGIN SELECT ft1.feature_name FROM user_game_state ugs1 JOIN feature_type ft1 ON ft1.feature_id = ugs1.active_feature JOIN user u1 ON u1.user_id = ...
<gh_stars>1-10 -- MySQL dump 10.13 Distrib 5.5.49, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: ha_watch -- ------------------------------------------------------ -- Server version 5.5.49-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER...
SELECT ROUND(SUM(LAT_N),4) FROM STATION WHERE LAT_N>38.7880 AND LAT_N<137.2345
-- fkey2.test -- -- execsql { -- INSERT INTO t1 VALUES(1, 2); -- INSERT INTO t1 VALUES(2, 3); -- INSERT INTO t2 VALUES(1, 'A'); -- } INSERT INTO t1 VALUES(1, 2); INSERT INTO t1 VALUES(2, 3); INSERT INTO t2 VALUES(1, 'A');
<reponame>jdkoren/sqlite-parser -- view.test -- -- execsql { -- DROP VIEW test; -- CREATE VIEW test AS -- SELECT test1.id, a, b -- FROM test1 JOIN test2 USING(id); -- SELECT * FROM test; -- } DROP VIEW test; CREATE VIEW test AS SELECT test1.id, a, b FROM test1 JOIN test2 USING(id); SELECT * FRO...
<reponame>Monaqo/accountgo ALTER TABLE [dbo].[SalesInvoiceLine] WITH CHECK ADD CONSTRAINT [FK_dbo.SalesInvoiceLine_dbo.InventoryControlJournal_InventoryControlJournalId] FOREIGN KEY([InventoryControlJournalId]) REFERENCES [dbo].[InventoryControlJournal] ([Id]) GO ALTER TABLE [dbo].[SalesInvoiceLine] WITH CHECK ADD ...
<filename>layers/landuse/landuse.sql<gh_stars>1-10 -- etldoc: ne_50m_urban_areas -> landuse_z4 CREATE OR REPLACE VIEW landuse_z4 AS ( SELECT NULL::bigint AS osm_id, geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, scalerank FROM ne_50m_urban_areas WHERE scalerank <= 2 ...
<gh_stars>1-10 /* Navicat MySQL Data Transfer Source Server : 127.0.0.1 Source Server Version : 50553 Source Host : 127.0.0.1:3306 Source Database : tp_5.0.5_new Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2017-10-06 17:23:14 */ SET FOREIGN...
<gh_stars>10-100 /* Copyright (c) 2006-2013 Regents of the University of Minnesota For licensing terms, see the file LICENSE. */ /* This script indexes columns so that the next few scripts run efficiently. */ /* Run this script once against each instance of Cyclopath @once-per-instance */ \qecho ...
create table accounts ( id serial constraint accounts_pk primary key, account_id text, region text ); create unique index accounts_account_id_region_uindex on accounts (account_id, region); INSERT INTO accounts(region, account_id) SELECT (regexp_match(availability_zone, '[a-z]+-[a-...
<gh_stars>100-1000 create schema test_case; set search_path=test_case; -- no index create table a(a int ,b text, c timestamptz); insert into a values(1,'test','1999-01-08 04:05:06'); insert into a values(2,'test','1999-01-08 04:05:06'); insert into a values(3,'test','1999-01-08 04:05:06'); update a set b = 'test1';...
<reponame>jkuharev/ISOQuant<filename>src/isoquant/plugins/configuration/init_config_storage.sql<gh_stars>0 -- @ initializing configuration storage ... DROP TABLE IF EXISTS config_storage; CREATE TABLE config_storage ( k VARCHAR(512) NOT NULL, v VARCHAR(1024), PRIMARY KEY(k) ); -- @ initializing configuration storage...
-- @testpoint:删除不存在的函数,省略IF EXISTS 子句并且省略函数参数,合理报错 --从pg_proc表查询函数名是u_testfun76,该函数不存在 select proname from pg_proc where proname='u_testfun76'; --删除不存在的函数u_testfun76,合理报错 drop FUNCTION u_testfun76;
-- MySQL dump 10.13 Distrib 8.0.25, for Win64 (x86_64) -- -- Host: localhost Database: bikemania -- ------------------------------------------------------ -- Server version 8.0.25 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /...
<filename>db.sql -- -- PostgreSQL database dump -- -- Dumped from database version 12.4 (Debian 12.4-1.pgdg100+1) -- Dumped by pg_dump version 12.4 (Debian 12.4-1.pgdg100+1) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conform...
<reponame>Enxhis/Employee-Tracker USE employees_db; -- populate department table with values INSERT INTO department (name) VALUES ('Engineering'), ('Finance'), ('Sales'), ('Legal'); -- populate role table with values INSERT INTO role (title, salary, department_id) VALUES ('Lead Engineer', ...
<filename>project1V2Project/project1V2/project1V2/bin/target/classes/data.sql INSERT INTO ITEMS (itemName, itemCategory, itemPrice) VALUES ('TacoKit', 'Food', 0.59); INSERT INTO ITEMS (itemName, itemCategory, itemPrice) VALUES ('DrumSet', 'Instruments', 250.00); INSERT INTO ITEMS (itemName, itemCategory, itemPrice) VAL...
/* Warnings: - Added the required column `isVerified` to the `UserAuth` table without a default value. This is not possible if the table is not empty. */ -- AlterTable ALTER TABLE "UserAuth" ADD COLUMN "isVerified" BOOLEAN NOT NULL; -- RenameIndex ALTER INDEX "UserAuth_userId_unique" RENAME TO "UserAuth_user...
<gh_stars>0 Begin for c in (select table_name from user_tables) loop execute immediate ('drop table '||c.table_name||' cascade constraints'); end loop; End; / CREATE TABLE MEMBERSHIP ( MEM_NUM CHAR(3) CONSTRAINT MEMBER_MEM_NUM_PK PRIMARY KEY, MEM_FNAME VARCHAR(30) NOT NULL, MEM_LNAME VARCHAR(30) NOT NULL, MEM_STR...
-- This query needs to select the following columns: -- -- * From the "instructions" table: -- * list_order -- * specification -- -- The results must be in ascending order of the value found in "list_order". -- -- If you return more columns, they will be ignored. -- -- It needs to include a single positional ...
-- Update all emails addresses update sales_flat_quote set customer_email = concat('noname+', customer_id, '@gmail.com') where customer_id is not null; update sales_flat_quote_address set email = concat('noname+', customer_id, '@gmail.com') where customer_id is not null; update sales_flat_quote_address set email = conc...
insert into postal_code(id, code) values(UUID_TO_BIN('57619ffe-0fd6-4077-b389-ee17066ca924'), '24000'); insert into postal_code(id, code) values(UUID_TO_BIN('af321e6a-aa97-42b6-8588-1be890039b3b'), '24010'); insert into postal_code(i...
DROP TABLE IF EXISTS SERVER_DISKS; CREATE TABLE hosts ( server_name VARCHAR(255), disk_label VARCHAR(255), disk_used VARCHAR(100), disk_total_size VARCHAR(100) ); INSERT INTO hosts (server_name,disk_label,disk_used,disk_total_size) VALUES ("mailserver1","/domino/notesdata", "60.99GB","159.92GB"); INSER...
-- 数据删除 DELETE FROM customers WHERE cust_id = 10007;
<filename>sami_Database_Mysql/running_shoes.sql -- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Värd: localhost -- Skapad: 04 maj 2016 kl 22:08 -- Serverversion: 5.5.46-0ubuntu0.14.04.2 -- PHP-version: 5.5.9-1ubuntu4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; ...
/* Warnings: - You are about to drop the column `filesUrl` on the `Entry` table. All the data in the column will be lost. - You are about to drop the column `htmlUrl` on the `Entry` table. All the data in the column will be lost. - Added the required column `pullRequestFilesUrl` to the `Entry` table without a ...
-- more line item updates for the initial project UPDATE `line_item_categories` SET `title` = 'travel and field study costs' WHERE `line_item_categories`.`id` =4 LIMIT 1 ;
DROP DATABASE IF EXISTS characters_db; CREATE DATABASE characters_db; USE characters_db; CREATE TABLE department ( id INT NOT NULL AUTO_INCREMENT, department_name VARCHAR(30), PRIMARY KEY (id) ); CREATE TABLE role ( id INT NOT NULL AUTO_INCREMENT, role_title VARCHAR(30), salary DECIMAL(9.2...
<gh_stars>10-100 set define off prompt INSTALLING DEMO... @@at_rep.pck @@at_rep_define_tasks.sql prompt DONE set define on
<reponame>iuri/tutortronics -- Drop procedural database code for the workflow package, a package in the OpenACS system. -- -- @author <NAME> (<EMAIL>) -- @author <NAME> (<EMAIL>) -- -- This is free software distributed under the terms of the GNU Public -- License. Full text of the license is available from the GNU Pro...
INSERT INTO tipos (descripcion) VALUES ('NE NOVELA EN ESPAÑOL'); INSERT INTO tipos (descripcion) VALUES ('NX NOVELA EXTRANJERA'); INSERT INTO tipos (descripcion) VALUES ('POESIA'); INSERT INTO tipos (descripcion) VALUES ('SALAMANCA'); INSERT INTO tipos (descripcion) VALUES ('TURISMO, VIAJES, CIUDADES'); INSERT INTO tip...
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50505 Source Host : localhost:3306 Source Database : zjds Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2018-11-29 18:03:38 */ SET FOREIGN_KEY_CHECKS=0; --...
<gh_stars>0 CREATE VIEW items_open AS SELECT i.sku , i.upc , i.name , i.description , i.acquisition_date , i.expiration_date , i.unit_cost , i.unit_price , i.quantity_available , i.quantity_sold , m.additional_notes , m.metakey , m.open...
<reponame>krystalics/L-sql create table myTable( id int default 1 comment "我是id", name string ); insert into table a (c1,c2,c3) values (1,2,3),(2,3,4); select * from myTable;
<gh_stars>10-100 ALTER TABLE stactionruns ADD COLUMN `tag` varchar(255) DEFAULT NULL AFTER `status`;
<reponame>Ed-Fi-Exchange-OSS/Ed-Fi-to-Generate -- 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. US...
--Now we define the argument tables for available BGW policies. CREATE TABLE IF NOT EXISTS _timescaledb_config.bgw_policy_reorder ( job_id INTEGER PRIMARY KEY REFERENCES _timescaledb_config.bgw_job(id) ON DELETE CASCADE, hypertable_id INTEGER UNIQUE NOT NULL REFERENCES _timescaledb_cat...
<filename>spring-data-jdbc/src/test/resources/sql/create_table_t2.sql --jdbc:SCHEME create table ${tableName} ( t2_id Int32, t1_id Int32, value Utf8, primary key (t2_id) )
-- -- create the sequence -- DO $$ BEGIN BEGIN CREATE SEQUENCE "api"."channel_link_id_seq" INCREMENT 1 START 1 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1; EXCEPTION WHEN duplicate_table THEN RAISE NOTICE 'api.channel_link_id_seq sequence already exists'; END; END; $$; -- grant the usa...
--INSERT INTO ESPM_CART(ITEM_ID, CUSTOMER_ID, PRODUCT_ID, QUANTITY, CHECK_OUT_STATUS) VALUES('000000000C1','0000000001','P1', 4.0 ,FALSE); --INSERT INTO ESPM_CART(ITEM_ID, CUSTOMER_ID, PRODUCT_ID, QUANTITY, CHECK_OUT_STATUS) VALUES('000000000C2','0000000002','P2', 5.0 ,TRUE); --INSERT INTO ESPM_CART(ITEM_ID, CUSTOMER_...
-- Revert phoebot:ignore from pg BEGIN; DROP TABLE ignore; COMMIT;
<gh_stars>0 /* pg_dbms_stats/pg_dbms_stats--1.0--1.3.2.sql */ -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "ALTER EXTENSION pg_dbms_stats UPDATE TO '1.3.2'" to load this file. \quit -- Nothing to do from 1.3.1 (named as '1.0':-)
CREATE TABLE country ( code CHAR(2) NOT NULL PRIMARY KEY, name CHAR(52) NOT NULL, population INT(11) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO country VALUES ('AU','Australia',18886000); INSERT INTO country VALUES ('BR','Brazil',170115000); INSERT INTO country VALUES ('CA','Canada',1147000)...
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW [Profile.Data].[vwPublication.Entity.General] AS SELECT e.EntityID, g.MedlineTA, g.JournalTitle Journal, g.Authors FROM [Profile.Data].[vwPublication.Entity.InformationResource] e, [Profile.Data].[Publication.PubMed.General] g WHERE e.pmid = g.pmid AN...
--DO NOT MODIFY THIS FILE, IT IS GENERATED AUTOMATICALLY FROM SOURCES -- Complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION cdb_dataservices_server" to load this file. \quit CREATE TYPE cdb_dataservices_server.simple_route AS ( shape geometry(LineString,4326), le...
/** Intentionally left down migrations for function groups out. If an OEM runs a down migration, we do not want to delete functional groups that may have been updated. **/ -- DROP AFFECTED VIEWS -- DROP VIEW IF EXISTS view_mapped_permissions_production; DROP VIEW IF EXISTS view_mapped_permissions_staging; DROP VIEW IF...
-- @testpoint:opengauss关键字dispatch(非保留),自定义数据类型名为dispatch --关键字dispatch作为数据类型不带引号,创建成功 drop type if exists dispatch; CREATE TYPE dispatch AS (f1 int, f2 text); select typname from pg_type where typname ='dispatch'; drop type dispatch; --关键字dispatch作为用户名加双引号,创建成功 drop type if exists "dispatch"; CREATE TYPE "dispatch"...
-- @testpoint:opengauss关键字server(非保留),作为数据库名 --关键字不带引号-成功 drop database if exists server; create database server; drop database server; --关键字带双引号-成功 drop database if exists "server"; create database "server"; drop database "server"; --关键字带单引号-合理报错 drop database if exists 'server'; create database 'server'; --关键字带反...