sql
stringlengths
6
1.05M
<reponame>dbrtly/ra_data_warehouse<gh_stars>100-1000 {% if var("marketing_warehouse_ad_campaign_performance_sources") and var("product_warehouse_event_sources") and var("marketing_warehouse_ad_campaign_sources") %} {{ config( alias='ad_campaign_performance_fact' ) }} WITH campaign_performance AS ( ...
<filename>tests/queries/0_stateless/01651_map_functions.sql set allow_experimental_map_type = 1; -- String type drop table if exists table_map; create table table_map (a Map(String, String), b String) engine = Memory; insert into table_map values ({'name':'zhangsan', 'age':'10'}, 'name'), ({'name':'lisi', 'gender':'fe...
<filename>lib/auto/OpusVL/EventLog/Schema/sql/PostgreSQL/upgrade/1-2/001-auto.sql -- Convert schema '/opt/local/fb11/fb11/lib/auto/OpusVL/EventLog/Schema/sql/_source/deploy/1/001-auto.yml' to '/opt/local/fb11/fb11/lib/auto/OpusVL/EventLog/Schema/sql/_source/deploy/2/001-auto.yml':; ; BEGIN; ; ALTER TABLE event_log AD...
/* This script updates data set field with picklist values */ -- update value column of data_set_field with comma separated string of possible picklist values call getPickListCSV(@values,'box','olympiad_box_experiment_data_mv'); update data_set_field set value = @values where name = 'box_name' and data_set_id IN (...
<reponame>golang-cafe/job-board<gh_stars>0 CREATE TABLE IF NOT EXISTS users ( id CHAR(27) NOT NULL UNIQUE, email VARCHAR(255) NOT NULL, username VARCHAR(255) NOT NULL, created_at TIMESTAMP, PRIMARY KEY (id) ); ALTER TABLE users DROP COLUMN username; CREATE TABLE IF NOT EXISTS user_sign_on_token ( token CHAR(27) ...
<reponame>jmohr/conrad CREATE TABLE artist ( id INTEGER PRIMARY KEY, name STRING NOT NULL ); CREATE TABLE album ( id INTEGER PRIMARY KEY, title STRING NOT NULL, artist_id INTEGER, FOREIGN KEY(artist_id) REFERENCES artist(id) ); -- Insert some artists INSERT INTO artist (name) VALUES ('<NAME>')...
--test all types as the argument set timezone 'Asia/Seoul'; --test: normal select sessiontimezone; select sessiontimezone(); --test: constant select sessiontimezone(1); select sessiontimezone('a'); --test: all types of columns as argument drop table if exists all_types; create table all_types( c_short short, c_in...
<reponame>CarlosM0905/Proyecto_ISO_FINAL<gh_stars>0 INSERT INTO company VALUES (1,'<NAME>','Jr. Los Nogales 374, Cajamarca','Cajamarca',NULL,'Agroindustria'), (2,'Agricola Hoja Redonda SA','Calle Chinchón 1018 Of.501, San Isidro','Lima','706-2241','Agroindustria'), (3,'Agrofood Andina SAC','Urb. Taparachi L...
<filename>balances.sql SELECT * FROM( SELECT s.clientID client_id, (SUM(p.val) - SUM(s.saleTotal)) balance, CASE -- band_name_value could be NULL or "" WHEN (CHAR_LENGTH(band.field_band_name_value) > 0) THEN band.field_band_name_value -- some first/last have a trailing/leading space ...
CREATE OR REPLACE PROCEDURE tdm.namespace_delete ( a_namespace_id in int default null, a_err inout character varying default null ) SECURITY DEFINER LANGUAGE plpgsql AS $$ /** Procedure namespace_delete deletes a namespace | Parameter | In/Out | Datatype | Remarks | | ...
<gh_stars>0 use Trial; #Primary database show tables; select userId, password from passwords where userId like "%1001%" and password ="<PASSWORD>" or password = "<PASSWORD>" order by userId limit 5;
<filename>crawler/src/scripts/DDL/FUNC/COMBS_FUNC.sql CREATE OR REPLACE FUNCTION now_milli RETURN NUMBER IS v_datenumber NUMBER(15); BEGIN SELECT TO_NUMBER(SYSDATE - TO_DATE('1970-01-01 8:0:0', 'YYYY-MM-DD HH24:MI:SS')) * 24 * 60 * 60 * 1000 INTO v_datenumber FROM DUAL; RETURN v_datenumber; END; / C...
DROP PROCEDURE IF EXISTS get_tag_recent_nodes; DELIMITER ;; CREATE DEFINER=web@localhost PROCEDURE get_tag_recent_nodes(IN $tids VARCHAR(20000), IN $limit INT) COMMENT 'get recent nodes for a list of given tags' BEGIN IF LOCATE(',', $tids) = 0 THEN SELECT id AS nid, title, create_time FROM node...
<filename>dotProject-2.2.0/db/upgrade_20_to_201.sql # # $Id$ # # DO NOT USE THIS SCRIPT DIRECTLY - USE THE INSTALLER INSTEAD. # # All entries must be date stamped in the correct format. # # 20050404 - minical config var restaured INSERT INTO `config` VALUES (null, 'cal_day_view_show_minical', 'true', '', 'checkbox')...
INSERT INTO burgers (burger_name) VALUES ('<NAME>'); INSERT INTO burgers (burger_name) VALUES ('<NAME>'); INSERT INTO burgers (burger_name, devoured) VALUES ('Ring Of Fire Burger', true); INSERT INTO burgers (burger_name, devoured) VALUES ('Put Some Hairs On Your Chest Burger', true);
<reponame>Hchest/nodejs<gh_stars>0 -- 2020年3月11日 -- 北大 组1 -- 查询围手术期(30天内)死亡的患者 SELECT die.PATIENT_NO INTO #perioperative_period FROM (-- 院内死亡 SELECT DISTINCT a.PATIENT_NO FROM [dbo].[PAT_SD_ITEM_RESULT] AS a WHERE a.SD_ITEM_CODE = 'YXA_O_209' AND a.SD_ITEM_VALUE= '1' AND a.PATIENT_NO IN ( SELECT PA...
{{ config(materialized='table') }} with staging as ( select * from {{ ref('stg_customers')}} ) , transformed as ( select row_number() over (order by customer_id) as customer_sk -- auto-incremental surrogate key , customer_id , country , city , fax ...
CREATE TABLE Customer ( customerID int IDENTITY(1,1) NOT NULL, customerName varchar(255) NOT NULL ); SET IDENTITY_INSERT dbo.Customer ON; INSERT dbo.Customer (customerID, customerName) VALUES (1, 'Captain America'); INSERT dbo.Customer (customerID, customerName) VALUES (2, '<NAME>'); INSERT dbo.Customer (cu...
EXEC [EST].[Proc_yjbb_Ins] @Code = N'603987',@CutoffDate = N'2017-09-30',@EPS = N'0.29',@EPSDeduct = N'0',@Revenue = N'9.37亿',@RevenueYoy = N'14.26',@RevenueQoq = N'3.63',@Profit = N'9040.74万',@ProfitYoy = N'18.26',@ProfiltQoq = N'21.47',@NAVPerUnit = N'3.7976',@ROE = N'7.70',@CashPerUnit = N'0.5606',@GrossProfitRate =...
<gh_stars>1-10 CREATE USER apilog_dev_user WITH ENCRYPTED PASSWORD '*****';
CREATE TABLE site (id INTEGER PRIMARY KEY, site_name CHARACTER VARYING(100) NOT NULL, lat FLOAT NOT NULL, lon FLOAT NOT NULL, start_query BOOLEAN NOT NULL DEFAULT(FALSE) ); CREATE INDEX site_name_index ON site(site_name); CREATE INDEX start_query ON site(start_query); CREATE TABLE photo (id BIGINT PRIMARY KEY, url T...
DROP TABLE IF EXISTS vetd.categories; --;; CREATE TABLE vetd.categories (id bigint NOT NULL, idstr text, cname text, created timestamp with time zone, updated timestamp with time zone, deleted timestamp with time zone) --;; ALTER TABLE vetd.categories OWNER TO vetd --;; GRANT SELECT ON TABLE vetd.categories TO hasura;
<gh_stars>100-1000 -- malloc.test -- -- execsql {INSERT INTO t1 VALUES(3, 4)} INSERT INTO t1 VALUES(3, 4)
-- original: wal3.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test PRAGMA cache_size = 2000; PRAGMA page_size = 1024; PRAGMA auto_vacuum = off; PRAGMA synchronous = normal; PRAGMA journal_mode = WAL; PRAGMA wal_autocheckpoint = 0; BEGIN; CREATE TABLE t1(x); INSERT...
INSERT into MOB_AUTH_METHOD_RULE_STEPS (ID_AUTHENTICATION_METHOD_RULE,INT_ORDER,ID_CURRENCY,AMNT_MAX_AMOUNT_ALLOWED,ID_AUTHENTICATION_METHOD,DAT_CREATION,ID_CUSTOMER_CREATION) VALUES (9,1,'USD',null,9,#CURRENT_TIMESTAMP#,0); INSERT INTO MOB_RESTRICTIONS_GROUPS (ID_RESTRICTIONS_GROUP,STR_RESTRICTIONS_GROUP,DAT_CREATION...
<gh_stars>0 /* Navicat MySQL Data Transfer Source Server : job备库 Source Server Version : 80012 Source Host : 10.1.7.10:3306 Source Database : ApolloPortalDB Target Server Type : MYSQL Target Server Version : 80012 File Encoding : 65001 Date: 2020-07-10 15:12:37 */ SET FOREIGN_KEY_...
<filename>schema/mysql.sql CREATE TABLE IF NOT EXISTS clicktail.mysql_slow_log ( `_time` DateTime, `_date` Date default toDate(`_time`), `_ms` UInt32, client String, query String, normalized_query String, query_time Float32, user String, statement String, tables String, sche...
<filename>data/sql/2016-11-23_alter_table_users.sql ALTER TABLE `users` ADD names_en VARCHAR(255) NULL; ALTER TABLE `users` ADD description text NULL; ALTER TABLE `users` ADD description_en text NULL; ALTER TABLE `users` ADD parent_user_id int(11) NULL; ALTER TABLE `users` ADD price_id int(11) NULL;
<gh_stars>1-10 USE [AIDE] GO /****** Object: StoredProcedure [dbo].[sp_GetResourcePlanner] Script Date: 01/06/2020 1:41:40 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND OBJECT_ID = OBJECT_ID('dbo.sp_GetResourcePlanner')) BEGIN ...
-- Changing type of cannotBeInSet validation criterion from integer to string UPDATE TypeValidation SET TYPE_ID = 2 WHERE id = 4;
-- BASHI-105: Move Fixed Commission Amounts into Database CREATE TABLE IF NOT EXISTS inventory.fixed_commission_amount ( product_code VARCHAR(12) PRIMARY KEY, amount NUMERIC(6, 2) ); WITH temp_fixed_commission_amount_json (doc) AS ( values ('$FixedCommissionAmountJson$'::json) ) INSERT INTO inventor...
<filename>AppIntegrationExample/src/content/files/vora/createTables.sql -- c4c Accounts - CSV --------------------------------------------------------- drop table "com_appInt_c4c_Accounts_CSV"; create table "com_appInt_c4c_Accounts_CSV" ( "AccountID" NVARCHAR(10), "UUID" NVARCHAR(36), "ExternalID" NVARCHAR(10...
<reponame>wjf8882300/password /* SQLyog Ultimate v12.09 (64 bit) MySQL - 5.7.25-log : Database - cp ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_...
<filename>SQL/220-Speelgoed en spellen/25956-Muziekinstrumenten.sql INSERT Items(ID,Titel,Categorie,Postcode,Locatie,Land,Verkoper,Prijs,Valuta,Conditie,Thumbnail,Beschrijving) VALUES (111117648858,'12 Inch Gummibar-ik ben uw GUMMIBEAR-muzikale zacht stuk speelgoed',25956,'PR21JA','Verenigd Koninkrijk','GB','toyland-1'...
-- Enable PostGIS (as of 3.0 contains just geometry/geography) CREATE EXTENSION IF NOT EXISTS postgis;
alter table egbpa_application add column senttocitizen boolean default false;
<reponame>buse974/twic-api<filename>data/db/111-cascade.sql ALTER TABLE `conversation` DROP FOREIGN KEY `fk_conversation_1`; ALTER TABLE `conversation` ADD CONSTRAINT `fk_conversation_1` FOREIGN KEY (`conversation_opt_id`) REFERENCES `conversation_opt` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
INSERT INTO `table2` (table1_id,ut) VALUES (1,'2016-08-10 14:16:00'), (2,'2016-08-10 14:16:00'), (3,'2016-08-10 14:16:00');
--ZAD10 select table_name from information_schema.tables WHERE table_schema = 'public' AND table_type = 'BASE TABLE'
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 28 Des 2019 pada 22.58 -- Versi server: 10.1.38-MariaDB -- Versi PHP: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
<reponame>MS-BI/JobExceutionFramework<gh_stars>1-10 CREATE TABLE [internal].[environment_variables] ( [variable_id] BIGINT IDENTITY (1, 1) NOT NULL, [environment_id] BIGINT NOT NULL, [name] [sysname] NOT NULL, [description] NVARCHAR (1024) NULL, [type] ...
<reponame>Azure-Samples/azure-sql-db-dynamic-schema drop table if exists dbo.todo_sample; go create table dbo.todo_sample ( id int not null primary key default (next value for [global_sequence]), todo nvarchar(100) not null, completed tinyint not null default (0) ) go insert into dbo.todo_sample (todo, completed...
<filename>src/SFA.DAS.AssessorService.Database/StoredProcedures/EPAO_Register_list_of_standards.sql CREATE PROCEDURE [dbo].[EPAO_Register_list_of_standards] AS SET NOCOUNT ON; ---------------------------------------------------------------------------------------------------------------------------------------------...
-- file:triggers.sql ln:387 expect:true DROP TRIGGER after_upd_b_row_trig ON main_table
/* Navicat MySQL Data Transfer Source Server : back Source Server Version : 50717 Source Host : localhost:3306 Source Database : ssm_crud Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2019-01-16 10:58:37 */ SET FOREIGN_KEY_CHEC...
CREATE TABLE NOTIFICATION_TYPE ( NOTIFICATION_TYPE_ID DECIMAL(6,0) NOT NULL, MODULE_CODE DECIMAL(3,0) NOT NULL, ACTION_CODE VARCHAR(3) NOT NULL, DESCRIPTION VARCHAR(200) NOT NULL, SUBJECT VARCHAR(1000), MESSAGE VARCHAR(4000), PROMPT_USER ...
drop table AbsUser CASCADE CONSTRAINTS; drop table Admin CASCADE CONSTRAINTS; drop table User2 CASCADE CONSTRAINTS; drop table UserWall CASCADE CONSTRAINTS; drop table Board CASCADE CONSTRAINTS; drop table Room CASCADE CONSTRAINTS; drop table Post CASCADE CONSTRAINTS; drop table Comment2 CASCADE CONSTRAINTS; drop table...
create database bluesky; use bluesky; create table usuario ( nome varchar(50) not null, email varchar(50) not null, cpf varchar(11) primary key not null, data_nasc date not null, telefone varchar(10) not null, endereço varchar(50) not null senha varchar(8) not null ); /*create table aeronave ( id_aeronave int primar...
<filename>tests/queries/0_stateless/00752_low_cardinality_array_result.sql<gh_stars>1000+ SELECT arrayJoin(splitByChar(',', toLowCardinality('a,b,c')));
CREATE TABLE forced_exit_requests ( id BIGSERIAL PRIMARY KEY, target TEXT NOT NULL, tokens TEXT NOT NULL, -- comma-separated list of TokenIds price_in_wei NUMERIC NOT NULL, valid_until TIMESTAMP with time zone NOT NULL, created_at TIMESTAMP with time zone NOT NULL, fulfilled_by TEXT, -- comm...
<reponame>hunleyd/hypopg<filename>hypopg--1.1.2.sql -- This program is open source, licensed under the PostgreSQL License. -- For license terms, see the LICENSE file. -- -- Copyright (C) 2015-2018: <NAME> -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION hypopg" to ...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * Author: valmi * Created: 22 de jul de 2020 */ user = root password = <PASSWORD> dburl = jdbc:mysql://localhost:3306:coursejd...
<filename>SQL/SqlProfilerDB/Populate_SQLEventIDs.sql USE [TraceDB]; SET NOCOUNT ON; SET XACT_ABORT ON; GO BEGIN TRANSACTION; INSERT INTO [dbo].[SQLEventIDs]([ID], [Description]) SELECT 0, N'Reserved' UNION ALL SELECT 1, N'Reserved' UNION ALL SELECT 2, N'Reserved' UNION ALL SELECT 3, N'Reserved' UNION ALL SELECT 4, N'R...
-- Verify database-message-store:functions/cardinal_id on pg BEGIN; SELECT has_function_privilege('message_store.cardinal_id(varchar)', 'execute'); ROLLBACK;
<gh_stars>0 create or replace function getMaxNumberOfEScootersByParkCoords(latitudePar in NUMBER, longitudePar in NUMBER) return NUMBER is maxNumberOfEScooters NUMBER(2,0); BEGIN SELECT MAX_NUMESCOOTERS into maxNumberOfEScooters FROM Park INNER JOIN Place ON Park.id_park = Place.id_place WHERE ...
<filename>queries/stackoverflow/q14/a39112dc479c5326924d89a9764ecfc00f4d9dfb.sql<gh_stars>0 SELECT COUNT(*) FROM site AS s, so_user AS u1, question AS q1, answer AS a1, tag AS t1, tag_question AS tq1, badge AS b, account AS acc WHERE s.site_id = q1.site_id AND s.site_id = u1.site_id...
ALTER TABLE "UserSeason" ADD CONSTRAINT USERNAME_SEASON_ID_UNIQUE UNIQUE ("username", "seasonId");
-- *** STRUCTURE:`tbl_fields_author` *** DROP TABLE IF EXISTS`tbl_fields_author`; CREATE TABLE`tbl_fields_author` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `field_id` int(11) unsigned NOT NULL, `allow_multiple_selection` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no', `default_to_curr...
<gh_stars>0 CREATE TABLE monitor_job_locks ( lock_id NVARCHAR(50) NOT NULL, tenant_id NVARCHAR(50) NOT NULL, topic_id NVARCHAR(50) NOT NULL, frequency NVARCHAR(20) NOT NULL, process_date DATE, status NVARCHAR(20) NOT NULL, user_id NVARCHAR(50) NOT NULL, created_...
<reponame>masterbasebelajar/TA-Pendidikan.github.io -- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 1192.168.3.11 -- Waktu pembuatan: 21 Bulan Mei 2021 pada 10.22 -- Versi server: 10.4.18-MariaDB -- Versi PHP: 7.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time...
<filename>criarDB.sql /* NOME: <NAME> MATRÍCULA: 631822 COMANDO PARA CRIAR A BASE DE DADOS E RODAR TODAS AS QUERIES: source criarDB.sql; MySQL */ DROP DATABASE IF EXISTS BIBLIOTECA; /* -------------------------- CRIA DATABASE -------------------------- */ CREATE DATABASE IF NOT EXISTS BIBLIOTECA; USE BIBLIOTECA...
-- -------------------------------------------------------- -- 호스트: 127.0.0.1 -- 서버 버전: 10.1.22-MariaDB - mariadb.org binary distribution -- 서버 OS: Win64 -- HeidiSQL 버전: 9.4.0.5125 -- ------------------------------------------------...
-- args: (_tbl, _col, _fk) CREATE OR REPLACE FUNCTION update_counter_cache() RETURNS TRIGGER AS $$ DECLARE _tbl regclass := TG_ARGV[0]; _col varchar := TG_ARGV[1]; _fk varchar := TG_ARGV[2]; -- UPDATE posts SET comments_count = comments_count + 1 WHERE id = #{comments.post_id} _increment varcha...
<reponame>azhai/hack-igniter -- Adminer 4.6.3 MySQL dump SET NAMES utf8; SET time_zone = '+08:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; SET NAMES utf8mb4; DROP TABLE IF EXISTS `t_accounts`; CREATE TABLE `t_accounts` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user...
-- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64) -- -- Host: localhost Database: sucos_vendas -- ------------------------------------------------------ -- Server version 8.0.15 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */...
<gh_stars>100-1000 -- randexpr1.test -- -- db eval {SELECT case when not t1.c not in (13,d,~case when coalesce((select max((abs(t1.c)/abs(t1.e))) from t1 where b-t1.d+b+t1.f>a),t1.a) in (select 19 from t1 union select t1.a from t1) then -b else a end*b & d) and -(t1.b)>=e and 11<d or ((19))<> -t1.c then t1.f else t1...
<reponame>simonpane/Logger set sqlprompt '' set feedback off set linesize 200 set serverout on set termout off alter package logger compile body PLSQL_CCFLAGS='NO_OP:TRUE'; spool logger_no_op.pkb prompt create or replace begin dbms_preprocessor.print_post_processed_source ( object_type =...
<filename>src/hg/lib/ucscToINSDC.sql # UCSC to INSDC chromosome name translation CREATE TABLE ucscToINSDC ( chrom varchar(255) not null, # Human chromosome or FPC contig chromStart int unsigned not null, # Start position in chromosome chromEnd int unsigned not null, # End position in chromosome name var...
<reponame>insthync/UnityMultiplayerARPG_MMO<filename>SQLs/mysql_main.sql SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; -- -- Database: `mmorpg_kit` -- -- -------------------------------------------------------- -- -- Table structure for table `buildings` -- CREATE TABLE `build...
SELECT DEC(REGR_R2(y,x),15,2) as "Best Fit" FROM ?SCHEMA?.xycoords
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 07, 2020 at 05:35 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
-- -- General trigger test -- create function printTriggerInfo() returns varchar(1) PARAMETER STYLE JAVA LANGUAGE JAVA NO SQL EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.Triggers.printTriggerInfo'; create function triggerFiresMin(s varchar(128)) returns varchar(1) PARAMETER STYLE JAVA LANGUAGE JA...
<filename>WPFSqlDemo/WPFAppDB/dbo/Tables/Tasks.sql CREATE TABLE [dbo].[Tasks] ( [TaskId] INT NOT NULL PRIMARY KEY IDENTITY, [Description] NVARCHAR(50) NULL, [Done] BIT NULL, [DateCompleted] DATE NULL, [CategoryId] INT NULL, [UserId] INT NULL, CONSTRAINT [CategoryId] FOREIGN KEY ([Categor...
SELECT COUNT(*) FROM no_nulls WHERE binary_10 <> X'10' 98
SET DEFINE OFF; Insert into YUG_OWNER.REF_PREFERENCE_TYPE (ID_PK, VERSION, CREATED_TS, UPDATED_TS, UPDATED_BY_USER, UPDATED_BY_TXN_ID, CONFIG_LANGUAGE_CODE_KEY, KEY, VALUE) Values ('1', 0, TO_TIMESTAMP('7/5/2017 11:16:32.459000 AM','fmMMfm/fmDDfm/YYYY fmHH12fm:MI:SS.FF AM'), TO_TIMESTAMP('7/5/2017 11:16:32.45900...
<gh_stars>1-10 SET enable_debug_queries = 1; set allow_experimental_cross_to_join_conversion = 0; select * from system.one cross join system.one; set allow_experimental_cross_to_join_conversion = 1; select * from system.one cross join system.one; DROP TABLE IF EXISTS t1_00826; DROP TABLE IF EXISTS t2_00826; CREATE T...
/* Schema V1.7: Add outbound acknowledgement code to log.dead_letter */ create table dictionary.acknowledgement_code ( ack_code char(2) not null, description varchar(100) not null, constraint dictionary_acknowledgementcode_ackcode_pk primary key (ack_code), constraint dictionary_acknowledgementcode_ackcode_ck c...
<reponame>opengauss-mirror/Yat -- @testpoint:opengauss关键字open非保留),作为序列名 --关键字不带引号-成功 drop sequence if exists open; create sequence open start 100 cache 50; drop sequence open; --关键字带双引号-成功 drop sequence if exists "open"; create sequence "open" start 100 cache 50; drop sequence "open"; --关键字带单引号-合理报错 drop sequence ...
<gh_stars>0 -- @testpoint:opengauss关键字table_name(非保留),作为用户名 --关键字explain作为用户名不带引号,创建成功 drop user if exists table_name; CREATE USER table_name PASSWORD '<PASSWORD>'; drop user table_name; --关键字explain作为用户名加双引号,创建成功 drop user if exists "table_name"; CREATE USER "table_name" PASSWORD '<PASSWORD>'; drop user "table_name...
-- phpMyAdmin SQL Dump -- version 4.7.6 -- https://www.phpmyadmin.net/ -- -- Host: mysql -- Generation Time: 2017-12-10 01:25:17 -- 服务器版本: 8.0.3-rc-log -- PHP Version: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
<reponame>Edufacr/University-DB1-Project SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <NAME> -- Create date: -- Description: calculates Fee value -- ============================================= CREATE OR ALTER PROCEDURE dbo.SP_calculateFeeValue @inO...
<reponame>imajaydwivedi/Problem-Task---SQL-Server-Slowness To migrate the SSRS from 2008 to SSRS 2014, you can following steps below to use the RS.exe script to copies content items and settings from one SQL Server Reporting Services report server to another report server(for example reports and subscriptions,security ...
USE tanteemma; DELETE FROM person; DELETE FROM artikel; DELETE FROM art_kategorie; DELETE FROM bestellpositionen; DELETE FROM kunde; DELETE FROM bestellung; DELETE FROM angestellte; INSERT INTO person VALUES (0, 'Derksen', 'Jannis', 'Haupstraße', '3', '12345', 'Köln', '022112345', '<EMAIL>'); INSERT INTO person VALUE...
<reponame>mmihaylov82/Database-Basics-MS-SQL USE SoftUni -- 1. -- SELECT TOP(5) e.EmployeeID, e.JobTitle, e.AddressID, a.AddressText FROM Employees AS e JOIN Addresses AS a ON e.AddressID = a.AddressID ORDER BY e.AddressID -- 2. -- SELECT TOP(50) e.FirstName, e.LastName, t.Name AS Town, a.AddressText FROM Emplo...
<reponame>BOONRewardsInc/rewards -- -- Copyright (c) Microsoft Corporation. All rights reserved. -- Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. -- CREATE PROCEDURE AddClaimedDeal @globalUserId uniqueidentifier ,@cardId int ,@globalDealId uniqueidentifier ...
<reponame>thangnt336/Employee-Management-System DROP DATABASE IF EXISTS employee_DB; CREATE database employee_DB; USE employee_DB; CREATE TABLE department ( id INT AUTO_INCREMENT NOT NULL, department_name VARCHAR(30) NOT NULL, PRIMARY KEY (id) ); INSERT INTO `department` VALUES (1,'Human Resources'),(2,'...
// Constraints // http://neo4j.com/docs/stable/query-constraints.html // // The URI should always be unique. In some cases it makes sense to force a // unique name as well. // // Class names follow the schema below: // Schema: <Ontology Abbreviation>:<Ontology ID> // E.g.: owl:thing CREATE INDEX on :Class(name); CREAT...
/* Replace with your SQL commands */ ALTER TABLE `activities` CHANGE COLUMN `name` `name` TEXT NOT NULL , CHANGE COLUMN `duration_minutes` `duration_minutes` INT(11) NOT NULL , CHANGE COLUMN `start_time` `start_time` DATETIME NOT NULL DEFAULT '1970-01-01 00:00:01' , CHANGE COLUMN `end_time` `end_time` DATETIME NOT NULL...
-- file:regex.sql ln:41 expect:true select regexp_matches('a', 'a(?!b)b*')
-- ============================================= -- Author: <NAME> -- Create date: 2015 -- Description: This parses the system_health extended events file and searches for deadlocks. -- It then extracts all the data you need to understand the deadlock in a nice little table. -- Not all the columns are presented ...
<filename>01-Lesson-Plans/09-SQL/3/Activities/11-Stu_Unions/Solved/stu_unions.sql -- Question 1 SELECT COUNT(*) FROM city UNION SELECT COUNT(*) FROM country; -- Question 2 SELECT customer_id FROM customer WHERE address_id IN ( SELECT address_id FROM address WHERE city_id IN ( SELECT city_id FROM ci...
-- 2018-02-12T16:58:41.523 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET IsReadOnly='N',Updated=TO_TIMESTAMP('2018-02-12 16:58:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=540739 ; -- 2018-02-12T16:58:47.674 -- I forgot to set the DICTIONARY_ID_COMMENTS System Config...
<gh_stars>0 INSERT INTO `course` (`id`, `title`, `subtitle`, `status`, `buyable`, `buyExpiryTime`, `type`, `maxStudentNum`, `price`, `originPrice`, `coinPrice`, `originCoinPrice`, `expiryMode`, `expiryDay`, `showStudentNumType`, `serializeMode`, `income`, `lessonNum`, `giveCredit`, `rating`, `ratingNum`, `vipLevelId`, ...
<reponame>haikalzain/melbourne-datathon-2017<gh_stars>1-10 /*------------------------------------------ Melbourne Datathon 2017 Some SQL that will load all the data into an SQL Server database --------------------------------------------*/ --------------- --TRANSACTIONS --------------- CREATE TABLE TRANSACTIONS ( P...
<reponame>andreylipattsev/almanac.httparchive.org #standardSQL CREATE TEMPORARY FUNCTION getPropertyPairs(css STRING) RETURNS ARRAY<STRUCT<pair STRING, freq INT64>> LANGUAGE js OPTIONS (library = "gs://httparchive/lib/css-utils.js") AS ''' try { function compute(ast) { let usedTogether = {}; walkRules(ast.st...
<filename>SQLQuery1.sql<gh_stars>0 select * from Osoba
<reponame>FernandoCalmet/databases<gh_stars>0 SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for Accounts -- ---------------------------- DROP TABLE IF EXISTS `Accounts`; CREATE TABLE `Accounts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `status` varchar(30) NOT NULL, `createdDate` d...
<filename>database/cpeacs_database.sql -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 09, 2017 at 06:23 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 7.1.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @O...
<gh_stars>0 CREATE PROCEDURE [dbo].[usp_TotalRegisteredStudents] @term varchar(6), @userid int AS select s.lastname, s.firstname, s.studentid, rp.majorcode major , r.address1, r.address2, r.city, r.[state], r.zip, s.email as PrimaryEmail , r.email as SecondaryEmail, rp.numbertickets , etp.numbertickets a...
<filename>createViewCustomers.sql create view [Customer Info] as select Surname, Name, Birthdate, Phone, Email from Customer