sql
stringlengths
6
1.05M
<filename>src/test/resources/sql/create_type/eade1f99.sql -- file:rangetypes.sql ln:454 expect:true create type two_ints as (a int, b int)
ALTER TABLE master_keys RENAME private_key TO private_key_der; ALTER TABLE master_keys RENAME public_key TO public_key_der; ALTER TABLE master_keys ADD COLUMN private_key_pem BYTEA, ADD COLUMN public_key_pem BYTEA;
update `creature_template` set `ScriptName` = 'boss_malygos' where `entry` = 28859; update `instance_template` set `ScriptName` = 'instance_eye_of_eternity' where `map` = '616'; update `gameobject` set `phaseMask`=65536, `spawntimesecs`='-604800' where id in(193905,193967); update `gameobject_template` set `faction`=0...
/*==============================================================*/ /* Table: uaa_office */ /*==============================================================*/ insert into uaa_office (id,parent_id,seq,level,full_path,office_name,description,tenant_id,office_code,created_by,creat...
<gh_stars>1-10  create procedure ProcWithWriteOnlyVariableSetBySelect as begin declare @A int -- @A is only written to. This should be flagged as a problem select @a = 1 end
<gh_stars>1-10 /* ******************************************************************************************************* Copyright (C) 2019-Present Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the under the Apache License, Version 2.0 (th...
<reponame>machine-intelligence/arbital-open-source<filename>schemas/users.sql /* An entry for every user that has ever done anything in our system. */ CREATE TABLE users ( /* PK. User's unique id. */ id VARCHAR(32) NOT NULL, /* Date this user was added to the table. */ createdAt DATETIME NOT NULL, /* User's email....
<filename>apgdiff.tests/src/main/resources/cz/startnet/utils/pgdiff/depcies/chg_fts_statements_usr_configuration_diff.sql SET search_path = pg_catalog; ALTER TEXT SEARCH CONFIGURATION public.first_configuration ALTER MAPPING FOR tag WITH public.first_dictionary;
<filename>schema/hdb/decodes63to64.sql<gh_stars>1-10 -------------------------------------------------------------------------- -- This script updates DECODES tables from an USBR HDB 6.3 CCP Schema to -- OpenDCS 6.4 Schema. -- -- See the README file in this folder for instructions. ------------------------------------...
<reponame>khuddlefish/gpdb -- start_ignore SET gp_create_table_random_default_distribution=off; -- end_ignore -- -- CT Heap Part Table 1 -- CREATE TABLE ct_heap_alter_part_add_col1 (id int, rank int, year date, gender char(1)) DISTRIBUTED BY (id, gender, year) partition by list (gender) subpartition by range (year) sub...
-- Initialize the database. -- Drop any existing data and create empty tables. DROP TABLE IF EXISTS tuser; DROP TABLE IF EXISTS tprops; CREATE TABLE tuser ( id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT UNIQUE NOT NULL, password TEXT NOT NULL ); CREATE TABLE tprops ( id INTEGER PRIMARY KEY AUTOINCREMEN...
--+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; create table t(d double); --test create index idx on t(ceil(d)); --test drop index idx on t(ceil(d)); create index idx on t(ceil(d)); --test drop index idx on t; drop table t; set system parameters 'dont_reuse_heap_file=no'; commit; --+ holdcas off;
h5stat error: Invalid threshold for small datasets
<filename>database/RankScores.sql<gh_stars>0 -- Source : https://leetcode.com/problems/rank-scores/ -- Author : <NAME> -- Date : 2018-04-03 /*************************************************************************************** * * Write a SQL query to rank scores. If there is a tie between two scores, both sh...
<filename>spkdb.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 27, 2019 at 12:16 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...
<reponame>MS-BI/JobExceutionFramework CREATE TABLE [etljob].[Client] ( [ClientID] INT IDENTITY (1, 1) NOT NULL, [Client] NVARCHAR (255) NULL, CONSTRAINT [PK__Client__E67E1A047DBC5BF8] PRIMARY KEY CLUSTERED ([ClientID] ASC) );
INSERT INTO citation_datasource_municipality (citation_datasource_id,municipality_id) VALUES (2,1); #Clayton INSERT INTO datasource_municipality_mapping (citation_datasource_id,municipality_id,datasource_municipality_identifier) VALUES (2,1,'BW'); #Ballwin INSERT INTO rejis_court_mapping (court_id,rejis_court_identifie...
<reponame>segor/zno-opendata CREATE SCHEMA [zno2016]
<gh_stars>1-10 SELECT d.id, d.value, ci.number_format, itt.name as 'indicator_type_name', stt.name_singular as 'shape_type_name', st.common_id, st.common_name, if (ci.ancestry is null, cit.name, concat(cit.name, " (", cit_parent.name_abbrv, ")")) as 'indicator_name', if(ci.ancestry is null OR (ci.ancestry is not nul...
<gh_stars>1-10 -- 角色表 DROP TABLE IF EXISTS `sys_role`; CREATE TABLE `sys_role` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '角色ID', `name` varchar(255) DEFAULT NULL COMMENT '角色名称', `cn_name` varchar(255) DEFAULT '' COMMENT '权限名称', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COM...
if exists (select * from INFORMATION_SCHEMA.ROUTINES where ROUTINE_NAME = 'spTEAM_MEMBERSHIPS_UpdateImplicit' and ROUTINE_TYPE = 'PROCEDURE') Drop Procedure dbo.spTEAM_MEMBERSHIPS_UpdateImplicit; GO /***************************************************************************************************************...
<filename>data/starter_query.sql<gh_stars>0 drop table if exists salary cascade; drop table if exists title cascade; drop table if exists department_manager cascade; drop table if exists department_employee cascade; drop table if exists department cascade; drop table if exists employee cascade; create table employee ( ...
<gh_stars>1-10 SELECT * FROM {{ name }}.br_abrinq_oca.primeira_infancia_municipios LIMIT 1000
<reponame>vsrts/multishop -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Хост: localhost -- Время создания: Июн 17 2019 г., 10:45 -- Версия сервера: 5.7.25-28-log -- Версия PHP: 7.1.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
<gh_stars>0 -- @testpoint: 分区名字不符合标识符规范,合理报错 create table partition_table( col_1 smallint, col_2 char(30), col_3 int, col_4 date not null, col_5 boolean, col_6 nchar(30), col_7 float ) partition by range (col_4) interval ('1 month') ( partition partition-table values less than ('2020-02-29') ); create table partitio...
<gh_stars>0 INSERT INTO department (id, name) VALUES (1, "Engineer"); INSERT INTO department (id, name) VALUES (2, "Science"); INSERT INTO department (id, name) VALUES (3, "Math"); INSERT INTO department (id, name) VALUES (4, "Art"); INSERT INTO role (id, title, salary, department_id) VALUES (1, "Manager", 42000, ...
-- github.com/CodeNameKND14 SELECT distinct CITY from STATION where MOD(id,2) = 0;
UPDATE utbetaling SET neste_paminnelsetidspunkt=now() WHERE id IN ( 'bf8d5ed1-c4f2-400b-896b-717d3f595f86', '7d540021-8562-4cbd-b21e-40f00b142208', 'ae7838b6-3261-4073-9a90-6d4ccc3b0c08', 'f95d11ed-abd3-412a-8f3d-317223b7d6be' );
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN...
<gh_stars>0 -- Adminer 4.3.1 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP TABLE IF EXISTS `perevents`; CREATE TABLE `perevents` ( `perevent_id` int(11) NOT NULL AUTO_INCREMENT, `uid` varchar(255) NOT NULL, `exec_map` text NOT NULL,...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 1172.16.58.3 -- Waktu pembuatan: 19 Mar 2021 pada 06.41 -- Versi server: 10.4.17-MariaDB -- Versi PHP: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=...
<gh_stars>0 UPDATE sys_menu SET parent_id = NULL WHERE parent_id = 0;
GRANT SELECT ON pg_table_size TO public; GRANT SELECT ON pg_db_size TO public; GRANT SELECT ON pg_cached_size TO public; GRANT SELECT ON pg_sql TO public;
<reponame>tushartushar/dbSmellsData CREATE TABLE #{PGconn.quote_ident(table.name) CREATE TABLE numeric_types_basics ( id int, f_tinyint TINYINT, f_smallint SMALLINT, f_mediumint MEDIUMINT, f_int INT, f_integer INTEGER, f_bigint BIGINT, f_real REAL, f_double DOUBLE, f_float FLOAT, f_decimal DECIMAL, f_numeric NUMERIC) S...
<filename>api/sql/method.sql WITH full_thing AS ( SELECT -- not user editable id, EXTRACT(EPOCH FROM post_date) as post_date, EXTRACT(EPOCH FROM updated_date) as updated_date, featured, completeness, -- user-contributed content texts.title, texts.description, texts.body, -- me...
<gh_stars>1-10 CREATE USER [aer-reader] WITH PASSWORD = '<PASSWORD>!'; GO; GRANT CONNECT TO [aer-reader];
ALTER TABLE "public"."turn_scorings" ADD COLUMN "game_id" uuid; ALTER TABLE "public"."turn_scorings" ALTER COLUMN "game_id" DROP NOT NULL; ALTER TABLE "public"."turn_scorings" ADD CONSTRAINT turn_scorings_game_id_fkey FOREIGN KEY (game_id) REFERENCES "public"."games" (id) ON DELETE restrict ON UPDATE restrict;
SELECT EmployeeID, FirstName,LastName,d.[Name] AS DepartmentName FROM Employees e JOIN Departments d ON e.DepartmentID = d.DepartmentID WHERE d.[Name] = 'Sales' ORDER BY EmployeeID
<gh_stars>1-10 IF EXISTS(SELECT * FROM sys.indexes WHERE name='IX_uCommerce_UserGroup_ExternalId' AND object_id = OBJECT_ID('uCommerce_UserGroup')) BEGIN DROP INDEX [IX_uCommerce_UserGroup_ExternalId] ON [dbo].[uCommerce_UserGroup]; END GO IF EXISTS(SELECT * FROM sys.indexes WHERE name='IX_uCommerce_Category_Prod...
<filename>api/db/migrations/000002_create_parties_table.up.sql CREATE TABLE IF NOT EXISTS parties ( id serial NOT NULL, host_id int4 NULL, "name" VARCHAR (355) NULL, "comments" VARCHAR (500) NULL, CONSTRAINT parties_pkey1 PRIMARY KEY (id) );
<reponame>Gigelf-evo-X/evo-X DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533039 AND -1533000; INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES (-1533000,'Ahh... welcome to my parlor.',8788,1,0,'anubrekhan SAY_GREET'), (-1533001,'Just a little taste...',8785,1,0,'a...
create or replace package sec_session_property as procedure upsert ( p_session_id in sec_session_properties.session_id%TYPE, p_module in sec_session_properties.module%TYPE, p_name in sec_session_properties.property_name%TYPE, p_value in sec_session_properties.property_val...
<reponame>tbowan/luchronia #------------------------------------------------------------------------------ # Suppression de la table des ruines enfouies #------------------------------------------------------------------------------ DROP TABLE game_building_lost ;
<filename>tiankx/sql/user_level_smooth.sql create table if not exists ( date string comment '日期', name string comment '姓名', id string comment '编号', level string comment '等级' ) ;
CREATE TABLE [dbo].[NewsReleaseTag] ( [ReleaseId] UNIQUEIDENTIFIER NOT NULL, [TagId] UNIQUEIDENTIFIER NOT NULL, CONSTRAINT [PK_NewsReleaseTag] PRIMARY KEY CLUSTERED ([ReleaseId] ASC, [TagId] ASC), CONSTRAINT [FK_NewsReleaseTag_NewsRelease] FOREIGN KEY ([ReleaseId]) REFERENCES [dbo].[NewsRelease] ([Id]...
<filename>src/main/resources/org/support/project/web/dao/sql/HashConfigsDao/HashConfigsDao_physical_select_on_key.sql SELECT * FROM HASH_CONFIGS WHERE SYSTEM_NAME = ? ;
<gh_stars>10-100 # --- !Downs ALTER TABLE hierarchyNode DROP COLUMN shortcut; # --- !Ups ALTER TABLE hierarchyNode ADD shortcut varchar(255);
select fn_db_add_column('vds_dynamic', 'hbas', 'text default null');
ALTER TABLE public.topper ADD COLUMN normal_map VARCHAR(255);
## Inicio popula tabela clientes insert into comclien values( 1 ,'0001','<NAME>' ,'AARONSON FURNITURE LTD' ,'2015-02-17 23:14:50', '17.807.928/0001-85', '(21) 8167-6584' ,'QUEIMADOS' ,'RJ' ); insert into comclien values( 2 ,'0002','LITTLER ' ,'LITTLER LTDA' ,'2015-0...
<filename>micromall-db/src/main/resources/db/migration/V11__create_spec_teble.sql SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for micromall_goods_sku -- ---------------------------- DROP TABLE IF EXISTS `micromall_goods_sku`; CREATE TABLE `micromall_goods_sku` ( `sku_id` bigint(20) N...
<reponame>opengauss-mirror/Yat -- @testpoint:使用insert...update语句插入一条数据,添加EXCLUDED关键字,主键列数据已存在,其他列数据已存在 --预置条件enable_upsert_to_merge为off drop table if exists products25; --建表,指定一列是主键 CREATE TABLE products25 ( product_no integer PRIMARY KEY, name text, price numeric ); --常规插入一条数据 insert into products25 valu...
<filename>scripts/sql-schema/mysql.patches.d/12.0.2.sql start transaction; create table if not exists unit_data ( unit_id bigint(20) unsigned, part_id varchar(50) not null, content text null, ts bigint(20) NOT NULL DEFAULT '0', response_type varchar(50), constraint unit_data_pk primary key (uni...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 02, 2022 at 05:42 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<filename>src/data/schema/class.sql -- -- class as in the abstract class of CSCI-1200 i.e. data structure, that has sections, that each have class_session -- drop table class; -- create table class( -- department varchar(255), -- level int, -- title varchar(255), -- ) -- consider having class maybe
ALTER TABLE `on_product` ADD COLUMN `user_id` int NOT NULL AFTER `category_id`, ADD CONSTRAINT `Product_Businessman` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`);
<gh_stars>0 -- имена тренеров чей возраст больше 20 и возраст спортсмена которого они тренируют больше 80 SELECT name FROM treners WHERE age > 20 AND EXISTS ( SELECT id FROM sportsmen WHERE sportsmen.id_trener = treners.id AND sportsmen.age > 80 );
<filename>back-end/server/services/federation-auth/prisma/migrations/20211104221754_removed_profile_fields/migration.sql /* Warnings: - You are about to drop the column `address` on the `User` table. All the data in the column will be lost. - You are about to drop the column `avatar` on the `User` table. All the...
print 'Running script 1.10.0-1100.sql'
alter table SEO_PAGES add UNESCAPED_FRAGMENT varchar(724) after ESCAPED_FRAGMENT, add INDEX ESCAPED_FRAGMENT (ESCAPED_FRAGMENT), add INDEX DOMAIN (DOMAIN); commit;
<gh_stars>1-10 -- MySQL dump 10.13 Distrib 5.6.15, for Linux (x86_64) -- -- Host: localhost Database: directory -- ------------------------------------------------------ -- Server version 5.6.15 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE...
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost:3306 -- Généré le : sam. 21 mars 2020 à 23:09 -- Version du serveur : 5.7.24 -- Version de PHP : 7.2.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
<reponame>BugsUK/FindApprenticeship<gh_stars>1-10 /* ------------------------------------------------------------------- Name : ReportGetFrameworkFor Description : returns ordered unique sector for framework History: -------- D...
<reponame>xaiguy/abstractions CREATE OR REPLACE VIEW venus.view_vtokens (symbol, contract_address, decimals, underlying_token_address) AS VALUES ('vBNB'::text, '\xa07c5b74c9b40447a954e1466938b865b6bbea36'::bytea, 8::numeric, '\xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c'::bytea), ('vAAVE'::text, '\x26DA28954763...
<gh_stars>10-100 ALTER TABLE `contacts` ADD UNIQUE ( `phone`, `contact_group_id` ); -- ALTER TABLE `contacts` ADD INDEX ( `created_at` ); -- -- Triggers `callees` -- DROP TRIGGER IF EXISTS `movetocouch`; DELIMITER // CREATE TRIGGER `movetocouch` AFTER INSERT ON `contacts` FOR EACH ROW BEGIN INSERT IGNORE INT...
<filename>src/sql/surgingdemo.sql<gh_stars>100-1000 SELECT * FROM auth_User IF OBJECT_ID ('dbo.auth_User') IS NOT NULL DROP TABLE dbo.auth_User GO CREATE TABLE dbo.auth_User ( Id BIGINT IDENTITY NOT NULL, TenantId INT, Name VARCHAR (50), Password ...
<reponame>FedorUporov/gridgain<gh_stars>100-1000 -- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0, -- and the EPL 1.0 (http://h2database.com/html/license.html). -- Initial Developer: H2 Group -- CREATE TABLE TEST(C1 VARCHAR, C2 CHARACTER VARYING, C3 VARCHAR2, C4 NVARCHAR, C5 NVARCHAR2, C6 VARCHAR_C...
USE BUDT758_DB_0504_10 DELETE FROM [TerpEats.Write]; DELETE FROM [TerpEats.Review]; DELETE FROM [TerpEats.Dine]; DELETE FROM [TerpEats.Employee]; DELETE FROM [TerpEats.Restaurant]; DELETE FROM [TerpEats.Menu]; DELETE FROM [TerpEats.Location]; DELETE FROM [TerpEats.Customer];
<gh_stars>1-10 SELECT t_s_secyear.customer_id ,t_s_secyear.customer_first_name ,t_s_secyear.customer_last_name FROM ( SELECT c_customer_id customer_id ,c_first_name customer_first_name ,c_last_name customer_last_name ,d_year AS year ,MAX(ss_net_paid) year_total ,'s' sale_type FROM customer JOI...
<reponame>edgarrmondragon/dbt-sqlite<gh_stars>10-100 {% macro sqlite_incremental_upsert(tmp_relation, target_relation, unique_key=none, statement_name="main") %} {%- set dest_columns = adapter.get_columns_in_relation(target_relation) -%} {%- set dest_cols_csv = dest_columns | map(attribute='quoted') | join(', ...
<reponame>samply/blaze<gh_stars>10-100 library Retrieve using FHIR version '4.0.0' include FHIRHelpers version '4.0.0' codesystem StorageTemperature: 'https://fhir.bbmri.de/CodeSystem/StorageTemperature' define InInitialPopulation: exists from [Specimen] S where exists from S.extension E ...
<reponame>silvanei/madeira-faq -- MySQL Script generated by MySQL Workbench -- ter 17 dez 2019 09:18:03 -03 -- 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 @OL...
-- @testpoint:opengauss关键字routine_schema(非保留),作为数据库名 --关键字不带引号-成功 drop database if exists routine_schema; create database routine_schema; drop database routine_schema; --关键字带双引号-成功 drop database if exists "routine_schema"; create database "routine_schema"; drop database "routine_schema"; --关键字带单引号-合理报错 drop databas...
-- @testpoint:opengauss关键字Immediate(非保留),作为字段数据类型(合理报错) --前置条件 drop table if exists explain_test cascade; --关键字不带引号-合理报错 create table explain_test(id int,name Immediate); --关键字带双引号-合理报错 create table explain_test(id int,name "Immediate"); --关键字带单引号-合理报错 create table explain_test(id int,name 'Immediate'); --关键字带反引号...
-- @testpoint:opengauss关键字begin_non_anoyblock非保留),作为序列名 --关键字不带引号-成功 drop sequence if exists begin_non_anoyblock; create sequence begin_non_anoyblock start 100 cache 50; --清理环境 drop sequence begin_non_anoyblock; --关键字带双引号-成功 drop sequence if exists "begin_non_anoyblock"; create sequence "begin_non_anoyblock" start 1...
<reponame>LeamHall/CharacterBible -- parser_1_create_sqlite_db.sql -- version: 0.0.1 -- date: 20201105 -- author: <NAME> -- desc: Create a sample database for CharacterBible. .headers on .mode column .nullvalue [NULL] .echo on DROP TABLE IF EXISTS cadets; CREATE TABLE cadets ( year ...
<gh_stars>0 /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50505 Source Host : localhost:3306 Source Database : feedback Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2019-09-27 16:16:37 */ SET...
INSERT INTO scripts (script, pagesecurity, description) VALUES ('SecurityTokens.php', 15, 'Administration of security tokens'); INSERT INTO scripts (script , pagesecurity ,description) VALUES ('SalesByTypePeriodInquiry.php', 2, 'Shows sales for a selected date range by sales type/price list'); INSERT INTO scripts (scri...
/* Seeds for SQL table.*/ USE company_db; /* Insert 3 Rows into your new table */ INSERT INTO department (name) VALUES ("Engineering"), ("Accounting"), ("Sales"); INSERT INTO role (title, salary, department_id) VALUES ("Engineer", 60000, 1), ("Accountant", 60000, 2), ("Sales Rep", 60000, 3); INSERT INTO employee (fi...
DROP DATABASE IF EXISTS jacso18; CREATE DATABASE jacso18; USE jacso18; Create TABLE users( user_id INT PRIMARY KEY AUTO_INCREMENT, username varchar(100) NOT NULL, email varchar(100) not null, password varchar(100) not null ); CREATE TABLE posts( image_id INT PRIMARY KEY AUTO_INCREMENT, us...
<reponame>miguelhp373/Curso_SQL_Server -- UNION -- ELE COMBINA DOIS OU MAIS RESULTADOS DE UM SELECT EM UM RESULTADO APENAS /* EXEMPLO: -- RETORNA TODOS OS DADOS SEM DUPLICATAS SELECT COLUMN1, COLUMN2 FROM TABLE1 UNION SELECT COLUMN1, COLUMN2 FROM TABLE 2 -- RETORNA TODOS OS DADOS INCLUINDO OS DUPLICADO...
<filename>SqlPatch/clean_b_table.sql truncate table `b_brand_evaluation`; truncate table `b_brand_hotword`; truncate table `b_emergency_plan`; truncate table `b_info_classification_customer`; truncate table `b_info_classification_customer_news`; truncate table `b_info_classification_customer_weibo`; truncate table `b_i...
DROP DATABASE IF EXISTS WALK; CREATE DATABASE WALK; USE WALK; CREATE TABLE user ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(64) NOT NULL UNIQUE, password VARCHAR(128) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE type ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(30) NOT NULL UNI...
<gh_stars>0 /* Ankita Date: 09-10-2018 */ ALTER TABLE `brands` ADD COLUMN LastDataRefresh DATETIME DEFAULT NOW() AFTER NumberOfItem ; ALTER TABLE `brand_seller_bridge` ADD COLUMN DataFeed VARCHAR(250) AFTER SellerID ; /*Ankita Date:10-10-2018*/ DROP TABLE `seller_price_base`; DROP TABLE `seller_price_type`; DROP TAB...
/* Navicat MySQL Data Transfer Source Server Version : 50523 Source Host : localhost:3306 Source Database : user-management Target Server Type : MYSQL Target Server Version : 50523 File Encoding : 65001 Date: 2017-02-19 16:48:00 */ SET FOREIGN_KEY_CHECKS=0; -- -----------...
<reponame>NutriEasyApp/nutrieasy-backend<gh_stars>0 CREATE EXTENSION IF NOT EXISTS "UUID-OSSP"; CREATE TYPE GENRE AS ENUM ('M','F'); CREATE TYPE BODYTYPE AS ENUM ('ECTOMORPH','ENDOMORPH','MESOMORPH'); CREATE TYPE OBJECTIVE AS ENUM ('GAIN', 'LOSE', 'KEEP'); CREATE TABLE IF NOT EXISTS USERS ( ID UUID NOT NULL PRIMARY K...
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 01, 2019 at 03:55 PM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 23, 2018 at 11:32 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.0.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
create index detection_remote_id_station_id_index on detection (remote_id desc, station_id asc);
<gh_stars>1-10 DROP DATABASE IF EXISTS warhammer_companion; CREATE DATABASE warhammer_companion; \c warhammer_companion DROP TABLE IF EXISTS figurine CASCADE; CREATE TABLE figurine( id int PRIMARY KEY, name varchar, points int );
<reponame>AcademicHumber/the-final-boss<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 13, 2020 at 03:21 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRAN...
INSERT INTO polls_question (id, question_text, pub_date) VALUES (2, 'how was pyhton code update ', now()); INSERT INTO polls_choice (id, choice_text, votes, question_id) VALUES (4, 'Excellent', 0, 2); INSERT INTO polls_choice (id, choice_text, votes, question_id) VALUES (5, 'Good', 0, 2); INSERT INTO polls_choice (id, ...
/* Navicat Premium Data Transfer Source Server : MySQL Source Server Type : MySQL Source Server Version : 50724 Source Host : localhost:3306 Source Schema : baby Target Server Type : MySQL Target Server Version : 50724 File Encoding : 65001 Date: 07/09/2019 14:04:52 ...
-- whereA.test -- -- db eval { -- CREATE TABLE t1(a INTEGER PRIMARY KEY, b UNIQUE, c); -- INSERT INTO t1 VALUES(1,2,3); -- INSERT INTO t1 values(2,'hello','world'); -- INSERT INTO t1 VALUES(3,4.53,NULL); -- SELECT * FROM t1 -- } CREATE TABLE t1(a INTEGER PRIMARY KEY, b UNIQUE, c); INSERT INTO t1 VA...
INSERT INTO department (id, name) VALUES (1, "Sales"); INSERT INTO department (id, name) VALUES (2, "Finance"); INSERT INTO department (id, name) VALUES (3, "Engineering"); INSERT INTO department (id, name) VALUES (4, "Legal"); INSERT INTO role (id, title, salary, department_id) VALUES (1, "Salesperson", 80000, 1);...
<reponame>zettadb/kunlun_scripts<filename>smoke/smokeTest.sql -- Copyright (c) 2019 ZettaDB inc. All rights reserved. -- This source code is licensed under Apache 2.0 License, -- combined with Common Clause Condition 1.0, as detailed in the NOTICE file. set client_min_messages to 'warning'; drop table if exists t1; res...
CREATE SCHEMA `employees` ; CREATE DATABASE employees; CREATE USER 'user'@'localhost' IDENTIFIED by 'user123'; GRANT ALL on employees.employee TO 'user'@'localhost'; use employees; CREATE TABLE employee (id INT UNSIGNED NOT NULL, PRIMARY KEY (id), name VARCHAR(30) NOT NULL); INSERT into employee(id, name) VALUES ...
<gh_stars>10-100 -- -- PostgreSQL database dump -- -- Dumped from database version 10.4 -- Dumped by pg_dump version 10.4 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodi...
<filename>3 course/database_labs/KR3/kr3.sql @@ Задание 1: // Автор INSERT INTO "Автор" (name) VALUES ('<NAME>.'); INSERT INTO "Автор" (name) VALUES ('<NAME>.'); INSERT INTO "Автор" (name) VALUES ('<NAME>.'); INSERT INTO "Автор" (name) VALUES ('<NAME>.'); // Издательство INSERT INTO "Издательство" (name) VALUES ('Питер...
--CLIENT create class t_tr(i int, tbl varchar(255)); create class t1(i int) reuse_oid; create trigger tr1 before delete on t1 execute insert into t_tr values(obj.i, 't1'); insert into t1 values (1), (2), (3), (4), (5), (6); create class t2(i int) reuse_oid; create trigger tr2 before delete on t2 execute insert into t...