sql
stringlengths
6
1.05M
-- file:tsearch.sql ln:524 expect:true select * from pendtest where 'ipsu:*'::tsquery @@ ts
<gh_stars>10-100 -- This migration script adds the old index for GoSearch -- The new index will be managed by sequelize -- This must be run before the deployment of the sequelize managed index. DROP INDEX IF EXISTS urls_weighted_search_idx;
DROP VIEW IF EXISTS "de_metas_endcustomer_fresh_reports".PickingList; DROP VIEW IF EXISTS de_metas_endcustomer_fresh_reports.PickingList; CREATE OR REPLACE VIEW de_metas_endcustomer_fresh_reports.PickingList AS SELECT v.bpartnervalue, v.bpartnername, v.bpartneraddress_override, v.orderdocumentno, v.warehousename,...
<reponame>IUIDSL/Chem2Bio2RDF<gh_stars>0 SELECT chembl_15_source.src_id, chembl_15_source.src_description, chembl_15_source.src_short_name, q1.cpd_count FROM chembl_15_source, ( SELECT chembl_15_source.src_id, count(chembl_15_compound_records.record_id) AS cpd_count FROM chembl_15_source, chembl_15_c...
-- -- Copyright 2005-2014 The Kuali Foundation -- -- Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php -- -- Unless required by ap...
set define off set sqlblanklines on spool KRC_RICE-RELEASE-5_0-Upgrade-ORACLE-Install.log @../../current/5.0/rice/KRC_RICE_01_2.0.0-2.1.0_2012-04-19_B000.sql @../../current/5.0/rice/KRC_RICE_02_2.0.0-2.1.0_2012-05-17_B000.sql commit; exit
\echo 'Flood Zone 2 - Dropping original table' DROP TABLE fmp.floodzone_2;
DROP SCHEMA public CASCADE; CREATE SCHEMA public; CREATE EXTENSION "pgcrypto" WITH SCHEMA public; DROP SCHEMA mail CASCADE; CREATE SCHEMA mail; CREATE TYPE mail.actions AS ENUM ('send', 'reply', 'forward'); CREATE SEQUENCE mail.email_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE ...
-- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information. -- add primary keys to base tables IF NOT EXISTS(S...
<gh_stars>0 /* Onix Pilot Discovery Service - Copyright (c) 2018-2021 by www.gatblau.org Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ...
/* Navicat MySQL Data Transfer Source Server : mysql Source Server Version : 50720 Source Host : localhost:3306 Source Database : school Target Server Type : MYSQL Target Server Version : 50720 File Encoding : 65001 Date: 2019-06-13 18:45:13 */ -- 创建数据库并使用 CREATE DATABASE `school` ...
<gh_stars>1-10 CREATE TABLE [dbo].[Users_AccountRequest] ( [Request_ID] [int] NOT NULL IDENTITY(1, 1), [REQUEST_DATE] [smalldatetime] NULL, [IPAddress] [varchar] (20) COLLATE Latin1_General_100_CI_AI NULL, [User_ID] [int] NULL, [PreferredUserName] [varchar] (50) COLLATE Latin1_General_100_CI_AI NOT NULL, [StartLanguage...
<filename>database/test/package/test_lineage_util.pkb create or replace package body test_lineage_util is -- -- test_set_get_recursive -- procedure test_set_get_recursive is begin -- true lineage_util.set_recursive(1); ut.expect(1).to_equal(lineage_util.get_recursive); -- false ...
<reponame>pdv-ru/ClickHouse SELECT sum(ignore(*)) FROM (SELECT arrayFirst(x -> empty(x), [[number]]) FROM numbers(10000000));
<filename>frame_smh/src/main/webapp/META-INF/sql/frame.sql<gh_stars>1-10 /* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50525 Source Host : localhost:3306 Source Database : frame Target Server Type : MYSQL Target Server Version : 50525 File Encoding ...
<gh_stars>0 SELECT 3 OPERATOR(pg_catalog.+) 4;
<filename>BattleShip/game/SetState.sql<gh_stars>0 CREATE PROCEDURE [game].[SetState] @ind_block_move BIT = 0 AS BEGIN TRY UPDATE game.State SET ind_block_move = @ind_block_move; END TRY BEGIN CATCH PRINT 'Fatal error: game state could not be altered.'; PRINT 'Please restart the game.'; PRINT ERROR_MESSAG...
-- phpMyAdmin SQL Dump -- version 4.4.4 -- http://www.phpmyadmin.net -- -- Vært: localhost -- Genereringstid: 19. 05 2015 kl. 08:14:08 -- Serverversion: 5.5.43 -- PHP-version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
--2.0 SQL QUERIES --2.1 SELECT EMPLOYEE (DONE) DESC employee; SELECT * FROM employee; --SELECT Emploee with last nanme King SELECT * FROM employee where lastname = 'King'; --SELECT Employee where first name is Andrew and reportsto is null SELECT * FROM employee WHERE firstname = 'Andrew' and reportsto IS NULL; --2.2 ...
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 06, 2018 at 11:38 AM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; -- -- Database: ...
<reponame>liangzi4000/grab-share-info<filename>sql/yjbb/603178.sql EXEC [EST].[Proc_yjbb_Ins] @Code = N'603178',@CutoffDate = N'2017-09-30',@EPS = N'0.34',@EPSDeduct = N'0',@Revenue = N'10.88亿',@RevenueYoy = N'23.17',@RevenueQoq = N'12.64',@Profit = N'6306.77万',@ProfitYoy = N'34.45',@ProfiltQoq = N'179.83',@NAVPerUnit ...
create table transactions ( id integer primary key, amountMicros bigint not null, isoCurrencyCode varchar(100) not null, status varchar(100) not null, description varchar(100) );
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Client: 127.0.0.1 -- Généré le: Ven 19 Janvier 2018 à 15:29 -- Version du serveur: 5.5.27-log -- Version de PHP: 5.4.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
CREATE TABLE [dbo].[dnn_EasyGalleryModuleSettings] ( [ModuleID] INT NOT NULL, [PortalID] INT NOT NULL, [EnableCommunityMode] BIT NOT NULL, [EnableAutoResize] BIT NOT NULL, [ResizeWidth] INT NOT NULL, [ResizeHeight] INT NOT NU...
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `CommonTitleActors` ( `ParentTitleID` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `TitleID` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `ActorID` varchar(10) COL...
update eg_city set domainurl=(CASE WHEN (select current_schema()) = 'state' THEN 'state.egovernments.org' ELSE 'ulb.egovernments.org' END); update eg_city set name=(CASE WHEN (select current_schema()) = 'state' THEN 'eGov Municipal Corporation' ELSE 'Digit Municipal Corporation' END); update eg_city set localname=(CASE...
drop table if exists mg_config; create table mg_config ( id bigint(20) not null comment '主键', name varchar(512) not null comment '名称', value text comment '值', remark text comment '备注', create_id bigint(20) not null comment '创建人', update_id bigint(20) default nu...
<filename>src/dbt/spotify-dash/models/spotify/most_played_artists.sql<gh_stars>1-10 {{ config(materialized='view') }} with source_data as ( select count(track_name) no_tracks, track_album_artists_0_name from {{ ref('spotify', 'playback_history') }} group by track_album_artists_0_name ) select * f...
-- -- PostgreSQL database dump -- -- Dumped from database version 10.6 -- Dumped by pg_dump version 10.10 -- Started on 2019-10-15 14:01:27 CDT SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_c...
-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- %% Barts Four -- %% Frailty Report -- %% Factor 50, 2019 -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- %% Step 1a -- %% GP Geographical cohort Definition -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ...
/****** Object: UserDefinedTableType [dbo].[DatasourceUserTableType] Script Date: 4/18/2016 3:14:57 PM ******/ CREATE TYPE [dbo].[DatasourceUserTableType] AS TABLE( [DatasourceID] [int] NULL, [UserID] [int] NULL )
<filename>azkaban-sql/src/sql/create.project_events.sql CREATE TABLE project_events ( project_id INT NOT NULL, event_type TINYINT NOT NULL, event_time BIGINT NOT NULL, username VARCHAR(64), message VARCHAR(512) ); CREATE INDEX log ON project_events(project_id, event_time);
<reponame>InsightsDev-dev/tajo<gh_stars>100-1000 CREATE TABLE T1 (A TEXT, B INT4, C MAP<TEXT, INT8>, F FLOAT8); CREATE TABLE T2 (A TEXT, B INT4, C MAP<TEXT, RECORD (name TEXT, age INT4)>, F FLOAT8); CREATE TABLE T3 (A TEXT, B INT4, C MAP<TEXT, RECORD (name RECORD (first_name TEXT, last_name TEXT), age INT4)>, F FLOAT8)...
CREATE TABLE EXAMPLE ( id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name VARCHAR(30) );
<filename>components/automate-workflow-server/schema/verify/scanner.sql -- Verify delivery:scanner on pg BEGIN; SELECT id, key, value FROM tags WHERE FALSE; SELECT id, name, platform, platform_version, status, last_contact, manager, target_config FROM nodes WHERE FALSE; S...
/* * Close Job Autonomous */ CREATE FUNCTION _autonomous_close_job(p_job_id bigint) RETURNS integer LANGUAGE plpgsql AS $$ DECLARE v_numrows integer; v_status text; BEGIN EXECUTE 'SELECT alert_text FROM @extschema@.job_status_text WHERE alert_code = 1' INTO v_status; UPDATE @extsc...
<filename>vc/vm/data/mysql-users.sql create database drupal; create user 'drupal'@'localhost' identified by 'drupal'; grant usage on *.* to 'drupal'@'localhost'; grant all privileges on `drupal`.* to 'drupal'@'localhost'; grant all privileges on `drupal`.* to ''@'localhost'; -- This is for VividCortex. We need to set ...
<reponame>loujine/musicbrainz-server<filename>t/sql/tag_raw.sql SET client_min_messages TO 'WARNING'; INSERT INTO editor (id, name, password, ha1) VALUES (11, 'editor1', '{CLEARTEXT}password', '<PASSWORD>'), (12, 'editor2', '{CLEARTEXT}password', '<PASSWORD>'), (13, 'editor3', '{CLEARTEXT}password', '<PASSWORD>'), (1...
-- 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 @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema mydb -- -...
/************************************************************************************************* * Author: <NAME> * * Description: This script to demonstrate how to create tables in SQL Server * * Notes: Lecture 2- Create Tables and Constraints *************************************************************************...
-- sampleuserというユーザーを作成する -- rootユーザーで実行すること GRANT ALL ON sample.* TO 'sampleuser'@'localhost' IDENTIFIED BY 'sampleuser';
<gh_stars>0 -- name: CreateBookmark :one INSERT INTO bookmarks ( book_id, type, created_by ) VALUES ( $1, $2, $3 ) RETURNING *; -- name: GetBookmark :one SELECT * FROM bookmarks WHERE id = $1; -- name: CheckBookmark :one SELECT * FROM bookmarks WHERE book_id = $1 AND created_by = $2; -- name: UpdateB...
<gh_stars>0 CREATE TABLE [Staging].[DAS_PostcodeDisadvantage] ( [Postcode] NVARCHAR(10) NOT NULL, [Uplift] DECIMAL(10, 5) NULL, [EffectiveFrom] DATE NOT NULL, [EffectiveTo] DATE NULL ) GO GRANT ALTER ON OBJECT::Staging.DAS_PostcodeDisadvantage TO [PostCode_RW_User];
<reponame>zachary-berdell-elliott/py-newsfeed DROP DATABASE IF EXISTS news_db; CREATE DATABASE news_db;
--Remove all memebers from all chats DELETE FROM ChatMembers; --Remove all messages from all chats DELETE FROM Messages; --Remove all chats DELETE FROM Chats; --Remove the user test1 DELETE FROM Members WHERE Email='<EMAIL>'; --Add the User test1 (password is: <PASSWORD>) INSERT INTO Members(FirstName, LastN...
INSERT INTO demo_products.category (id, name) VALUES (1, 'Dětské'); INSERT INTO demo_products.category (id, name) VALUES (2, 'Dámské'); INSERT INTO demo_products.category (id, name) VALUES (3, 'Pánské');
set pages 9999; column physical_reads format 999,999,999,999,999 column physical_writes format 999,999,999,999 column pct_reads format 999 column mydate heading 'Yr. Mo Dy Hr.' format a16 select to_char(snap_time,'yyyy-mm-dd') mydate, sum((newreads.value-oldreads.value)) physical_reads, ...
<reponame>wanghaisheng/fhirbase -- #import ../src/fhirbase_gen.sql -- #import ../src/fhirbase_crud.sql -- #import ../src/fhirbase_generate.sql -- #import ../src/fhirbase_transaction.sql expect fhirbase_transaction._url_to_crud_action('/Device'::text, 'POST'::text) => ARRAY['create', 'Device']::text[] expect fhirb...
<gh_stars>0 DROP SCHEMA IF EXISTS ims; CREATE SCHEMA ims; USE ims; CREATE TABLE IF NOT EXISTS customers ( id INT(11) NOT NULL AUTO_INCREMENT, first_name VARCHAR(40) DEFAULT NULL, surname VARCHAR(40) DEFAULT NULL, PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS items ( id INT(11) NOT NULL AUTO_INC...
<reponame>Ivonnor1975/ManageEmployees DROP DATABASE IF EXISTS dbemployees; CREATE DATABASE dbemployees; USE dbemployees; CREATE TABLE department( id INTEGER AUTO_INCREMENT PRIMARY KEY, name VARCHAR(50) NOT NULL ); CREATE TABLE role( id INTEGER AUTO_INCREMENT PRIMARY KEY, title VARCHAR(30) NOT NULL, sala...
<gh_stars>0 ALTER TABLE `test-project-335210.recipe_staging_dataset.dataset_udang` ADD COLUMN IF NOT EXISTS Main_Ingredient STRING; CREATE OR REPLACE TABLE `test-project-335210.recipe_dataset.D_dataset_udang` AS SELECT IFNULL(Main_Ingredient, 'Udang') AS Main_Ingredient, Title AS Recipe_Title, Ingredients...
/* For the specified table, output the following information for each column: ColumnName DataType IsNullable (YES if nullable, blank otherwise) Constraints (e.g. Primary key, foreign key, unique) ReferencesColumn (if the column is a foreign key, the table and column it references) The example @Sc...
<reponame>nobility-zhang/FingerMemory-Web<gh_stars>1-10 CREATE TABLE `fm`.`fm_users` ( `user_id` int NOT NULL AUTO_INCREMENT COMMENT '用户ID', `user_name` varchar(20) NOT NULL COMMENT '用户名', `user_email` varchar(50) NOT NULL COMMENT '用户邮箱', `user_password` varchar(50) NOT NULL COMMENT '用户密码', `user_create_date...
with busy_artists as ( select artist_id, count(*) as cnt from context group by 1 having count(*) > 1 order by cnt desc limit 1000 ) select c.title, c.release_group, sum(ba.cnt) as cnt from context as c join busy_artists as ba on ba.artist_id = c.artist_id where c.cover_url is null group by 1, 2 ...
<filename>create_database.sql<gh_stars>1-10 -- CREATE DATABASE wedding_rsvp; -- CREATE USER 'app'@'localhost' IDENTIFIED BY '<PASSWORD>'; -- GRANT INSERT ON wedding_rsvp.* TO 'app'@'localhost'; -- GRANT SELECT ON wedding_rsvp.* TO 'app'@'localhost'; -- FLUSH PRIVILEGES; CREATE TABLE wedding_rsvp.guest ( id INT(1...
CREATE TABLE `hibah`.`roles` ( `id_role` INT NOT NULL AUTO_INCREMENT, `role_name` VARCHAR(45) NOT NULL, `description` VARCHAR(1000) NULL, `update_date` DATETIME NOT NULL, `update_by` VARCHAR(45) NOT NULL, `create_date` DATE NOT NULL, `create_by` VARCHAR(45) NOT NULL, PRIMARY KEY (`id_role`), UNIQUE IN...
/* Navicat Premium Data Transfer Source Server : 本地 Source Server Type : MySQL Source Server Version : 80012 Source Host : localhost:3306 Source Schema : flat Target Server Type : MySQL Target Server Version : 80012 File Encoding : 65001 Date: 13/11/2019 11:16:39 */ ...
CREATE TABLE post ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, slug VARCHAR(255) NOT NULL, content TEXT(650000) NOT NULL, created_at DATETIME NOT NULL, PRIMARY KEY (id) ) CREATE TABLE post ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, ...
#standardSQL -- -- Retrieve variant-level information for BRCA1 variants. -- SELECT reference_name, start, `end`, reference_bases AS ref, ARRAY_TO_STRING(v.alternate_bases, ',') AS alt_concat, quality, ARRAY_TO_STRING(v.filter, ',') AS filters, ARRAY_TO_STRING(v.names, ',') AS names, ARRAY_LENGTH(v.ca...
DROP SCHEMA app_jobs CASCADE;
<gh_stars>100-1000 \set ON_ERROR_STOP 1 BEGIN; ----------------------- -- CREATE NEW TABLES -- ----------------------- CREATE TABLE series ( id SERIAL, gid UUID NOT NULL, name VARCHAR NOT NULL, comment VARCHAR(255) NOT NULL DEFAULT '', ty...
<reponame>trak2018z/pulsar-tr -- -- This file is part of Pulsar CMS -- Copyright (c) by sobiemir <<EMAIL>> -- ___ __ -- / _ \__ __/ /__ ___ _____ -- / ___/ // / (_-</ _ `/ __/ -- /_/ \_,_/_/___/\_,_/_/ -- -- This source file is subject to the New BSD License that is bundled -- with thi...
-- @testpoint: 文本检索操作符||,通过tsvector把字符串按照空格分割 select $$the lexeme ' ' , contains spaces$$::tsvector || 'c:1 d:2 b:3'::tsvector as result;
-- - Database: `phpquiz` -- -- -------------------------------------------------------- -- -- Table structure for table `questions` -- CREATE TABLE `questions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `question_name` text CHARACTER SET utf8 NOT NULL, `answer1` varchar(50) NOT NULL, `answer2` varchar(50) N...
CREATE TABLE [dbo].[SchemaColumnType] ( [ID] UNIQUEIDENTIFIER CONSTRAINT [DF_SchemaColumnType_ID] DEFAULT (newid()), [Name] VARCHAR(50) NOT NULL, [Description] VARCHAR(250) NOT NULL, [UserId] UNIQUEIDENTIFIER NOT NULL, [AddedAt] DATETIME NULL CONSTRAINT [DF_SchemaColumnType_AddedAt] DEFAULT (getda...
CREATE PROCEDURE [dbo].[spSale_Lookup] @CashierId nvarchar(128), @SaleDate datetime2 AS BEGIN set nocount on; SELECT Id FROM dbo.Sale WHERE CashierId = @CashierId and SaleDate = @SaleDate END
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 1192.168.127.12 -- Generation Time: Jan 16, 2022 at 04:17 PM -- Server version: 10.4.20-MariaDB -- PHP Version: 7.3.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SE...
INSERT INTO `modules` (`id`, `name`, `url`, `logo`, `active_logo`, `parent_id`, `is_removable`, `created_at`, `updated_at`) VALUES (NULL, 'Sales Dashboard', 'supervisors/sales_dashboard', 'iconInventoryGroups.png', NULL, (SELECT `id` FROM `modules` as m WHERE m.name = 'Supervisors' limit 1), '1', '2017-06-09 18:31:48',...
SELECT sess_trans.session_id,open_transaction_count, sqltext.text FROM sys.dm_tran_session_transactions sess_trans INNER JOIN sys.dm_exec_connections conns ON conns.session_id = sess_trans.session_id CROSS APPLY sys.dm_exec_sql_text(conns.most_recent_sql_handle) sqltext SELECT lcks.request_session_id,lcks.resource_...
<reponame>jthomm/game-center-db<filename>gcdb/sql/gc_cur_drive/insert.sql INSERT INTO gc_cur_drive (drive_num, redzone, postime, fds, result, numplays, qtr, penyds, posteam, ydsgained, start_yrdln, start_team, start_qtr, start_time, end_yrdln, end_team, end_qtr, end_time, _gc_cur_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ...
-- MariaDB dump 10.19 Distrib 10.4.18-MariaDB, for Win64 (AMD64) -- -- Host: localhost Database: 10119269_kepegawaian -- ------------------------------------------------------ -- Server version 10.4.18-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_...
<filename>src/test/resources/sql/select/4943a3f9.sql -- file:arrays.sql ln:528 expect:true select array_fill(1, array[3,3], array[1,1,1])
<reponame>rudi-bruchez/tsql-scripts SET NOCOUNT ON; SET STATISTICS IO, TIME OFF; GO EXECUTE sp_configure 'show advanced options', 1; RECONFIGURE; GO EXECUTE sp_configure 'xp_cmdshell', 1; RECONFIGURE; GO ------------------------------------------------------------- -- SET EVENT SESSION NAME HERE : DECLARE @session_na...
SET DEFINE OFF; Insert into DZ_SWAGGER3_OPERATION_CALL_MAP (OPERATION_ID, CALLBACK_NAME, CALLBACK_ID, CALLBACK_ORDER, VERSIONID) Values ('Sample.randomnav.GET', 'onData', 'Sample.randomnav.CALLBACK', 10, 'SAMPLE'); COMMIT;
<gh_stars>0 CREATE TABLE exam_owners ( exam_id BIGINT, owner VARCHAR, FOREIGN KEY (exam_id) REFERENCES exams (id) ON DELETE CASCADE ON UPDATE CASCADE ); CREATE INDEX exam_owners_exam_id ON exam_owners (exam_id);
<reponame>retrohacker/mass WITH RECURSIVE get_deps(name, uuid, image, stakeholders, created) AS ( ( SELECT DISTINCT ON (name) name, uuid, image, stakeholders, created FROM changesets WHERE uuid = $1 ) UNION ALL ( SELECT DISTINCT ON (c.name) c.name, c.uuid, c.image, c.stakeholders, c.created ...
CREATE table ?SCHEMA?.sqlpl4 (answer varchar(40)) # begin atomic -- declare q1 to be equal to 1 declare q1 int default 1; -- if q1 is one IF (q1 = 1) then INSERT INTO ?SCHEMA?.sqlpl4 VALUES 'q1 equals 1' ; -- if not ELSE INSERT INTO ?SCHEMA?.sqlpl4 VALUES 'q1 is not equal to 1' ;...
CREATE PROCEDURE SP670(OUT MYCOUNT INTEGER) SPECIFIC SP670_98939 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE296;SELECT COUNT(*)INTO MYCOUNT FROM TABLE349;SELECT COUNT(*)INTO MYCOUNT FROM TABLE22;SELECT COUNT(*)INTO MYCOUNT FROM ...
drop index ACT_IDX_EVENT_SUBSCR_CONFIG_; drop index ACT_IDX_EVENT_SUBSCR_EXEC_ID; drop index ACT_IDX_EVENT_SUBSCR_SCOPEREF_; drop table ACT_RU_EVENT_SUBSCR;
create table example ( id int, first_name text, last_name text );
<reponame>dustlang/rfcbot-rs ALTER TABLE fcp_concern DROP COLUMN fk_initiating_comment;
autocommit off; create function test_int12(i number, j float , c string ) return number as language java name 'SpTest.testInt(int,float,java.lang.String) return int'; $out:integer,$NULL; ? = call test_int12(1, 3.3456 ,'5') ; $out:integer,$NULL; ? = call test_int12(1, cast(33456 as float) ,'5') ; $out:integer,$...
<reponame>Yanci0/openGauss-server -- -------------------------------------------------------------- -- rollback pg_catalog.pg_buffercache_pages -- -------------------------------------------------------------- DROP FUNCTION IF EXISTS pg_catalog.pg_buffercache_pages() CASCADE; SET LOCAL inplace_upgrade_next_system_obje...
SELECT * FROM client; SELECT p.title, p.subtitle, p.value FROM product AS p ORDER BY p.value DESC LIMIT 6; SELECT * FROM client AS c WHERE c.name IN ('Pedro','Miro', 'Lando'); SELECT * FROM client AS a JOIN user AS b ON a.user_id = b.id WHERE b.name = "Pedro"; SELECT * FROM product a, job ...
INSERT INTO media ( title, uri, rating, viewed_at, created_at ) VALUES ('13 Hours', 'http://www.imdb.com/title/tt4172430/', 1000, '2016-07-20', now()), ('How to Be Single', 'http://www.imdb.com/title/tt1292566/', 1000, '2016-07-20', now())
select /*gather_info_script*/ * from ( select '<a href="FullSqlTextAndPlans.html#'||a.sql_id||'">'||a.sql_id||'</a>' as SQL_ID, c.parsing_schema_name as OWNER, a.executions, a.rows_processed, round(a.rows_processed/nvl(nullif(a.executions,0),1)) rows_per_exec, b.sql_text from v$sqlstats a...
<filename>EFFeatures.Data/CreateDbObjectsScripts/GetBookBindingType.sql USE [EFFeaturesNontableDb] GO /****** Object: StoredProcedure [dbo].[GetBookBindingType] Script Date: 06.06.2021 14:30:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[GetBookBindingType] @BookTitle nvarcha...
CREATE TABLE skills ( staff_name VARCHAR(20) NOT NULL, completion_date DATETIME NOT NULL, q1 INT, q2 INT, q3 INT, q4 INT, q5 INT, q6 INT, q7 INT, q8 INT, q9 INT, q10 INT, q11 INT, q12 INT, q13 INT, q14 INT, PRIMARY KEY(staff_name, completion_date) ); CREATE TABLE questions ( q_...
<reponame>MariamaB/CubeOnlineshop -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Erstellungszeit: 27. Jan 2017 um 11:30 -- Server-Version: 10.1.19-MariaDB -- PHP-Version: 7.0.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
<reponame>griffithlab/civic-v2 select variant_groups.id, variant_groups.name, array_agg(DISTINCT(variants.name)) as variant_names, array_agg(DISTINCT(genes.name)) as gene_names, COUNT(DISTINCT(variants.id)) as variant_count, COUNT(DISTINCT(evidence_items.id)) as evidence_item_count FROM variant_groups INNER JOIN varian...
SELECT city, AVG(stars) AS "avg_stars" FROM "yelp"."business" GROUP BY city ORDER BY AVG(stars) DESC LIMIT 10;
/* SQLyog Ultimate v12.4.1 (64 bit) MySQL - 5.7.18-log : Database - im ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE...
<reponame>jkstill/hexidecimal set long 1000000 drop table test_views purge; create table test_views (view_name varchar2(30), view_text clob); insert into test_views values('DBA_USERS', q'[ select u.name, u.user#, decode(u.password, 'GLOBAL', u.password, 'EXTERNAL', u.password, ...
<filename>src/test/resources/sql/create/01cfb6ce.sql -- file:matview.sql ln:128 expect:true CREATE UNIQUE INDEX ON mvtest_mv(a)
<reponame>dram/metasfresh<gh_stars>1000+ -- 15.03.2016 12:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,Description,EntityType,FieldLength...
<reponame>mrudulpolus/kc drop table COMM_SCHEDULE_MINUTES ; drop TABLE COMM_SCHEDULE_ATTENDANCE ; CREATE SEQUENCE SEQ_MEETING_ID INCREMENT BY 1 START WITH 1; CREATE TABLE MINUTE_ENTRY_TYPE ( MINUTE_ENTRY_TYPE_CODE VARCHAR2(3) NOT NULL, SORT_ID NUMBER(3,0) NOT NULL, DESCRIPTION VARCHAR2(200) NOT NULL, ...
INSERT INTO SENDSMS_CONFIG(ID,NAME,HOST,USERNAME,PASSWORD,MOBILE_FIELD_NAME,MESSAGE_FIELD_NAME,APP_ID) VALUES(1,'default','http://localhost/sms','username','password','mobile','message','1');
BEGIN; -- We're going to need a validator state table in order to track validator -- commission over time. This is also used in the calculation of the commission -- earned in the escrow events. This calculation is added further down in this -- file to the escrow_changes table. CREATE TABLE IF NOT EXISTS public.valida...
<reponame>BOBO41/trifolia<gh_stars>1-10 DECLARE @templateAuthorRoleId INT SET @templateAuthorRoleId = (SELECT TOP 1 id FROM [role] WHERE name = 'Template Authors') INSERT INTO user_role (userId, roleId) SELECT id, @templateAuthorRoleId FROM [user] WHERE id NOT IN (SELECT userId FROM user_role WHERE roleId = @templateA...
{% macro create_materialized_view_as(relation, sql, config) %} {{ return(adapter.dispatch('create_materialized_view_as', packages = ['dbt_labs_materialized_views'])(relation, sql, config)) }} {% endmacro %} {% macro default__create_materialized_view_as(relation, sql, config) -%} create materialized view {{rel...