sql
stringlengths
6
1.05M
<filename>src/SFA.DAS.EAS.Employer_Account.Database/Tables/Membership.sql CREATE TABLE [employer_account].[Membership] ( [AccountId] BIGINT NOT NULL, [UserId] BIGINT NOT NULL, [Role] INT NOT NULL, [CreatedDate] DATETIME NOT NULL DEFAULT GETDATE(), [ShowWizard] BIT NOT NULL DEFAULT 1, CONSTRAIN...
USE `essentialmode`; CREATE TABLE `addon_inventory` ( `name` VARCHAR(60) NOT NULL, `label` VARCHAR(100) NOT NULL, `shared` INT(11) NOT NULL, PRIMARY KEY (`name`) ); CREATE TABLE `addon_inventory_items` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `inventory_name` VARCHAR(100) NOT NULL, `name` VARCHAR(100) NOT NULL...
<gh_stars>1-10 CREATE OR REPLACE TRIGGER CLEAN_BORROWS_AND_REQUESTS_FOR_SUBSCRIBERS AFTER DELETE ON SUBSCRIBERS FOR EACH ROW DECLARE ARG_ISSUE_DATE DATE; BEGIN DELETE FROM REQUESTS WHERE CUSTOMER_ID = :OLD.CUSTOMER_ID; SELECT (:OLD.MEMBERSHIP_BOUGHT_ON+P.PERIOD) INTO ARG_ISSUE_DATE FROM PLANS P WHERE PLAN_ID = :...
BEGIN; DROP TABLE IF EXISTS /*_*/image_tmp; CREATE TABLE /*_*/image_tmp ( img_name varchar(255) binary NOT NULL default '' PRIMARY KEY, img_size int unsigned NOT NULL default 0, img_width int NOT NULL default 0, img_height int NOT NULL default 0, img_metadata mediumblob NOT NULL, img_bits int NOT NULL defa...
CREATE TABLE star ( name char(50) NOT NULL, radius float NOT NULL, mass float, PRIMARY KEY(name) ); INSERT INTO star VALUES('Sun', 1.0, 1.0); INSERT INTO star VALUES('Kepler-90', 1.2, 1.13); CREATE TABLE planet ( ord int NOT NULL, name char(50), star char(50) NOT NULL, radius float, mass float, orbit float ...
create table Branch ( branch_id VARCHAR(50), branch_city VARCHAR(50), PRIMARY KEY (branch_id) ); insert into Branch (branch_id, branch_city) values ('B77', 'Visaginas'); insert into Branch (branch_id, branch_city) values ('B48', 'Zongluzui'); insert into Branch (branch_id, branch_city) values ('B94', 'Bayart Huxu...
<reponame>stellar-fox/deneb -- contacts -- Add new contact INSERT INTO contacts ( contact_id, requested_by, status, created_at, updated_at, request_str ) VALUES ( $<contact_id>, $<requested_by>, $<status>, $<created_at>, $<updated_at>, $<request_str> );
<filename>persistence/src/main/resources/db/migration/schema/V1_12_2__AddStateFlow.sql INSERT INTO state_flow (from_id,to_id) VALUES (1,2); INSERT INTO state_flow (from_id,to_id) VALUES (1,13); INSERT INTO state_flow (from_id,to_id) VALUES (1,14); INSERT INTO state_flow (from_id,to_id) VALUES (2,3); INSERT INTO state_...
<reponame>Sayou1989/WeBASE-Node-Manager<gh_stars>10-100 SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; CREATE TABLE IF NOT EXISTS tb_warehouse ( id int(11) NOT NULL COMMENT '自增编号', warehouse_name varchar(255) binary NOT NULL COMMENT '合约仓库名', warehouse_name_en varchar(255) binary NOT NULL COMMENT '仓库名(英文)', typ...
<gh_stars>100-1000 //// CHANGE name=chng1 CREATE TABLE TABLE_B ( B_ID INT NOT NULL, VAL1 INT, VAL2 INT, VAL3 INT, PRIMARY KEY (B_ID) ) //// CHANGE INDEX name=TABLE_B_IND1 CREATE INDEX TABLE_B_IND1 ON TABLE_B ( VAL1, VAL2)
SELECT tc.id, tc.parent_id, taxonomies.name, CASE WHEN taxonomies.name = 'CITES_EU' THEN TRUE ELSE FALSE END AS taxonomy_is_cites_eu, tc.full_name, tc.author_year, 'A' AS name_status, ranks.name AS rank, tc.taxonomic_position, tc.listing->'cites_listing' AS cites_listing, tc.data->'kingdom_name' A...
<filename>src/hpc-server/hpc-dao-impl/src/main/scripts/migration/release-1.6.0/hpc_data_management_configuration_prod.sql -- -- hpc_data_management_configuration.sql -- -- Copyright SVG, Inc. -- Copyright Leidos Biomedical Research, Inc -- -- Distributed under the OSI-approved BSD 3-Clause License. -- See http://ncip....
<reponame>NAGA-MANVITH/Faculty-Assistance<filename>Dump20170718/marks_attend_semwisesubject.sql -- MySQL dump 10.13 Distrib 5.6.23, for Win32 (x86) -- -- Host: localhost Database: marks_attend -- ------------------------------------------------------ -- Server version 5.6.25-log /*!40101 SET @OLD_CHARACTER_SET_CLI...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Oct 22, 2021 at 07:35 AM -- Server version: 5.7.33 -- PHP Version: 7.4.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
<filename>Database/Homeworks/08. Advanced SQL/Task - 08.sql USE TelerikAcademy SELECT COUNT(*) AS EmployeeWithOutManeger FROM Employees WHERE ManagerID IS NULL
<gh_stars>0 SELECT H.dia_semana, H.hora, HT.sala FROM horario_turma AS HT INNER JOIN horario AS H ON (HT.id_horario = H.id_horario) WHERE HT.id_turma = ${id_turma}
<filename>src/PostgreSQL/_BeispielePostgreSQL/Kap14/Grant.sql GRANT ALL ON t_ma TO fmueller; GRANT SELECT, UPDATE ON t_proj TO fmueller; GRANT SELECT ON t_ma TO pfunke;
<filename>mbmc.sql -- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 16, 2020 at 09:01 PM -- Server version: 5.7.20-0ubuntu0.16.04.1-log -- PHP Version: 7.0.22-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"...
<gh_stars>0 CREATE OR REPLACE PACKAGE dd_admin_pkg AS c_admin_id CONSTANT INTEGER := 0; TYPE nt_type IS TABLE OF VARCHAR2(32767) INDEX BY PLS_INTEGER; TYPE about_sentences_type IS TABLE OF VARCHAR2(1000) INDEX BY PLS_INTEGER; TYPE name_type IS TABLE OF VARCHAR2(30) INDEX BY PLS_INTEGER; /* S...
<reponame>qingbing/yii-helper -- ---------------------------- -- 用途 -- 操作日志:该日志主要用于程序员在重要的地方手动打一些操作的日志,主要用于问题排查或重要记录 -- -- 实现逻辑 -- 1. 通过 \YiiHelper\features\operateLog\tools\OperateLog::getInstance()->add() 将日志数据写入 pub_operate_log 表 -- 2. 界面查看操作日志情况 -- ---------------------------- -- ---------------------------- -- ...
CREATE TABLE "Generico_3"( "col_00" varchar(37), "col_01" varchar(19), "col_02" smallint NOT NULL, "col_03" varchar(30), "col_04" varchar(47) NOT NULL, "col_05" varchar(21), "col_06" integer NOT NULL, "col_07" smallint NOT NULL, "col_08" varchar(54), "col_09" varchar(77), "col_10" smallint, "col_11" smallint, "col_12" ...
<filename>finance/egov/egov-egf/src/main/resources/db/migration/main/V20160123130001__egf_roleaction_mapping.sql ---------------Actions for Voucher Creator---------------------------------- Insert into eg_roleaction values((select id from eg_role where name='Voucher Creator'),(select id from eg_action where name='LOGI...
create view SourceData.viInputCalls as select ... from SourceData.Contracts as contracts join SourceData.Actions as actions on contracts.PhoneId = actions.PhoneId join Helpers.CitySizes as sizes on contracts.CitySize between sizes.MinAmount and sizes.MaxAmount where not (actions.Units > 1 and ...
CREATE TABLE subdivision_BT (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "subdivision_BT" ("id", "name", "level") VALUES ('BT-33', 'Bumthang', 'district'); INSERT INTO "subdivision_BT" ("id", "name", "level") VALUES ('BT-12', 'Mebisa', 'district'); INSERT INTO "...
CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`localhost` SQL SECURITY DEFINER VIEW `name-hashtag` AS SELECT DISTINCT `movies`.`title` AS `title`, `post`.`hashtag` AS `hashtag` FROM ((`movies` JOIN `movies_post`) JOIN `post`) WHERE ((`movies_post`.`movi...
-- Deploy seattleflu/schema:warehouse/primary-encounter-location to pg -- requires: warehouse/encounter-location/relation-fk begin; create or replace view warehouse.primary_encounter_location as select distinct on (encounter_id) encounter_location.* from warehouse.encounter_location jo...
/* ================================================ * * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without...
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5522500_sys_gh5208_REVERT_MakeAgeAttributeReadOnly.sql<gh_stars>1000+ update m_attribute set isreadonlyvalues='N' WHERE m_attribute_id = 540042;
<reponame>htl-leonding-project/2021-da-online-dance-practice-2<filename>appsrv/src/main/resources/db/import.sql insert into m_person (first_name, last_name, entry_year) values ('Scarlett','Nolan',2014); insert into m_person (first_name, last_name, entry_year) values ('Willow','Rowe',2014); insert into m_person (first_n...
-- set default value of 'recurrence_increment' to 1 in TABLE 'todo_task' PRAGMA foreign_keys=off; BEGIN TRANSACTION; ALTER TABLE todo_task RENAME TO temp_table; CREATE TABLE todo_task ( _id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, description TEXT NOT NULL, ...
/* Navicat MySQL Data Transfer Source Server : 开发 Source Server Version : 50643 Source Host : 10.39.35.149:3306 Source Database : test Target Server Type : MYSQL Target Server Version : 50643 File Encoding : 65001 Date: 2019-04-22 14:36:27 */ SET FOREIGN_KEY_CHECKS=0; -- --------...
BEGIN; SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for agents -- ---------------------------- CREATE TABLE `agents` ( `UUID` varchar(36) NOT NULL, `sessionID` varchar(36) NOT NULL, `secureSessionID` varchar(36) NOT NULL, `agentIP` varchar(16) NOT NULL, `agentPort` int(11) NOT...
/* Agregar a las tablas usuario y perfil los campos que se necesiten */ DROP TABLE IF EXISTS `usuario`; DROP TABLE IF EXISTS `perfil`; CREATE TABLE `perfil` ( `id` int(3) NOT NULL AUTO_INCREMENT COMMENT 'Identificador del perfil', `nombre` varchar(60) NOT NULL COMMENT 'Nombre del perfil', PRIMARY KEY (`id`), U...
--+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; create table t( i int, a varchar(10)) PARTITION BY RANGE (i) (PARTITION before_10 VALUES LESS THAN (10), PARTITION before_20 VALUES LESS THAN (20)); create table s( i int, a varchar(10)) PARTITION BY RANGE (i) (PARTITION before_10 VALUES LESS THAN (10),...
--basic test select round(to_datetime('2012-10-26 16:20:45.116'), 'yyyy'); select round(to_datetime('2012-10-26 16:20:45.116'), 'yy'); select round(to_datetime('2012-10-26 16:20:45.116'), 'mon'); select round(to_datetime('2012-10-26 16:20:45.116'), 'mm'); select round(to_datetime('2012-10-26 16:20:45.116'), 'dd'); sele...
-- @testpoint:opengauss关键字Key_Type(非保留),作为角色名 --关键字不带引号-成功 drop role if exists Key_Type; create role Key_Type with password '<PASSWORD>' valid until '2020-12-31'; drop role Key_Type; --关键字带双引号-成功 drop role if exists "Key_Type"; create role "Key_Type" with password '<PASSWORD>' valid until '2020-12-31'; drop role "K...
-- 菜单 SQL insert into sys_menu (menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) values('课程安排', '3', '1', '/module/courseArrangement', 'C', '0', 'module:courseArrangement:view', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '课程安排菜单'); -- 按钮...
INSERT INTO `plants_care` (`name`, `water`, `air_humidity`, `temperature`, `light`) VALUES ('math_orchid', 'dry', 'high', JSON_ARRAY(18,24), 'high'), ('elephant_bush', 'dry', 'dry', JSON_ARRAY(15,25), 'shady-sunny'), ('aloe', 'dry', 'dry', JSON_ARRAY(12,35), 'high'), ('ornamenteal_pepper', 'dry-ish or ...
<reponame>Stoyan-Iliev/MS-SQL SELECT TOP 10 FirstName, LastName, DepartmentID FROM Employees e1 WHERE Salary > (SELECT AVG(Salary) FROM Employees e2 WHERE e1.DepartmentID = e2.DepartmentID GROUP BY DepartmentID) ORDER BY DepartmentID
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Apr 03, 2020 at 05:52 AM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
CREATE DATABASE IF NOT EXISTS `e_commerce` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `e_commerce`; -- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: e_commerce -- ------------------------------------------------...
<filename>test/migrations/20210502100118_init.up.sql<gh_stars>0 CREATE TABLE IF NOT EXISTS "users" ( "id" number primary key, "name" varchar, "email" varchar, "dob" date )
-- phpMyAdmin SQL Dump -- version 3.4.10.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 19, 2021 at 04:43 PM -- Server version: 5.5.54 -- PHP Version: 5.3.10-1ubuntu3.26 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE...
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied ALTER TABLE `certificates` DROP FOREIGN KEY `regId_certificates`; ALTER TABLE `certificates` MODIFY `registrationID` bigint(20) NOT NULL; ALTER TABLE `certificates` ADD CONSTRAINT `regId_certificates` FOREIGN KEY (`registrationID`) REFEREN...
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 23, 2020 at 03:36 PM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
<gh_stars>1-10 /*--------------FILIAL 1--------------------------*/ SELECT * FROM ( SELECT M.CODFILIAL, M.MEDIA_PONDERADA, M.DTULTENT_MAX, ( SELECT ROUND (AVG (NVL (T.VALORULTENT, 0)), 6) FROM PCEST T, PCPRODUT R ...
<filename>hana/spet/diploma/ut/clearReadingsByDate.sql<gh_stars>1-10 DELETE FROM "SPET_DIPLOMA"."spet.diploma.data::ctxCore.eValue" WHERE "reading" IN ( SELECT "id" FROM "SPET_DIPLOMA"."spet.diploma.data::ctxCore.eReading" WHERE "timestamp" > TO_TIMESTAMP('2016-04-01') ); DELETE FROM "SPET_DIPL...
<reponame>JumpStartGeorgia/Election-Map<filename>db/election data/populate 2010 party list from staging.sql update `2010 election party list - raw` as raw, `2010 election party list - staging` as stage set raw.`2 - Alliance for Georgia` = stage.num_party_votes where raw.district_id = stage.district_id and raw.precinct_...
-- join.test -- -- execsql { -- SELECT * FROM t2 NATURAL LEFT OUTER JOIN t1; -- } SELECT * FROM t2 NATURAL LEFT OUTER JOIN t1;
<gh_stars>0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; create database Hospital_Hosting; use Hospital_Hosting; CREATE TABLE `Citas_Medicas` ( `id` int(11) NOT NULL, `Nombre` varchar(255) NOT NULL, `Apellido` varchar(255) NOT NULL, `Cedula` varchar(255) NOT NULL, `ema...
<gh_stars>0 /***************************************************************************************************** DROP STANDARD LOGGING STORED PROCEDURES The following set of commands will DROP existing versions of the following Stored Procedures: sp_STANDARD_LOGGING_Insert sp_STANDARD_LOGGING_Update sp_STANDARD_...
/* * Leibniz Bioactives Cloud * Copyright 2017 Leibniz-Institut f. Pflanzenbiochemie * * 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....
UPDATE envio set id_usuario_remitente = :idRemitente, id_usuario_destinatario = :idDestinatario, peso = :peso, costo = :costo, fecha_llegada = :fechaLlegada, direccion = :direccion WHERE id = :id;
<reponame>pengfei99/DataQualityAndValidation with stg_customers as ( select customer_id, first_name, last_name, first_name||" "||last_name as full_name from {{ref('customers')}} ) select * from stg_customers
-- drop view HistToolProdStepStatsView create view HistToolProdStepStatsView as select h.Product_Id as ProductId, h.Step_Id as StepId, h.Tool_Id as ToolId, td.DateAndTime, datediff(d, td.dateandtime, pbv.tNow) as p, h.n_LotProcCompl, h.t_LotProc, h.n_LotStepCompl, h.t_LotCT from HistToolProdStepStats h with (n...
-- Deploy ggircs-portal:views/ciip_incentive_per_facility to pg begin; create or replace view ggircs_portal.ciip_incentive_per_facility as ( with latest_submitted_version as ( select application_id, max(version_number) as version_number from ggircs_portal.application_revision_status where appl...
<reponame>DavidBenko/gateway UPDATE push_channels_push_devices SET expires = ?, qos = ? WHERE push_channels_push_devices.push_device_id = ? AND push_channels_push_devices.push_channel_id IN (SELECT push_channels.id FROM push_channels WHERE push_channels.id = ? AND push_channels.account_id ...
-- @description query02 for JDBC query with date by partitioning SELECT t2, dec1, b::int, bin FROM pxf_jdbc_multiple_fragments_by_date WHERE num1 >= 5 ORDER BY t1;
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jul 15, 2021 at 07:47 AM -- Server version: 8.0.25 -- PHP Version: 7.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
<gh_stars>10-100 SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE procedure [RDF.].[DeleteNode] @NodeID bigint = NULL, @NodeURI varchar(400) = NULL, @DeleteType tinyint = 1, @SessionID uniqueidentifier = NULL, -- Output variables @Error bit = NULL OUTPUT AS BEGIN -- SET NOCOUNT ON added to prevent extra r...
USE [master] GO CREATE DATABASE PQDashboard GO USE PQDashboard GO CREATE TABLE [dbo].[Node]( [ID] [uniqueidentifier] NOT NULL PRIMARY KEY, [Name] [varchar](200) NOT NULL, [Description] [varchar](max) NULL, [Enabled] [bit] NOT NULL DEFAULT 1, [CreatedOn] [datetime] NOT NULL DEFAULT getdate(), [CreatedBy] [varc...
<gh_stars>0 /* Navicat MySQL Data Transfer Source Server : Local Source Server Version : 50505 Source Host : localhost:3306 Source Database : yii_api Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2017-01-24 10:53:47 */ SET FOREIGN_KEY_CHECKS=...
<gh_stars>0 -- -- PostgreSQL database dump -- -- Dumped from database version 14.1 (Debian 14.1-1.pgdg110+1) -- Dumped by pg_dump version 14.1 (Debian 14.1-1.pgdg110+1) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_c...
<reponame>allenday/ethereum-etl CREATE EXTERNAL TABLE IF NOT EXISTS contracts ( contract_address STRING, contract_bytecode STRING ) PARTITIONED BY (start_block BIGINT, end_block BIGINT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' WITH SERDEPROPERTIES ( 'serialization.format' = ',',...
-- How many times has a member of Congress agreed to a bill that was proposed by a different party? With PartyBill AS ( SELECT bill_num, congress, party FROM (Bill JOIN Sponsor USING (bill_num, congress)) JOIN Role USING (member_id, congress) ), PartyVote AS ( SELECT bill_num, congress, chamber, party, pos...
alter table accountdetailtype add column version numeric; alter table accountdetailtype drop column isactive; alter table accountdetailtype add column isactive Boolean; update accountdetailtype set isactive=true where isactive is null;
-- get the name and profit of the products the top 5 highest profit values SELECT name, price-cost FROM items ORDER BY price-cost DESC LIMIT 5;
<reponame>benoutram/explore-education-statistics<filename>src/GovUk.Education.ExploreEducationStatistics.Data.Model/Migrations/20200713151302_Type_Previous_ReleaseType.sql CREATE TYPE ReleaseType AS TABLE ( Id UNIQUEIDENTIFIER NOT NULL, TimeIdentifier VARCHAR(6) NOT NULL, Slug VA...
<reponame>joseluisng/laravel-InstaApp CREATE DATABASE IF NOT EXISTS laravel_master; USE laravel_master; CREATE TABLE IF NOT EXISTS users( id int(255) auto_increment not null, role varchar(20), name varchar(100), surname varchar(200), nick varch...
<reponame>muzhial/plr_vehicle_system /* Navicat Premium Data Transfer Source Server : phpmystudy Source Server Type : MySQL Source Server Version : 50726 Source Host : localhost:3306 Target Server Type : MySQL Target Server Version : 50726 File Encoding : 65001 Date: 27/04/20...
-- Created by Vertabelo (http://vertabelo.com) -- Last modification date: 2018-08-29 03:58:01.193 -- tables -- Table: client CREATE TABLE client ( password varchar(200) NOT NULL, isAdmin BOOLEAN NOT NULL DEFAULT 0, username varchar(200) NOT NULL, id int NOT NULL AUTO_INCREMENT, UNIQUE INDEX usernam...
<reponame>nbrendler/bg-api BEGIN; TRUNCATE TABLE games CASCADE; INSERT INTO games (id, name, description, minPlayers, maxPlayers, publisher) VALUES (1, '7 Wonders', 'drafting game', 2, 7, 'Asmodee'), (2, 'Five Tribes', 'thing with meeples', 2, 4, 'Days of Wonder') ON CONFLICT DO NOTHING; TRUNCATE TABLE genres CASCADE;...
CREATE DATABASE IF NOT EXISTS `simpleapi` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; USE `simpleapi`; /* Create table for `posts` */ DROP TABLE IF EXISTS `posts`; CREATE TABLE `posts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `content` l...
<reponame>jberesni/AAS-SQL -------------------------------------------------------------------- -- DBtimeMetricHistory.sql -- -- AWR data extractor for load, response and avg active sessions data -- output into comma-delimited format for spreadsheet import -- -- Copyright(c) 2007 <NAME>, Oracle USA -------------...
CREATE PROCEDURE [dbo].[uspVacancySelectCountByRelationshipId] @RelationshipId int, @VacancyManagerId int = 0, @Impersonated bit = 0 AS BEGIN SET NOCOUNT ON IF(@Impersonated <>0) BEGIN select count(VacancyId) as 'VacancyCount' from Vacancy v inner join [VacancyOw...
<gh_stars>10-100 \. D:\github\trunk\model\db\INS_USER.sql \. D:\github\trunk\model\db\INS_ROLE.sql \. D:\github\trunk\model\db\INS_USER_ROLE_MAP.sql \. D:\github\trunk\model\db\INS_DOC_REPO.sql \. D:\github\trunk\model\db\INS_DOC_TYPE.sql \. D:\github\trunk\model\db\INS_DOC_TAG_INFO.sql \. D:\github\trunk\model\db\INS_...
CREATE DATABASE CrimeInvestigations; -- Create the table in the specified schema CREATE TABLE CrimeInvestigations.police_station ( police_stationId INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -- primary key AUTO_INCREMENT column username VARCHAR(20) NOT NULL, password VARCHAR(20) Not NULL -- speci...
<reponame>yorek/azure-sql-db-samples<filename>samples/02-resilient-connections/sql/00-setup.sql DROP TABLE IF EXISTS [dbo].[TestResiliency]; CREATE TABLE [dbo].[TestResiliency]( [Id] INT IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED, [ThreadId] INT NOT NULL, [InsertedAt] DATETIME2(7) NOT NULL DEFAULT (SYSUTCDATETIME...
DROP TABLE IF EXISTS vetd.doc_resp;
IF EXISTS (select * from dbo.sysobjects where id = object_id(N'uspDeleteEntityToDoCommentByIdent') AND OBJECTPROPERTY(id, N'IsProcedure') = 1) DROP PROCEDURE uspDeleteEntityToDoCommentByIdent GO /* uspDeleteEntityToDoCommentByIdent * * * * */ CREATE PROCEDURE [dbo].[uspDeleteEntityToDoCommentByIdent] @intIden...
<reponame>godtaehee/aurora-relayer<filename>etc/schema/functions/eth_getFilterLogs.sql DROP FUNCTION IF EXISTS eth_getFilterLogs_block(bytea) RESTRICT; DROP FUNCTION IF EXISTS eth_getFilterLogs_event(bytea) RESTRICT; DROP FUNCTION IF EXISTS eth_getFilterLogs_transaction(bytea) RESTRICT; CREATE FUNCTION eth_getFilterLo...
-- Add user id and IP address to update_last_modified() -- $Id create or replace function acs_object__update_last_modified (integer, integer, integer) returns integer as ' declare acs_object__update_last_modified__object_id alias for $1; acs_object__update_last_modified__modifying_user alias for $...
-- Name: GetVisualReviewStatusCountsById -- Schema: posda_files -- Columns: ['review_status', 'num_series'] -- Args: ['visual_review_instance_id'] -- Tags: ['signature', 'phi_review', 'visual_review', 'visual_review_new_workflow'] -- Description: Get a list of Series By Visual Review Id and Status -- select distin...
<reponame>Zhaojia2019/cubrid-testcases --+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; create table t1(a varchar(10) ); insert into t1 values ('AAA'); insert into t1 values ('BBA'); insert into t1 values ('BBB'); insert into t1 values ('CCC'); insert into t1 values ('CAC'); create index i_t1_pr on t1...
<gh_stars>0 -- MariaDB dump 10.17 Distrib 10.4.14-MariaDB, for Win64 (AMD64) -- -- Host: 127.0.0.1 Database: to-do-app -- ------------------------------------------------------ -- Server version 10.4.14-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULT...
<gh_stars>0 -- MySQL dump 10.13 Distrib 5.5.49, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: tommy -- ------------------------------------------------------ -- Server version 5.5.49-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_R...
<filename>asdi-resources/resources/sql/asdi-users.sql INSERT INTO oskari_users(user_name, first_name, last_name, uuid) VALUES('admin', 'Antti', 'Aalto', 'asdf-asdf-asdf-asdf-asdf'); INSERT INTO oskari_users(user_name, first_name, last_name, uuid) VALUES('Arcticsdi', 'Arctic', 'sdi', '29d9-11e4-8c21-c9a6-asdi'); INSERT...
/* Cheapest Properties https://platform.stratascratch.com/coding/9625-cheapest-properties?python= Difficulty: Easy -- Find the price of the cheapest property for every city Tables: airbnb_search_details id int price float property_type varchar room_ty...
<filename>DevTools/UnifiedPortal/Database/Scripts/InitialLoading/Enum/Drop/PermissionGroupTable.sql DROP TABLE [enum].[PermissionGroup];
<gh_stars>0 DROP DATABASE IF EXISTS employee_db; CREATE DATABASE employee_db; USE employee_db; CREATE TABLE employee ( id INT NOT NULL, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, role_id INT NOT NULL, manager_id INT, PRIMARY KEY (id) ); CREATE TABLE department ( ...
<filename>cybet_seed.sql<gh_stars>1-10 insert into user_account_types (id, ac_type_name, description, created, updated, deleted) values (1, 'ROOT', 'Root Account', now(), now(), 'NO'); insert into user_account_types (id, ac_type_name, description, created, updated, deleted) values (2, 'BOOKMAKER', 'Bookmaker Account', ...
<reponame>villdimova/SoftUni-CSharpDataBase SELECT FirstName + ' ' + LastName AS Mechanic, j.[Status], j.IssueDate FROM Mechanics m LEFT JOIN Jobs j ON j.MechanicId=m.MechanicId ORDER BY m.MechanicId,j.IssueDate,j.JobId
<reponame>DonThomz/M1-project-team3-jee-v2<gh_stars>1-10 /** Interns data 10 interns **/ INSERT INTO INTERN (tutor_id,student_id) VALUES (2,1); INSERT INTO INTERN (tutor_id,student_id) VALUES (1,2); INSERT INTO INTERN (tutor_id,student_id) VALUES (1,3); INSERT INTO INTERN (tutor_id,student_id) VALUES (1,4); INS...
/* <documentation> <summary>Find Foreign Key Chains For Tables</summary> <returns>nothing.</returns> <issues>No</issues> <author><NAME></author> <created>2019-08-20</created> <modified>2019-08-24 by <NAME></modified> <version>1.0</version> <sourceLink>https://github.com/ktaranov/sqlserver-kit/b...
-- randexpr1.test -- -- db eval {SELECT 17 & t1.d-(select +max(case when not exists(select 1 from t1 where (a<=t1.f)) then -19 else -t1.d end)- -min(t1.f+t1.f-(select (count(*)) from t1)) from t1)- -19 & b-d+coalesce((select max(d) from t1 where e-t1.a in (19,b,11) or e in (19,t1.b,c)),11) FROM t1 WHERE (11<=11 and ...
<reponame>AlinaS96/Movie-Manager<filename>trigger.sql -- get result of genra. SELECT m.name, array_agg(g.name) as genras FROM movie m, genra g, "moviegenra" mg WHERE m.id = mg."movieid" and g.id = mg."genraid" group by m.name; SELECT * FROM "genra"; -- resources for rating. --DROP TRIGGER validate_rating_trigger o...
CREATE SEQUENCE SEQ_IACUC_PROTO_CORR_ID INCREMENT BY 1 START WITH 1 NOCACHE /
-- These must be run together to avoid errors -- ALTER TABLE EPS_PROPOSAL DROP CONSTRAINT FK_EPS_PROPOSAL_DOCUMENT; ALTER TABLE EPS_PROPOSAL MODIFY (DOCUMENT_NUMBER VARCHAR2(40)); ALTER TABLE EPS_PROPOSAL_DOCUMENT MODIFY (DOCUMENT_NUMBER VARCHAR2(40)); ALTER TABLE EPS_PROPOSAL ADD CONSTRAINT FK_EPS_PROPOSAL_DOCUME...
<filename>aspnet/mvc/overview/getting-started/database-first-development/setting-up-database/samples/sample3.sql CREATE TABLE [dbo].[Enrollment] ( [EnrollmentID] INT IDENTITY (1, 1) NOT NULL, [Grade] DECIMAL(3, 2) NULL, [CourseID] INT NOT NULL, [StudentID] INT NOT NULL, PRIMARY KEY CLU...
col datetime new_value datetime; select to_char(sysdate, 'YYYY-MM-DD_HH24-MI-SS') datetime from dual; ------ (Step 04) @C:\EHRP2B\UPDATE_NWK_actsec_RETAINED_STEP SPOOL /home/sa-biisint/data/int/log/EHRP2BIIS_UPDATE_AFTERLOAD_&&datetime..log UPDATE nknight.nwk_action_secondary_tbl a SET a.retnd1_step_cd = NULL...