text
stringlengths
1
1.05M
--Create Datasource Table with all optional syntax CREATE TABLE IF NOT EXISTS table_identifier ( test STRING COMMENT "col_comment1" ) USING PARQUET OPTIONS ( "key1" = "val1", "key2" = "val2") PARTITIONED BY ( col_name1, col_name2 ) CLUSTERED BY ( col_name3, col_name4) SORTED BY ( col_name3 ASC, col_name4 DESC) INTO 4 B...
INSERT INTO datareliability (datareldesc) VALUES ('Actual data'),('Technical report'),('Scientific bibliography'),('Expert opinion');
CREATE DEFINER=`admin`@`10.150.0.2` PROCEDURE `saveMaterial`(IN user_uid VARCHAR(100), material_ID INT, material VARCHAR(100), materialType VARCHAR(45), rarity VARCHAR(20), imagePath VARCHAR(100)) BEGIN /*Responsible for saving materials to the database. Changelog: 01/08/2021: Added logic to handle...
ALTER TABLE telegram_chats ADD COLUMN template TEXT;
CREATE TABLE [dbo].[PurchaseInvoiceHeader] ( [Id] [int] NOT NULL IDENTITY (1,1), [VendorId] [int] NULL, [GeneralLedgerHeaderId] [int] NULL, [Date] [datetime] NOT NULL, [No] [nvarchar](max) NULL, [VendorInvoiceNo] [nvarchar](max) NOT NULL, [Description] [nvarchar](max) NULL, [PaymentTermId]...
-- based on https://github.com/Trivadis/plsql-and-sql-coding-guidelines/blob/main/docs/3-coding-style/coding-style.md#example create or replace procedure set_salary ( in_employee_id in employees.employee_id%type ) is cursor c_employees ( p_employee_id in employees.employee_id%type ) is select last_...
-- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Feb 02, 2022 at 08:53 PM -- Server version: 10.2.38-MariaDB-cll-lve -- PHP Version: 7.3.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!...
-- -- 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...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 05, 2021 at 03:47 AM -- Server version: 10.4.18-MariaDB -- PHP Version: 8.0.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
USE [WideWorldImportersDW] GO DROP VIEW IF EXISTS [olap].[vFactStockHolding] DROP VIEW IF EXISTS [olap].[vFactSale] DROP VIEW IF EXISTS [olap].[vFactOrder] DROP VIEW IF EXISTS [olap].[vFactTransaction] DROP VIEW IF EXISTS [olap].[vFactPurchase] DROP VIEW IF EXISTS [olap].[vDimensionCustomer] DROP VIEW IF EXISTS...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 22, 2021 at 05:36 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
-- -- Name: get_stat_replication(); Type: FUNCTION; Schema: public; Owner: d3l243 -- CREATE OR REPLACE FUNCTION public.get_stat_replication() RETURNS SETOF pg_stat_replication LANGUAGE sql SECURITY DEFINER AS $$ select * from pg_stat_replication $$; ALTER FUNCTION public.get_stat_replication() O...
CREATE FUNCTION dbo.api_FillPlaceholders(@text_template nvarchar(4000), @api_target_id int) RETURNS nvarchar(4000) WITH SCHEMABINDING, RETURNS NULL ON NULL INPUT AS BEGIN SELECT @text_template = REPLACE(@text_template, N'@(parameter[' + tfv.FieldName + N'])', tfv.FieldValue) FROM dbo.api_TargetFieldValues AS tfv WH...
INSERT INTO [Client] ( [IpAddress] ,[ReverseDns] ,[ReverseDnsDate] ) VALUES ( @ipAddress ,@reverseDns ,@reverseDnsDate ); SELECT [Id] FROM [Client] WHERE _ROWID_ = last_insert_rowid();
# Write your MySQL query statement below # #Easy #Database #SQL_I_Day_2_Select_&_Order #2022_03_04_Time_541_ms_(81.09%)_Space_0B_(100.00%) DELETE FROM Person WHERE Id NOT IN (SELECT id FROM (SELECT Email, MIN(Id) AS 'id' FROM Person GROUP BY Email) t)
-- Add imageType column to avatars table ALTER TABLE gatewayAvatars ADD imageType VARCHAR2(25); -- Update database version UPDATE jiveVersion SET version = 6 WHERE name = 'gateway'; commit;
-- 1-List the films where the yr is 1962 [Show id, title] SELECT id, title FROM movie WHERE yr = 1962; -- 2-Give year of 'Citizen Kane'. SELECT yr FROM movie WHERE title = 'Citizen Kane'; -- 3-List all of the Star Trek movies, include the id, title and yr (all of these movies include the words Star Trek in the title)...
-- @testpoint:openGauss关键字zone(非保留),作为列名带反引号,使用时不带,合理报错 drop table if exists explain_test; create table explain_test( c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer, c_real real, c_double real, c_decimal decimal(38), c_number number(38), c_numeric numeric(38), c_char char(5...
-- AlterTable ALTER TABLE `users` MODIFY `oauthProvider` ENUM('email', 'github', 'google', 'stackoverflow') NOT NULL;
-- @testpoint: 字符处理函数to_hex,转换类型为小数时 select to_hex(-3647.4);
\unset ECHO \i test/setup.sql SELECT plan(84); --SELECT * FROM no_plan(); -- This will be rolled back. :-) SET client_min_messages = warning; CREATE TABLE public.sometab( id INT NOT NULL PRIMARY KEY, name TEXT DEFAULT '', numb NUMERIC(10, 2), myint NUMERIC(8) ); CREATE SCHEMA hide; CREATE TABLE h...
CREATE PROCEDURE [dbo].[aspnet_Membership_GetAllUsers] @ApplicationName nvarchar(256), @PageIndex int, @PageSize int AS BEGIN DECLARE @ApplicationId uniqueidentifier SELECT @ApplicationId = NULL SELECT @ApplicationId = ApplicationId FROM dbo.aspnet_Applications ...
-- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License")...
--- description: Show content reach and persistence over time --- Authorization: none --- Access-Control-Allow-Origin: * --- limit: 30 --- interval: 60 --- offset: 0 --- domain: - WITH visits AS ( SELECT url, TIMESTAMP_TRUNC(time, DAY) AS time, id, pageviews AS weight FROM helix_rum.CLUSTER_PAGE...
/* * Sitemap module */ INSERT INTO cuyahoga_moduletype (name, assemblyname, classname, path, editpath, inserttimestamp, updatetimestamp) VALUES ('Sitemap', 'Cuyahoga.Modules', 'Cuyahoga.Modules.Sitemap.SitemapModule', 'Modules/Sitemap/SitemapControl.ascx', NULL, '2005-10-20 14:36:28.324', '2005-10-20 14:36:28.3...
##获取假期活动数量 #macro($countHolidayActivity01(activityCode, teacherId, type)) select count(code) from holiday_activity_01 #end
-- @testpoint:opengauss关键字trigger_schema(非保留),作为用户名 --关键字explain作为用户名不带引号,创建成功 drop user if exists trigger_schema; CREATE USER trigger_schema PASSWORD 'Bigdata@123'; drop user trigger_schema; --关键字explain作为用户名加双引号,创建成功 drop user if exists "trigger_schema"; CREATE USER "trigger_schema" PASSWORD 'Bigdata@123'; drop us...
-- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may ...
BEGIN SELECT department_id AS d_e_dept_id, e.last_name INTO r_record FROM departments NATURAL JOIN employees; END; SELECT department_id AS d_e_dept_id, e.last_name INTO r_record FROM departments NATURAL INNER JOIN employees; END; /
select 'single argument'; select tuple(number) = tuple(number) from numbers(1); select tuple(number) = tuple(number + 1) from numbers(1); select tuple(toNullable(number)) = tuple(number) from numbers(1); select tuple(toNullable(number)) = tuple(number + 1) from numbers(1); select tuple(toNullable(number)) = tuple(toNul...
--liquibase formatted sql --changeset artemov_i:pkg_json_patcher dbms:postgresql runOnChange:true splitStatements:false stripComments:false DROP SCHEMA IF EXISTS pkg_json_patcher cascade; CREATE SCHEMA pkg_json_patcher AUTHORIZATION s_ap; ALTER SCHEMA pkg_json_patcher OWNER TO s_ap; CREATE FUNCTION pkg_json_patc...
CREATE PROCEDURE [dbo].[dnn_AddScheduleItemSetting] @ScheduleID int, @Name nvarchar(50), @Value nvarchar(256) AS BEGIN UPDATE dbo.[dnn_ScheduleItemSettings] SET SettingValue = @Value WHERE ScheduleID = @ScheduleID AND SettingName = @Name IF @@ROWCOUNT = 0 BEGIN INSERT INTO dbo.[dnn_ScheduleItemSettings] (Sc...
DELETE FROM spell_proc_event WHERE entry IN(34774); INSERT INTO `spell_proc_event` VALUES (34774,0,0,0,0,0x0000000000000000,0x00080001,1.5,20);
autocommit off; create class dml_super ( int_col int, var_col varchar(20), set_col set(int) ); create class dml_0001 under dml_super ( ref_col dml_super ); create class dml_0002 under dml_0001 ( ref1_col dml_0001 ); create class dml_0003 under dml_0002 ( ref2_col dml_0002 ); create class dml_0004 under dml_0003 ( ref3_...
use education
SELECT candidate.name, ROUND( (2 * S.math + 3 * S.specific + 5 * S.project_plan) / 10.0, 2 ) as "avg" FROM candidate INNER JOIN score S ON candidate.id = S.candidate_id ORDER BY "avg" DESC
CREATE TABLE IF NOT EXISTS users ( username TEXT PRIMARY KEY, bio TEXT, email TEXT UNIQUE, password TEXT ); CREATE TABLE follows ( username TEXT, following TEXT, FOREIGN KEY (username, following) REFERENCES users (username, username), PRIMARY KEY (username, following) ); INSERT INTO us...
-- -- Data model for acs-authentication -- -- $Id: acs-authentication-create.sql,v 1.4 2015/12/04 13:49:57 cvs Exp $ -- \i batch-job-tables-create.sql
WITH full_thing AS ( SELECT -- not user editable id, type, original_language, post_date, published, updated_date, featured, hidden, verified, reviewed_at, reviewed_by, completeness, first_author(${articleid}) AS creator, last_author(${articleid}) AS last_upd...
SELECT 'character varying'::character varying; --errors: --SELECT 'character varying'::pg_catalog.character varying;--error --SELECT 'character varying'::pg_catalog."character varying";
{% snapshot snapshot_orders %} {{ config( target_schema='snapshots', unique_key='order_id', strategy='check', check_cols=['status'] ) }} SELECT * FROM {{ source('data', 'orders') }} {% endsnapshot %}
-- MySQL Script generated by MySQL Workbench -- Sat Mar 21 10:29:45 2020 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON...
-------------------------------------------------------- -- DATAGATE INIT -------------------------------------------------------- CREATE SEQUENCE "HIBERNATE_SEQUENCE" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 ; -------------------------------------------------------- -- DDL f...
-- +goose Up -- SQL in this section is executed when the migration is applied. ALTER TABLE cron_workflows ADD COLUMN is_archived BOOL DEFAULT false NOT NULL; ALTER TABLE workflow_executions ADD COLUMN is_archived BOOL DEFAULT false NOT NULL; -- +goose Down -- SQL in this section is executed when the migration is rolled...
-- quote.test -- -- execsql {DROP TABLE '@abc'} DROP TABLE '@abc'
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Фев 03 2021 г., 22:52 -- Версия сервера: 8.0.19 -- Версия PHP: 7.4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
\d pg2_co_table_bitmap_index_b0 insert into pg2_co_table_bitmap_index_b0 values ('0_zero', 0, '0_zero', 0, 0, 0, '{0}', 0, 0, 0, '2004-10-19 10:23:54', '2004-10-19 10:23:54+02', '1-1-2000'); insert into pg2_co_table_bitmap_index_b0 values ('1_zero', 1, '1_zero', 1, 1, 1, '{1}', 1, 1, 1, '2005-10-19 10:23:54', '2005-10...
-- @testpoint: opengauss关键字none(非保留),作为触发器名,部分测试点合理报错 --前置条件 --创建源表 drop table if exists test_trigger_src_tbl; CREATE TABLE test_trigger_src_tbl(id1 INT, id2 INT, id3 INT); --创建触发表 drop table if exists test_trigger_des_tbl; CREATE TABLE test_trigger_des_tbl(id1 INT, id2 INT, id3 INT); --创建触发器函数 CREATE OR REPLACE FUN...
UPDATE schema_migrations SET dirty = false; DROP TABLE IF EXISTS users CASCADE; DROP TABLE IF EXISTS book CASCADE; DROP TABLE IF EXISTS author CASCADE; DROP TABLE IF EXISTS book_author CASCADE;
CALL SYSRDL#CG.REMOTE_EXECUTE(' BEGIN CREATE TABLE EVENT ( GlobalEventID INTEGER, Day DATE, MonthYear INTEGER, Year INTEGER, FractionDate FLOAT, Actor1Code VARCHAR(27), Actor1Name VARCHAR(1024), Actor1CountryCode VARCHAR(3), Act...
CREATE TABLE [employer_account].[UserAccountSettings] ( [Id] BIGINT IDENTITY(1,1) NOT NULL PRIMARY KEY, [UserId] BIGINT NOT NULL, [AccountId] BIGINT NOT NULL, [ReceiveNotifications] BIT NOT NULL DEFAULT(1), CONSTRAINT [FK_UserAccountSettings_UserId] FOREIGN KEY(UserId) REFERENCES [employer_account].[User] ([Id]),...
-- default value was changed from 'strict' to 'ignore'. -- to minimize touching test, test 'strict' first. EXEC sp_babelfish_configure 'babelfishpg_tsql.escape_hatch_session_settings', 'strict'; GO -- simple unsupported query but accepted in backend parser. should throw an error. SET ANSI_PADDING OFF; GO SET ANSI_WAR...
(C float , REPLACEMENT float) RETURNS float LANGUAGE JAVASCRIPT AS $$ return REPLACEMENT $$ ;
--- --- This File Left Intentionally Blank! ---
DELIMITER $$ DROP FUNCTION IF EXISTS `pinyin`$$ CREATE FUNCTION `pinyin`(in_string VARCHAR(21845)) RETURNS VARCHAR(21845) CHARSET utf8 BEGIN -- 截取字符串,每次做截取后的字符串存放在该变量中,初始为函数参数in_string值 DECLARE tmp_str VARCHAR(21845) CHARSET gbk DEFAULT '' ; -- tmp_str的长度 DECLARE tmp_len SMALLINT DEFAULT 0; -- tmp_str的长度 DECLARE tmp_l...
CREATE FUNCTION [map].[DocumentDefinitions]() RETURNS TABLE AS RETURN ( SELECT DD.[Id], DD.[Code], DD.[IsOriginalDocument], DD.[DocumentType], DD.[Description] , DD.[Description2], DD.[Description3], DD.[TitleSingular], DD.[TitleSingular2] , DD.[TitleSingular3], DD.[TitlePlural] , DD.[TitlePlu...
CREATE TABLE IF NOT EXISTS tags ( id SERIAL, name VARCHAR(50), PRIMARY KEY (id) ); CREATE INDEX IF NOT EXISTS idx_tags_name ON tags (name); CREATE TABLE IF NOT EXISTS users ( id SERIAL, username VARCHAR(50), password VARCHAR(20), PRIMARY KEY (id) ); CREATE INDEX IF NOT EXISTS idx_users_name ON users (use...
DECLARE @ProtocoleNAme VARCHAR(100) DECLARE @ProtocoleID INT SET @ProtocoleNAme = 'Building and Activities' pr_MigrationProtocole @ProtocoleNAme ---------------- UPDATE THESAURUS SET @ProtocoleNAme = 'Building and Activities' SELECT @ProtocoleID=ID from ProtocoleType where name=@ProtocoleNAme [pr...
-- file:truncate.sql ln:63 expect:true INSERT INTO truncate_a VALUES (1)
SET DEFINE OFF; Insert into MDM_OWNER.REF_PHONE_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/4/2017 10:01:52.570000 PM','fmMMfm/fmDDfm/YYYY fmHH12fm:MI:SS.FF AM'), TO_TIMESTAMP('7/4/2017 10:01:52.570000 PM'...
SELECT id, filePath, CONCAT(width, 'X', height) as resolution, CONCAT(squareHeight, 'X', squareHeight) as squares, uploader, imageHash, (SELECT GROUP_CONCAT(tag SEPARATOR ', ') FROM tags t where t.mapID = m.id) as tags FROM maps m
-- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you ma...
UPDATE csm_protection_element set object_id = 'caintegrator' where protection_element_name = 'caintegrator';
ALTER TABLE [PatientScale] ADD [LastUpdatedTimestamp] DATE
delete from indemandsocs;
select 1 as id union all select * from {{ ref('node_0') }} union all select * from {{ ref('node_11') }}
CREATE TABLE vehicle ( vehicle_id BIGINT NOT NULL, vin CHAR(17) NOT NULL, display_name VARCHAR(255) DEFAULT NULL, car_type VARCHAR(64) DEFAULT NULL, car_special_type VARCHAR(64) DEFAULT NULL, perf_config VARCHAR(64) DEFAULT NULL, has_ludicrous_mode BOOLEAN DEFAULT NULL, wheel_type VARCHAR(64) DEFAULT NULL, ha...
/* * File: participant_per_village.sql * File Created: Tuesday, 12th May 2020 6:08:44 pm * Author: Dyesse YUMBA * Last Modified: Tuesday, 12th May 2020 6:09:15 pm * Modified By: Dyesse YUMBA * ----- * (c) 2020, WHO/AFRO/UCN/ESPEN */ /* * This query will display the number of participant per district by the t...
CREATE DATABASE mattermost; CREATE USER mmuser WITH PASSWORD 'MATTERMOST_PASSWORD'; GRANT ALL PRIVILEGES ON DATABASE mattermost to mmuser; CREATE USER bucardo SUPERUSER PASSWORD 'bucardo';
-- Table structure for global quest data (i.e. quest data not particular to a player) -- Note: We had considered using character_quests with char_id = 0 for this, but decided -- against it, primarily for aesthetic purposes, cleaningness of code, expectability, and -- to keep char-related data purely as char-related dat...
-- 2017-11-29T22:07:05.396 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Table (AccessLevel,AD_Client_ID,CreatedBy,IsActive,IsSecurityEnabled,IsDeleteable,IsHighVolume,IsView,ImportTable,IsChangeLog,ReplicationType,CopyColumnsFromTable,TableName,IsAutocomplete,IsDLM,AD_Org_ID,Name,Upd...
SELECT MAX("MLB_21"."AVG") AS "TEMP(attr:AVG:qk)(3030839854)(0)", MIN("MLB_21"."AVG") AS "TEMP(attr:AVG:qk)(3417196579)(0)", MAX("MLB_21"."BABIP") AS "TEMP(attr:BABIP:qk)(4285141330)(0)", MIN("MLB_21"."BABIP") AS "TEMP(attr:BABIP:qk)(611967120)(0)", MAX("MLB_21"."ISO") AS "TEMP(attr:ISO:qk)(2407168166)(0)", M...
SELECT album_id, name FROM album WHERE LOWER(name) LIKE LOWER('%play%') LIMIT 5; SELECT song_id, song_num, name, video_duration, disc_num, video_id, ( song_id IN ( SELECT song_id FROM in_playlist WHERE playlist_id='Timothy-liked-songs') ) as isFavourite FROM song WHERE album_id = '03eUMhwODEJRYs...
delete from `##schema##`.CELL where id = ?
-- file:rowsecurity.sql ln:1458 expect:true ROLLBACK TO q
CREATE TABLE country (id VARCHAR(2) NOT NULL, name VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "country" ("id", "name") VALUES ('AF', 'Afghanistan'); INSERT INTO "country" ("id", "name") VALUES ('AX', 'Ålandeilanden'); INSERT INTO "country" ("id", "name") VALUES ('AL', 'Albanië'); INSERT INTO "country" ("id", ...
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; /*!40000 ALTER TABLE `...
CREATE TABLE "public"."hosting_providers" ("id" uuid NOT NULL,"name" text NOT NULL DEFAULT '',"balance" int8 NOT NULL DEFAULT 0, PRIMARY KEY ("id"));
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 12-11-2019 a las 05:23:45 -- Versión del servidor: 10.3.18-MariaDB-1:10.3.18+maria~bionic-log -- Versión de PHP: 7.2.24-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; ...
--+ holdcas on; --1. PK should be selected if both scanning PK and scanning a non-PK index have the same cost. set system parameters 'dont_reuse_heap_file=yes'; create table y (a int, b int, c int); create index i_y on y (a, c); alter table y add primary key (a, b); select /*+ recompile */ * from y where a > 0; drop t...
ALTER TABLE issues ALTER COLUMN source TYPE text; ALTER TABLE issues ALTER COLUMN target TYPE text; ALTER TABLE issues ALTER COLUMN title TYPE text;
insert into plugins (id, name, testedUpTo, stableTag, requiresAtLeast, created, modified) values (610, "Bop Search Box Item Type For Nav Menus", "4.1", "1.1.0", "3.4", now(), now()); insert into functions (id, plugin_id, function_name, function_loc, created, modified) values (10591, 610, "bop_nav_search_box_item", "/in...
--DROP PROCEDURE GPSQLWEB.procReadInvers CREATE PROCEDURE GPSQLWEB.procReadInvers ( IN P_ROWID BIGINT, IN P_INVEMP VARCHAR(2), IN P_INVDEL VARCHAR(2), IN P_INVCLI NUMERIC(7 , 0), IN P_INVVAL VARCHAR(12), IN P_INVINT NUMERIC(7 , 0), IN P_INVCLA VARCHAR(3), IN P_INVVEN VARCHAR(1), ...
-- file:numeric.sql ln:246 expect:true INSERT INTO num_exp_mul VALUES (5,5,'268862871.275335557081')
SELECT TOP(10) c.Id, c.Name, SUM(h.BaseRate+r.Price) AS [Total Revenue] ,Count(c.Id) As Trips FROM Trips AS t JOIN Rooms AS r ON r.Id=t.RoomId JOIN Hotels AS h ON h.Id=r.HotelId JOIN Cities AS c ON c.Id=h.CityId WHERE YEAR(t.BookDate)=2016 GROUP BY c.Id, c.Name ORDER BY [Total Revenue] DESC, Trips DESC
-- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Anamakine: localhost:3306 -- Üretim Zamanı: 28 Eki 2021, 19:17:32 -- Sunucu sürümü: 10.3.25-MariaDB -- PHP Sürümü: 7.3.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
CREATE BIGFILE TABLESPACE PIGEON DATAFILE '/u01/app/oracle/oradata/XE/pigeon.dbf' SIZE 5120M AUTOEXTEND ON NEXT 1024M EXTENT MANAGEMENT LOCAL; CREATE TEMPORARY TABLESPACE PIGEONTEMP TEMPFILE '/u01/app/oracle/oradata/XE/pigeontemp.dbf' SIZE 512M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL UNIFORM ...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 22, 2017 at 12:00 AM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.1.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
CREATE TABLE IF NOT EXISTS GroupChannels ( GroupId varchar(26) NOT NULL, AutoAdd tinyint(1), SchemeAdmin tinyint(1) DEFAULT NULL, CreateAt bigint(20) DEFAULT NULL, DeleteAt bigint(20) DEFAULT NULL, UpdateAt bigint(20) DEFAULT NULL, ChannelId varchar(26) NOT NULL, PRIMARY KEY (GroupId, Ch...
--create range partition table partitioned by column with default value of USER and CURRENT_USER --TEST: char(n) + USER create table c30(col1 char(20) default USER, col2 int) partition by range(col1) (partition p1 values less than ('A'), partition p2 values less than ('zzz')); desc c30; insert into c30 values defau...
/* contrib/pageinspect/pageinspect--1.4.sql */ -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION pageinspect" to load this file. \quit -- -- get_raw_page() -- CREATE FUNCTION get_raw_page(text, int4) RETURNS bytea AS 'MODULE_PATHNAME', 'get_raw_page' LANGUAGE C STR...
-- data for the worktime resource test. INSERT INTO address (id, version, street, houseNumber, zipCode, city, country) VALUES (0, 0, 'Sun Alley', '31', '15489', 'Munich', 'Deutschland'); INSERT INTO company (id, version, companyId, name, address_id, timeForPayment) VALUES (0, 0, 1000, 'webshop Ltd.', 0, 30); INSERT I...
set 'operator.kafka.zookeepers' = 'localhost:2181,192.168.0.2:2181'; set 'operator.kafka.zksessiontimeout'='20000'; set 'operator.kafka.zksynctime'='20000'; set 'operator.kafka.messageserializerclass'='kafka.serializer.StringEncoder'; set "serde.simpleserde.separator"=','; set "operator.kafka.brokers"="192.168.0.2:9092...
ALTER TABLE business_case ADD COLUMN preferred_hosting_type text; ALTER TABLE business_case ADD COLUMN preferred_hosting_location text; ALTER TABLE business_case ADD COLUMN preferred_hosting_cloud_service_type text; ALTER TABLE business_case ADD COLUMN preferred_has_ui text; ALTER TABLE business_case ADD COLUMN altern...
-- MySQL dump 10.13 Distrib 8.0.20, for Win64 (x86_64) -- -- Host: localhost Database: Bsms -- ------------------------------------------------------ -- Server version 8.0.20 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!401...
ALTER TABLE {$NAMESPACE}_fund.fund_initiative ADD merchantPHID VARBINARY(64);
SET IDENTITY_INSERT [dbo].[County] ON GO MERGE INTO [dbo].[County] AS Target USING (VALUES (0, N'NA', N'NA', N'Please Select...'), (1, N'BED', N'BED', N'Bedfordshire'), (2, N'BER', N'BER', N'Berkshire'), (3, N'BUC', N'BUC', N'Buckinghamshire'), (4, N'CAM', N'CAM', N'Cambridgeshire'), (5, N'CHE', N'CHE',...
DROP TABLE IF EXISTS textlogs; CREATE TABLE textlogs ( id INTEGER PRIMARY KEY AUTOINCREMENT, filename TEXT, text TEXT, created_at INTEGER );
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 03, 2021 at 05:06 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 5.6.39 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
DROP FUNCTION IF EXISTS finance.get_cash_repository_balance(_cash_repository_id integer, _currency_code national character varying(12)); CREATE FUNCTION finance.get_cash_repository_balance(_cash_repository_id integer, _currency_code national character varying(12)) RETURNS public.money_strict2 AS $$ DECLARE _debit ...