sql
stringlengths
6
1.05M
DROP DATABASE IF EXISTS burgers_db; CREATE database burgers_db; USE burgers_db; CREATE TABLE burgers ( id INT AUTO_INCREMENT NOT NULL, burger_name VARCHAR(50), devoured BOOLEAN DEFAULT FALSE, PRIMARY KEY (id) );
ALTER TABLE character_skills CHANGE `skill_level` `skill_level` INT(3) NOT NULL DEFAULT 1; ALTER TABLE character_skills_save CHANGE `skill_level` `skill_level` INT(3) NOT NULL DEFAULT 1;
/* Author: <NAME> Date: Fri Feb 17 21:09:29 PST 2012 MySQL Create Script for URLs, Analytics, and Notes */ DROP TABLE IF EXISTS urls; CREATE TABLE urls (object_ID CHAR(23) NOT NULL, useroid CHAR(23) NOT NULL, url VARCHAR(255) NOT NULL, description VARCHAR(1000) NU...
<reponame>habrazilay/NetMapp /* This schema will be used to store general information about this project sites and rooms. */ CREATE SCHEMA `project` DEFAULT CHARACTER SET hebrew ; /* This table contains general details about the project. colums: id - unique row identifier. name - name of the project. createdB...
CREATE DATABASE IF NOT EXISTS `images`; USE `images`; DROP TABLE IF EXISTS `image_list`; CREATE TABLE `image_list` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(500) DEFAULT NULL, `original_url` varchar(1000) DEFAULT NULL, `original_size` double DEFAULT NULL, `compress_size` double DEFAULT NULL, ...
-- -- Creating a sample table. -- -- -- Table Question -- DROP TABLE IF EXISTS Question; CREATE TABLE Question ( "id" INTEGER PRIMARY KEY NOT NULL, "title" TEXT NOT NULL, "question" TEXT NOT NULL, "user" INT, "tags" TEXT, "slug" TEXT, "created" TIMESTAMP, "updated" DATETIME -- "de...
<filename>db/schema.sql<gh_stars>0 CREATE DATABASE burger_db; USE burger_db; CREATE TABLE `burgers` ( `id` INT NOT NULL AUTO_INCREMENT, `burger_name` VARCHAR(45) NOT NULL, `devoured` TINYINT NOT NULL DEFAULT 0, `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`)) COMMENT = ' * **id**:...
-- 权限表 -- CREATE TABLE permission ( pid int(11) NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL DEFAULT '', url VARCHAR(255) DEFAULT '', PRIMARY KEY (pid) ) ENGINE = InnoDB DEFAULT CHARSET = utf8; INSERT INTO permission VALUES ('1', 'add', ''); INSERT INTO permission VALUES ('2', 'delete', ''); INSERT INTO...
DROP DATABASE IF EXISTS sql_employees; CREATE DATABASE sql_employees; USE sql_employees; CREATE TABLE department ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(30) ); CREATE TABLE role ( id INT AUTO_INCREMENT PRIMARY KEY title VARCHAR(30) salary DECIMAL department_id INT ); CREATE TABLE employee ( ...
<gh_stars>1-10 create table public.stat ( finished_at timestamptz not null default now(), domain varchar(255), session_id integer not null, hostname varchar(126) not null, fetch_result site_fetch_result, traffic integer not null default...
<gh_stars>10-100 Update [User] Set Male=0 Where (Contains(Name,'Near((she,hers),1)') Or Contains(Name,'Near((her,hers),1)') Or Contains(Name,'Near((she,her),1)')) And Male Is Null Update [User] Set Male=0 Where (Contains(Bio,'Near((she,hers),1)') Or Contains(Bio,'Near((her,hers),1)') Or Contains(Bio,'Near((she,her),1)...
<filename>backend-app/migrations/000013_add_tracking_number_to_orders.up.sql<gh_stars>1-10 ALTER TABLE order_details ADD COLUMN tracking_number VARCHAR(128);
<reponame>lajtomekadimon/tukosmo<filename>db/updates/u_post.sql CREATE OR REPLACE FUNCTION u_post( post_id BIGINT, featured_image_id BIGINT ) RETURNS BIGINT LANGUAGE PLPGSQL VOLATILE CALLED ON NULL INPUT PARALLEL UNSAFE AS $$ BEGIN UPDATE t_posts SET tp_featured_image = featured_image_id WHERE...
CREATE TABLE [dbo].[PseudoCategory] ( [PseudoCategoryID] INT IDENTITY (1, 1) NOT NULL, [Name] NVARCHAR (50) NOT NULL, [Description] NVARCHAR (MAX) NULL, [Condition] NVARCHAR (1024) NOT NULL );
<gh_stars>10-100 /* first put into publication */ insert into publication (publication_type, fk) select 'image',('identifier=>'||f.image)::hstore from file f left join publication p on p.publication_type='image' and (p.fk->'identifier') = f.image where f.image is not null and p.id is null group by f.image; /* then p...
<gh_stars>1-10 update `npc_option` set `npcflag`=0x00000010 where `id` in('5','49','50'); update `npc_option` set `npcflag`=0x00000080 where `id` = '3'; update `npc_option` set `npcflag`=0x00002000 where `id` = '4'; update `npc_option` set `npcflag`=0x00004000 where `id` = '6'; update `npc_option` set `npcflag`=0x...
-- Create animal options INSERT INTO SPECIES (species_name) VALUES ('dog'), ('cat') INSERT INTO BREED (breed_name, species_id) VALUES ('Shih Tzu', 1), ('PitBull Terrier', 1) INSERT INTO GENDER (type) VALUES ('male'), ('female'), ('unknown') INSERT INTO COAT_LENGTH (type) VALUES ('short'), ('long') INSERT INTO HOUSE...
-- -- Copyright 2018 Liaison Technologies, Inc. -- This software is the confidential and proprietary information of -- Liaison Technologies, Inc. ("Confidential Information"). You shall -- not disclose such Confidential Information and shall use it only in -- accordance with the terms of the license agreement you ente...
<reponame>ancoron/pg-uuid-v1 CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; SET timezone TO 'Zulu'; SET enable_seqscan TO on; CREATE TABLE uuid_v1_index_tests (id uuid_v1 PRIMARY KEY); INSERT INTO uuid_v1_index_tests (id) SELECT uuid_v1_convert(uuid_generate_v1()) FROM generate_series(1, 100000); CREATE INDEX uuid_v1_i...
alter table "public"."users" drop constraint "users_team_id_fkey";
-- -- MySQL script to upgrade Vexim database schema from Vexim 1.5 to Vexim 2.0.1 -- -- Create the `domains` table CREATE TABLE `domains` ( `domain_id` mediumint(8) UNSIGNED AUTO_INCREMENT NOT NULL, `domain` varchar(64) NOT NULL DEFAULT '', `maildir` varchar(128) NOT NULL DEFAULT '', `uid` smallint(5) UNSIGNED NOT...
<reponame>Technotechbloggie9/ISCDatabaseTool -- MariaDB dump 10.19 Distrib 10.6.4-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: wordpress -- ------------------------------------------------------ -- Server version 10.6.4-MariaDB-1:10.6.4+maria~focal /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 14, 2021 at 08:31 AM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
create table my_table ( id number ); insert into my_table (id) values (non_existent_seq.nextval) ;
<gh_stars>0 -- MySQL dump 10.13 Distrib 5.7.9, for linux-glibc2.5 (x86_64) -- -- Host: localhost Database: kaveri -- ------------------------------------------------------ -- Server version 5.5.47-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RES...
create database shopdata; use shopdata; #用户信息表 create table userInfo ( userId int primary key auto_increment, -- 用户Id userName varchar(20) not null, -- 用户名 password varchar(16) not null, -- 密码 phoneNumber varchar(11) not null, -- 电话号码 email varchar(30) not null -- 邮箱 ); inse...
<gh_stars>0 create table employee ( id bigint not null, email varchar(255) null, first_name varchar(255) null, image varchar(255) null, last_name varchar(255) null, password varchar(255) null, salary float not null, username varchar(255) not null u...
<gh_stars>0 SELECT COUNT(*) FROM tag as t, site as s, question as q, tag_question as tq WHERE t.site_id = s.site_id AND q.site_id = s.site_id AND tq.site_id = s.site_id AND tq.question_id = q.id AND tq.tag_id = t.id AND (s.site_name in ('judaism')) AND (t.name in ('blessing','hashkafah-philosophy','kashrut-kosher','par...
<reponame>SkillsFundingAgency/DC-ILR-2021-DataStore CREATE TABLE [Valid].[LearnerFAM] ( [UKPRN] INT NOT NULL, [LearnRefNumber] VARCHAR (12) NOT NULL, [LearnFAMType] VARCHAR (3) NOT NULL, [LearnFAMCode] INT NOT NULL, CONSTRAINT [PK_LearnerFAM] PRIMARY KEY ([LearnFAMC...
CREATE TABLE `files` ( `id` int(11) NOT NULL AUTO_INCREMENT, `format` text DEFAULT NULL, `path` text DEFAULT NULL, PRIMARY KEY (`id`) ) ; INSERT INTO `allowed_values` VALUES ('files','format','parrec'),('files','format','xmlrec'),('files','format','nifti'),('files','format','bci2000'),('files','format','microm...
CREATE TABLE IF NOT EXISTS users (id int NOT NULL AUTO_INCREMENT, name TEXT, birthDate DATE, city TEXT, PRIMARY KEY(id)); SET GLOBAL max_connections=50000; SET GLOBAL thread_cache_size=250;
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 06-11-2020 a las 05:51:42 -- Versión del servidor: 10.4.14-MariaDB -- Versión de PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<reponame>leonardoalves14/agendafut<filename>proj/API/SocietyAgendor.DataBase/dbo/Tables/Estabelecimento.sql CREATE TABLE [dbo].[Estabelecimento] ( [Estabelecimento_Id] INT NOT NULL, [Estabelecimento_Nome] VARCHAR (200) NOT NULL, [Estabelecimento_CNPJ] VARCHAR (18) NULL, ...
<reponame>arlogilbert/slack-stats SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; -- -- Table structure for table `stats` -- CREATE TABLE `stats` ( `id` int(10) UNSIGNED NOT NULL, `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `userId` varchar(255) ...
<reponame>morb1d/zrozumsql -- M7L5 - RIGHT JOIN DROP TABLE IF EXISTS products, product_manufactured_region CASCADE; CREATE TABLE products ( id SERIAL, product_name VARCHAR(100), product_code VARCHAR(10), product_quantity NUMERIC(10,2), manufactured_date DATE, manufactured_region VARCHAR(25), added_by...
delete from plsql_profiler_data; delete from plsql_profiler_units; delete from plsql_profiler_runs;
<reponame>Jonne/Nyxie /****************************************************************************** * This script should run against 'SitecoreCommerce9_SharedEnvironments' to * clean up sellable items that contain stale information about their * parent entities. * * To view entities that are affected by this, you ca...
CREATE PROCEDURE [employer_account].[UpdateAccountLegalEntity_SetNameAndAddress] @AccountLegalEntityId BIGINT, @Name nvarchar(100), @Address nvarchar(256) AS UPDATE employer_account.AccountLegalEntity SET [Name] = @Name, Address = @Address WHERE Id = @AccountLegalEntityId; GO
<reponame>youyouqiu/hybrid-development ALTER TABLE RISK_EVENT ADD IF NOT EXISTS PROTOCOL_TYPE INTEGER NULL;
CREATE SEQUENCE case_id_seq; CREATE TABLE "case" ( id int NOT NULL PRIMARY KEY default nextval('case_id_seq'), name varchar(64) NOT NULL, description varchar(128), created timestamp NOT NULL DEFAULT now() ); CREATE SEQUENCE user_id_seq; CREATE TABLE "user" ( id int NOT NULL PRIMARY KEY default nextval('...
<gh_stars>0 update households h set pt_type = 'interpolated', addresspt = (select case when mod(cast(replace(replace(house_number,'*',''),'?','') as integer), 2.0) = mod(s2.froml1900, 2.0) then (st_lineinterpolatepoint(st_offsetcurve(s2.geom,20), abs(cast(replace(replace(h.house_number,'*',''),'?','') ...
DROP TABLE IF EXISTS `shuyang_kuaixun`; CREATE TABLE `shuyang_kuaixun` ( `kuaixunid` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `siteid` smallint(5) unsigned DEFAULT '0', `kuaixuntype` tinyint(1) unsigned NOT NULL DEFAULT '0', `name` varchar(50) NOT NULL DEFAULT '', `lx` varchar(50) NOT NULL DEFAULT '', ...
<reponame>MrDeym/DesInventar<filename>scripts/oracle/clear_schema.sql begin for i in 1..10 loop for rec in (select object_name, object_type from user_objects where object_type in ('TABLE','FUNCTION','PROCEDURE','PACKAGE','SEQUENCE')) loop begin execute immediate 'drop '||rec.object_type||' '||rec.object...
BEGIN; DROP VIEW IF EXISTS branch_changeset_specs_and_changesets; DROP VIEW IF EXISTS tracking_changeset_specs_and_changesets; CREATE VIEW tracking_changeset_specs_and_changesets AS ( SELECT changeset_specs.id AS changeset_spec_id, COALESCE(changesets.id, 0) AS changeset_id, changeset_spec...
//// CHANGE name=change0 CREATE TABLE table173 ( id integer NOT NULL, field1 character varying(30), usertype3field usertype3, usertype2field usertype2, usertype7field usertype7 ); GO //// CHANGE name=change1 ALTER TABLE ONLY table173 ADD CONSTRAINT table173_pkey PRIMARY KEY (id); GO
<reponame>kingsGlory/DataSphereStudio<filename>db/dss_dml.sql INSERT INTO `dss_application` (`id`, `name`, `url`, `is_user_need_init`, `level`, `user_init_url`, `exists_project_service`, `project_url`, `enhance_json`, `if_iframe`, `homepage_url`, `redirect_url`) VALUES (NULL, 'linkis', null, '0', '1', NULL, '0', '/home...
-- The user table CREATE TABLE user ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(255), `password` VARCHAR(255), PRIMARY KEY (`id`) );
autocommit off; create class dd( a monetary, b time, c timestamp); select * from dd; drop class dd; create class dd; rollback;
<reponame>opengauss-mirror/Yat -- @testpoint:opengauss关键字ordinality(非保留),作为外部数据源名 --关键字不带引号-成功 drop data source if exists ordinality; create data source ordinality; drop data source ordinality; --关键字带双引号-成功 drop data source if exists "ordinality"; create data source "ordinality"; drop data source "ordinality"; --关键...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 20, 2021 at 01:18 PM -- Server version: 10.4.19-MariaDB -- PHP Version: 8.0.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
<gh_stars>0 -- -- PostgreSQL database dump -- -- Dumped from database version 10.4 (Debian 10.4-2.pgdg90+1) -- Dumped by pg_dump version 10.5 -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; -- -- Config -- SET search_path = public, pg_catal...
<filename>dbv-1/data/schema/prc_VendorRateForExport.sql CREATE DEFINER=`neon-user`@`192.168.3.11` PROCEDURE `prc_VendorRateForExport`( IN `p_CompanyID` INT, IN `p_AccountID` INT , IN `p_TrunkID` INT, IN `p_NameFormat` VARCHAR(50), IN `p_Account` VARCHAR(200), IN `p_Trunk` VARCHAR(200) , IN `p_TrunkPrefix` VARCHA...
ALTER TABLE Sources MODIFY COLUMN type VARCHAR(100);
<filename>tests/Mock/sqlite.sql CREATE TABLE "addresses" ( "address_id" INTEGER , "user_id" int(10) DEFAULT NULL, "address_line_1" varchar(100) DEFAULT NULL, "address_city" varchar(50) DEFAULT NULL, "address_date_added" datetime DEFAULT NULL, "address_date_updated" datetime DEFAULT NULL, PRIMARY KEY ("ad...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 17, 2020 at 06:04 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
<filename>BAZA.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jun 10, 2019 at 03:08 PM -- Server version: 5.7.24 -- PHP Version: 7.2.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+...
<reponame>DutchDS/Final_Project select short_date as date, country_region as country, confirmed as positive, recovered, deaths as deceased from covid_by_country_v where confirmed > 0 or recovered>0 -- where country_region = 'Netherlands' order by country, short_date
<reponame>ratta2ii/ProjectTesting<gh_stars>1-10 DROP DATABASE IF EXISTS Ecommerce; CREATE DATABASE Ecommerce; USE Ecommerce; /*Create three tables two tables joined via linking table*/ /*Create Products table */ CREATE TABLE Products( ProductId INT NOT NULL PRIMARY KEY AUTO_INCREMENT, Price DOUBLE NOT...
insert into eg_roleaction(roleCode,actionid,tenantId)values('EMPLOYEE',(select id from eg_action where name='Get location by LocationName'),'panavel'); insert into eg_roleaction(roleCode,actionid,tenantId)values('EMPLOYEE',(select id from eg_action where name='Search Boundary by BoundryTypeName and HierarchyTypeName'),...
WITH synced_user_numbers AS ( SELECT GREATEST(3, CEIL(percentile_cont(0.5) WITHIN GROUP (ORDER BY value))::int) AS median FROM ( SELECT COUNT(u.*) AS value FROM cities LEFT JOIN users AS u ON u.city_id = cities.id WHERE u.synced GROUP BY cities.id ) AS synced_user_counts ) SELECT c.id A...
<reponame>mamonovd/apgdiff<filename>src/test/resources/cz/startnet/utils/pgdiff/foreign_alter_type_diff.sql ALTER FOREIGN TABLE foreign_to_alter ADD COLUMN IF NOT EXISTS country_code character varying(5), ALTER COLUMN ref2 TYPE character varying(20) USING ref2::character varying(20) /* TYPE change - table: foreign_to...
IF OBJECT_ID('dbo.udf_CalculateDistanceBetween2Coordinates', 'FN') IS NULL EXECUTE ('CREATE FUNCTION dbo.udf_CalculateDistanceBetween2Coordinates() RETURNS INT AS BEGIN RETURN 1 END;'); GO CREATE FUNCTION dbo.udf_CalculateDistanceBetween2Coordinates ( @Lat1 Float(18), @Long1 Float(18), @Lat2 Float(...
CREATE TABLE `product` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '' COMMENT '产品名称', `desc` varchar(255) NOT NULL DEFAULT '' COMMENT '产品描述', `stock` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '产品库存', `amou...
<filename>reference/docs/conversion/sakai_2_9_0_oracle_conversion.sql -- This is the Oracle Sakai 2.9.0 conversion script -- -------------------------------------------------------------------------------------------------------------------------------------- -- -- use this to convert a Sakai database from 2.8.x to 2....
-- MySQL dump 10.13 Distrib 5.6.26, for Win64 (x86_64) -- -- Host: localhost Database: hrms -- ------------------------------------------------------ -- Server version 5.6.26-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*...
USE [OAuth]; GO /* INSERT IMAGES */ INSERT INTO [Image]([FileName],[FileType]) VALUES ('default_profile_image.png',1); INSERT INTO [Image]([FileName],[FileType]) VALUES ('default_application_icon.png',2); INSERT INTO [Image]([FileName],[FileType]) VALUES ('default_company_icon.png',3); /* INSERT USERS */ INSERT INTO ...
INSERT INTO "main"."nlpviewer_backend_project" ("id", "name", "ontology", "user_id", "config") VALUES ('9', 'Eliza', '{ "name": "base_ontology", "definitions": [ { "entry_name": "ft.onto.base_ontology.Token", "parent_entry": "forte.data.ontology.top.Annotation", "description": "A span based an...
<reponame>Jepria/how-to -- script: Install/Grant/Last/sys-privs.sql -- Выдает системные привилегии, необходимые для установки и работы модуля. -- -- Параметры: -- toUserName - Пользователь, в схему которого -- будет установлен модуль -- define toUserName = "&1" ...
INVALID TEST Bug: DROP statement doesnt get generated --ALTER TABLE "LTHUSER".posts ADD CONSTRAINT fk_posts_authors_test_1 FOREIGN KEY (author_id) REFERENCES "LTHUSER".authors (id) --ALTER TABLE "LTHUSER".posts ADD CONSTRAINT fk_posts_authors_test_2 FOREIGN KEY (id) REFERENCES "LTHUSER".authors (id)
<filename>yoo-job-master-3314074055d7b6a139d5b9452d6e10a7ec0dde6e/job-paperReport/src/main/java/tpl/sql/StudentPaperReportRecord.sql ##获取需要生成纸质报告的记录 #macro($findDataProductingList(statusList)) select * from student_paper_report_record where status in :statusList #end ##获取需要生成PDF的记录 #macro($findDataToFileList(st...
<reponame>wiltonlazary/snappydata SELECT count(*) FROM BANK limit 10; INSERT INTO Student SELECT 11,'<NAME>',Array(62.1,50.7,52.3,67.9,69.9,66.8); PUT INTO AGREEMENT select id,abs(rand()*1000),abs(rand()*1000),'agree_cd','description','2018-01-01','2019-01-01',from_unixtime(unix_timestamp('2018-01-01 01:00:00')+floor(r...
<filename>conf/evolutions/default/53.sql # --- !Ups alter table project add column is_using_reviewer_count boolean; update project set is_using_reviewer_count = false where is_using_reviewer_count is null; alter table project drop column if exists default_review_point; alter table project add column default_reviewer_...
INSERT INTO [dbo].[float_table] (value) values (3.14); INSERT INTO [dbo].[real_table] (value) values (3.14);
<filename>devand-db/migrations/2020-07-30-204712_users_visible_name_not_null/down.sql ALTER TABLE users ALTER COLUMN visible_name DROP NOT NULL;
<reponame>vdfernandez123/asgard<filename>db/base_nueva_prod/data/db_captacion_data_02.sql -- -- Base de datos: `db_captacion_prueba` -- USE `db_captacion`; -- -- Volcado de datos para la tabla `interesado` -- INSERT INTO `interesado` (`int_id`, `per_id`, `int_estado_interesado`, `int_usuario_ingreso`, `int_usuario_mo...
<gh_stars>0 CREATE PROC dbo.usp_GetEmployeesSalaryAbove35000 AS SELECT e.FirstName, e.LastName FROM Employees AS e WHERE Salary > 35000
<reponame>ScottMcConkey/Oracle-Spatial-Functions /******************************************************************************* * LINE__SLICE() * Returns a Line Geometry consisting of a subselection of points based on * the specified Start and End index parameters. When the End Index * is lower than the Start ...
<gh_stars>0 USE DWNorthwind GO SELECT SUM(UnitPrice * Quantity * (1 - discountPercent)) AS [Total Sales 1996] FROM dbo.FactSales WHERE YEAR(OrderDate) = 1996 SELECT TOP 1 E.Region, SUM(FS.UnitPrice * FS.Quantity * (1 - FS.discountPercent)) AS [Total Sales 1997] FROM dbo.FactSales FS, dbo.DimEmployee E WHERE Y...
<gh_stars>0 SELECT DISTINCT name FROM people JOIN stars ON people.id = stars.person_id JOIN movies ON movies.id = stars.movie_id WHERE year = 2004 ORDER BY birth;
<reponame>robmerrell/prs drop table records;
<reponame>Heanthor/auctioneer-bot<filename>migrations/deploy/threshold_choice.sql -- Deploy auctioneer-bot:threshold_choice to pg BEGIN; alter table choice_data add column price_threshold int; COMMIT;
/* TODO: document */ /* +----------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------+-------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | r...
-- file:hash_index.sql ln:95 expect:true SELECT h.seqno AS i6543, h.random AS c0_to_f FROM hash_name_heap h WHERE h.random = '0123456789abcdef'::name
<filename>MS SQL and Entity Framework/MS SQL/Exercise 1 - Databases Introduction/03.AlterMinionsTable.sql<gh_stars>1-10 --Problem 3 ALTER TABLE Minions ADD TownId INT ALTER TABLE Minions ADD FOREIGN KEY (TownId) REFERENCES Towns(Id)
<reponame>dram/metasfresh -- 2017-04-22T14:03:11.488 -- URL zum Konzept INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (1000000,0,554389,TO...
-- Anshal -- By <NAME> -- Fix Damage UPDATE `creature_template` SET `mindmg` = '1225.5', `maxdmg` = '1544.7', `attackpower` = '1651', `dmg_multiplier` = '7.5', `baseattacktime` = '2000' WHERE `creature_template`.`entry` =45870; UPDATE `creature_template` SET `mindmg` = '1225.5', `maxdmg` = '1544.7', `attackpower` = '...
<gh_stars>1-10 -- 501 Number of records of death, by cause_concept_id --HINT DISTRIBUTE_ON_KEY(stratum_1) select 501 as analysis_id, CAST(d1.cause_concept_id AS VARCHAR(255)) as stratum_1, cast(null as varchar(255)) as stratum_2, cast(null as varchar(255)) as stratum_3, cast(null as varchar(255)) as stratum_4, c...
<gh_stars>1-10 DROP TABLE IF EXISTS USERATTRS; CREATE TABLE USERATTRS ( id INT NOT NULL AUTO_INCREMENT , uid VARCHAR(50) NOT NULL, attrname VARCHAR(50) NOT NULL, attrvalue VARCHAR(50) NOT NULL, primary key (id) ); INSERT INTO USERATTRS (uid, attrname, attrvalue) VALUES ('casuser', 'attributeRetriveFrom'...
select service_name, akas, tags, title from aws.aws_vpc_endpoint_service where service_name = '{{ output.service_name.value }}'
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Feb 05, 2020 at 02:25 PM -- Server version: 5.7.28-0ubuntu0.18.04.4 -- PHP Version: 7.2.27-5+ubuntu18.04.1+deb.sury.org+2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; ...
ALTER TABLE "public"."VideoRenderJob" DROP COLUMN "retriesCount";
<gh_stars>0 -- @testpoint:opengauss关键字join(保留),作为序列名 --关键字不带引号-合理报错 drop sequence if exists join; create sequence join start 100 cache 50; --关键字带双引号-成功 drop sequence if exists "join"; create sequence "join" start 100 cache 50; --清理环境 drop sequence "join"; --关键字带单引号-合理报错 drop sequence if exists 'join'; create sequ...
<gh_stars>100-1000 /* Test 1 */ create table t1 (c1 int) with (storage_type=ustore); insert into t1 values (0); \parallel on 3 begin pg_sleep(1); perform * from t1 for share; raise notice 'txn 1 for share'; update t1 set c1 = c1 * 2; end; / begin perform * from t1 for update; pg_sleep(1.5); ...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 21-03-2018 a las 12:55:38 -- Versión del servidor: 10.1.29-MariaDB -- Versión de PHP: 7.1.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
<reponame>LoganMerchant/technique<filename>db/schema.sql DROP DATABASE IF EXISTS technique_db; CREATE DATABASE technique_db;
-- Table: Person -- +-------------+---------+ -- | Column Name | Type | -- +-------------+---------+ -- | Id | int | -- | Email | varchar | -- +-------------+---------+ -- Id is the primary key column for this table. -- Each row of this table contains an email. The emails will not contain upperca...
<reponame>smdsbz/database-experiment<gh_stars>0 use DBEXP -- create test env --- create user --- 'U1' ~ 'U15' declare @_cnt integer = 0 while @_cnt < 15 begin insert into USERS (UID, NAME) values (@_cnt+1, 'U'+cast(@_cnt+1 as varchar(8))) set @_cnt = @_cnt + 1 end --- create blogs --- 'B1' ~ 'B15' by #1 'U1' set @...
CREATE TABLE stream ( id BIGSERIAL PRIMARY KEY, elementary_stream_id SMALLINT NOT NULL, channel_id SMALLINT NOT NULL, program_id SMALLINT, url VARCHAR(255) NOT NULL, mime_type VARCHAR(255) NOT NULL ); CREATE UNIQUE INDEX unq_stream_d...
ALTER PROCEDURE GetArticleByID ( @ArticleID int ) AS SET NOCOUNT ON SELECT a.ArticleID, a.AddedDate, a.AddedBy, a.CategoryID, a.Title, a.Abstract, a.Body, a.Country, a.State, a.City, a.ReleasedDate, a.ExpiredDate, a.Approved, a.Listed, a.CommentsEnabled, a.OnlyForMembers, a.ViewCount, a.Votes, a.Tota...
<gh_stars>0 ##---------------------- # AFTER UPDATE advertisements trigger. # # name: `advertisements_au` # table: `advertisements` # event: AFTER UPDATE # author: acgvelarde DROP TRIGGER IF EXISTS advertisements_au $$ CREATE TRIGGER advertisements_au AFTER UPDATE on `advertisements` FOR EACH ROW BEGIN UPDATE `...