sql
stringlengths
6
1.05M
-- Procedure BasicListItem_Set SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [BasicListItem_Set] ( @ListItemID int = null, @SitePageItemID int = null, @PageType int = null, @Field1 nvarchar(255) = null, @Field2 nvarchar(255) = null, @Field3 nvarchar(255) = null, @Rank int = null ...
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 10, 2019 at 06:52 PM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
<reponame>pradeepkumarcm-egov/DIGIT-Dev Insert into egw_status (ID,MODULETYPE,DESCRIPTION,LASTMODIFIEDDATE,CODE,ORDER_ID) values (nextval('seq_egw_status'),'Contractor','Active',now(),'Active',1); Insert into egw_status (ID,MODULETYPE,DESCRIPTION,LASTMODIFIEDDATE,CODE,ORDER_ID) values (nextval('seq_egw_status'),'Contra...
drop table if exists user_info; drop table if exists flyway_schema_history; drop table if exists welcome;
CREATE TABLE [Sales].[Customers]( [CustomerID] [int] NOT NULL, [CustomerName] [nvarchar](100) COLLATE Latin1_General_100_CI_AS NOT NULL, [BillToCustomerID] [int] NOT NULL, [CustomerCategoryID] [int] NOT NULL, [BuyingGroupID] [int] NULL, [PrimaryContactPersonID] [int] NOT NULL, [AlternateContactPersonID] [int] N...
<reponame>rhomicom-systems-tech-gh/Rhomicom-DB-Scripts<gh_stars>1-10 /* Formatted on 10/6/2014 4:29:07 PM (QP5 v5.126.903.23003) */ -- FUNCTION: SCM.GET_HGST_COST_PRICE(BIGINT) -- DROP FUNCTION SCM.GET_HGST_COST_PRICE(BIGINT); CREATE OR REPLACE FUNCTION APLAPPS.GET_HGST_COST_PRICE (P_ITMID NUMBER) RETURN NUMBER AS...
INSERT INTO foo VALUES ('This is shard 0');
<filename>src/test/resources/sql/select/00be91fc.sql -- file:collate.icu.utf8.sql ln:71 expect:true SELECT a, b FROM collate_test4 ORDER BY b
-- file:numeric_big.sql ln:283 expect:true INSERT INTO num_exp_div VALUES (6,1,'.00000055062415070028543294080529570986145542426497012695332153896755009161414898221287439102663080583651813880691793485913849358381231377818803083602724684079443941244382664020646441552768755521400972510763038788985427849787570839005038719...
create database columnstore go use columnstore go drop table staging go -- create staging table Create table staging ( accountkey int not null, accountdescription nvarchar (50), accounttype nvarchar(50), AccountCodeAlternatekey int) set nocount ON go -- load data into staging table declare @loop int ...
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Sep 24, 2016 at 04:14 -- Server version: 5.6.21 -- PHP Version: 5.5.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
/* SQLyog Professional v12.5.1 (64 bit) MySQL - 10.1.37-MariaDB : Database - mylife ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECK...
<reponame>RedGuy12/tsql-class SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SET NOCOUNT ON; SET ANSI_NULLS ON; SET QUOTED_IDENTIFIER ON; USE AP; SELECT DISTINCT Vendors1.VendorName, Vendors1.VendorCity, Vendors1.VendorState FROM Vendors AS Vendors1 JOIN Vendors AS Vendors2 ON (Vendors1.VendorCity = Vendors2....
/* Source Server : mySQL Source Server Type : MySQL Source Host : localhost:3306 Source Schema : academy */ -- USERS DROP TABLE IF EXISTS users; CREATE TABLE users ( _id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, email VARCHAR(100) UNIQUE NOT NULL, password VARCHAR(255) N...
<reponame>kinglong198404/kl<filename>klcms-provider/src/main/resources/db/klcms-scheme.sql /* Navicat MySQL Data Transfer Source Server : klfront Source Server Version : 50726 Source Host : www.klfront.com:3306 Source Database : klcms Target Server Type : MYSQL Target Server Version : 50726...
<filename>src/main/resources/db/migration/V2__Init_data.sql insert into LINKS_TO_BE_PROCESSED(link)values('https://sina.cn')
<filename>app/Common/Custom/dbinit/data_files.sql DROP TABLE IF EXISTS <--db-prefix-->data_files; CREATE TABLE `<--db-prefix-->data_files` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `uptime` int(10) unsigned NOT NULL DEFAULT '0', `dir` char(6) NOT NULL, `path` char(40) DEFAULT NULL, PRIMARY KEY (`id`...
<reponame>nullvariable/frontity -- MySQL dump 10.13 Distrib 8.0.21, for Linux (x86_64) -- -- Host: localhost Database: wordpress -- ------------------------------------------------------ -- Server version 8.0.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESUL...
<gh_stars>0 select O_ORDERKEY,O_CUSTKEY,O_CLERK,O_COMMENT,dir0 from `/drill/testdata/partition_pruning/dfs/orders` where (dir0=1993 and O_TOTALPRICE>40000) or dir0=1994;
-- Verify ggircs-portal:table_user on pg begin; select pg_catalog.has_table_privilege('ggircs_portal.ciip_user', 'select'); -- ciip_administrator Grants select ggircs_portal_private.verify_grant('select', 'ciip_user', 'ciip_administrator'); select ggircs_portal_private.verify_grant('insert', 'ciip_user', 'ciip_admin...
ALTER TABLE atlas.layouts ALTER COLUMN randomize SET DEFAULT TRUE;
<filename>Source/tSQLt.Private_CreateFakeOfTable.ssp.sql IF OBJECT_ID('tSQLt.Private_CreateFakeOfTable') IS NOT NULL DROP PROCEDURE tSQLt.Private_CreateFakeOfTable; GO ---Build+ CREATE PROCEDURE tSQLt.Private_CreateFakeOfTable @SchemaName NVARCHAR(MAX), @TableName NVARCHAR(MAX), @OrigTableObjectId INT, @...
<reponame>DSoLetsDev/hets INSERT INTO "HET_ROLE_PERMISSION" ("ROLE_PERMISSION_ID", "PERMISSION_ID", "ROLE_ID", "APP_CREATE_USERID", "APP_CREATE_TIMESTAMP", "APP_LAST_UPDATE_USERID", "APP_LAST_UPDATE_TIMESTAMP", "DB_CREATE_TIMESTAMP", "DB_LAST_UPDATE_TIMESTAMP", "DB_LAST_UPDATE_USER_ID") ( WITH wap AS (SELECT "PERMISSIO...
CREATE TABLE game_action_log_type_end_winner ( id INTEGER UNSIGNED AUTO_INCREMENT PRIMARY KEY, action_log_id INTEGER UNSIGNED NOT NULL, round_number TINYINT UNSIGNED NOT NULL, winning_round_score VARCHAR(10) NOT NULL, losing_round_score VARCHAR(10) NOT NULL, surrende...
-- @testpoint: 创建快照后使用kmeans算子结合快照创建model --step1:建表并插入数据;expect: 建表并插入数据成功 drop table if exists t_snapshot_tab_0006; create table t_snapshot_tab_0006(id integer not null,"position" double precision[] not null,closest_centroid integer not null, l1_distance double precision not null, l2_distance double precision not nu...
<filename>snowflake/staging/create_load_table_transactions.sql -- Disclaimer: This is not the correct way of loading data -- for a fact table into a staging table. This script was -- developped as it is due to the shortage of time, otherwise -- the fact table loading should be an idempotent process -- which only loads ...
LOAD DATA INFILE "
-- Trigger: insert_location_uid -- DROP TRIGGER IF EXISTS insert_location_uid ON bloomreader.application_opened; CREATE TRIGGER insert_location_uid BEFORE INSERT ON bloomreader.application_opened FOR EACH ROW EXECUTE FUNCTION public.find_location_uid_fctn();
<filename>organogram.sql -- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Nov 21, 2019 at 10:34 PM -- Server version: 8.0.13 -- PHP Version: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"...
select top 10 * from Users select top 10 * from Words select top 10 WordLists.Id, WordLists.Name, Users.Email from WordLists join Users on WordLists.OwnerId = Users.Id where WordLists.Migrated = 0 select Words.Id, Words.CreatedDate, Words.Text, Words.Definition, WordLists.Name, Users.Email from Words join Wo...
<gh_stars>0 CREATE TABLE nextofkin ( NextOfKinId int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, MemberNo varchar(50) NOT NULL, FullName varchar(50) NOT NULL, Relationship varchar(50) NOT NULL, BirthDate varchar(50) NOT NULL, MobileNo varchar(50) NOT NULL, IDNumber varchar(50) NOT NULL, Email v...
ALTER TABLE `shift_master` ADD `shift_city` VARCHAR(255) NULL AFTER `shift_notes`;
<filename>backside/prisma/migrations/20211212211603_init/migration.sql -- DropIndex DROP INDEX `Users.cellphone_unique` ON `Users`;
USE [SoftUni] GO SELECT TOP 5 e.[EmployeeID], e.[FirstName], e.[Salary], d.[Name] AS [DepartmentName] FROM [Employees] AS e JOIN [Departments] as d ON d.[DepartmentID] = e.[DepartmentID] WHERE [Salary] > 15000 ORDER BY d.[DepartmentID] ASC
/* * 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: 17jz0101 <NAME> * Created: 2019/01/17 */ CREATE SEQUENCE S_CUSTOMER START WITH 1 INCREMENT BY 1 MAXVALU...
SELECT order_id, CASE WHEN YEAR(order_date) = YEAR('2019-01-01') THEN 'Active' WHEN YEAR(order_date) = YEAR('2019-01-01') - 1 THEN 'Last year' ELSE 'Future' END AS category FROM orders; SELECT CONCAT(first_name, ' ', last_name) AS name, CASE ...
CREATE TABLE IF NOT EXISTS `clan_data` ( `clan_id` INT NOT NULL default 0, `clan_name` varchar(45), `clan_level` INT, `reputation_score` INT NOT NULL default 0, `hasCastle` INT, `ally_id` INT, `ally_name` varchar(45), `leader_id` INT, `crest_id` INT, `crest_large_id` INT, `ally_crest_id` INT, `a...
/* * Write a PL/SQL program to check whether a date * falls on weekend i.e. SATURDAY or SUNDAY. */ SET SERVEROUTPUT ON; SET VERIFY OFF; DECLARE dt_inp date := TO_DATE('&new_dt', 'dd-mon-yyyy'); get_day varchar2(15); BEGIN get_day := RTRIM(TO_CHAR(dt_inp, 'day')); if (get_day in ('saturday', 'sun...
<filename>ddl/sql/skq_item_history.sql DROP TABLE IF EXISTS `skq_item_history`; CREATE TABLE `skq_item_history` ( `typeID` int(11) NOT NULL, `regionID` int(16) NOT NULL, `priceDate` date NOT NULL DEFAULT '0000-00-00', `avgPrice` decimal(16,2) NOT NULL, `lowPrice` decimal(16,2) NOT NULL, `highPrice` decimal...
ALTER TABLE event_to_send ADD column insertion_time TIMESTAMP NOT NULL DEFAULT '2021-01-01 00:00:00.000'; ALTER TABLE event_to_send ALTER COLUMN insertion_time DROP DEFAULT;
<filename>sql/RuntimeStruct.sql<gh_stars>0 /* SQLyog Professional v12.09 (64 bit) MySQL - 5.7.21 : Database - ddjs-dev ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CH...
<filename>db2te/tutorials/workshops/Security/TrustedContext/SQL/AuditTC.sql -- Create audit policy to audit user privileges accessing 'credit_card' table and SQL statements executed on 'credit_card' table. CREATE AUDIT POLICY trustedcontextPolicy CATEGORIES EXECUTE STATUS BOTH, CHECKING STATUS BOTH ERROR TYPE AUDIT; ...
<reponame>genericallyterrible/Certificate-Administration USE [Certificate_Administration] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ====================================================================== -- Author: <NAME> -- Creation date: October 25, 2021 -- Description: Creates source and ...
<filename>universtify-server-main/migrations/20210702143330_numerical_gpafloat/migration.sql /* Warnings: - Made the column `numericalGPA` on table `Student` required. This step will fail if there are existing NULL values in that column. - Made the column `numericalLastTermGPA` on table `Student` required. This ...
ALTER TABLE `phabricator_project`.`project` MODIFY `phrictionSlug` varchar(128) binary; ALTER TABLE phabricator_repository.repository_path ADD COLUMN pathHash varchar(32) binary AFTER path; UPDATE phabricator_repository.repository_path SET pathHash = MD5(path); ALTER TABLE phabricator_repository.repository_path ...
ALTER TABLE vizier_cluster_info ADD COLUMN unhealthy_data_plane_pod_statuses json NOT NULL DEFAULT '{}'; ALTER TABLE vizier_cluster_info ADD COLUMN previous_vizier_status vizier_status; ALTER TABLE vizier_cluster_info ADD COLUMN previous_vizier_status_time TIMESTAMP;
Add lastSeenDate for heart beat in v2.2.5 # --- !Ups ALTER TABLE `StudyResult` ADD `lastSeenDate` datetime DEFAULT NULL; # --- !Downs ALTER TABLE `StudyResult` DROP `lastSeenDate`;
<reponame>hexiaoting/gpdb -- WARNING -- This file is executed against the postgres database, as that is known to -- exist at the time of running upgrades. If objects are to be manipulated -- in other databases, make sure to change to the correct database first. -- drop all AO tables \ir pre_drop_ao.sql DROP DATABASE ...
<gh_stars>1-10 USE [AIDE] GO /****** Object: Table [dbo].[COMCELL_CLOCK] Script Date: 09/02/2019 1:53:26 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER TABLE COMCELL_CLOCK ADD MIDDAY VARCHAR(50) GO
-- workload_transaction \d+ DBE_PERF.workload_transaction \d+ DBE_PERF.global_workload_transaction \d+ DBE_PERF.user_transaction \d+ DBE_PERF.global_user_transaction -- workload transaction create table temp_info_before as select * from dbe_perf.workload_transaction ; begin; select 1; commit; begin; select 1; rollb...
<reponame>pticostaricags/CustomerFinder<filename>CustomerFinder/CustomerFinderDB/dbo/Functions/Table-valued Functions/fnGetTwitterUserStatusLast30Days.sql CREATE FUNCTION [dbo].[fnGetTwitterUserStatusLast30Days] ( @username NVARCHAR(100) ) RETURNS TABLE AS RETURN ( SELECT TUS.*, TA.Username FROM TwitterUserStatus TU...
SELECT COUNT(`tq`.`id`) AS `now`, `tid`.`total` FROM T_QUESTION AS `tq` LEFT JOIN T_ID AS `tid` ON `tq`.`id` = `tid`.`id` WHERE `tq`.`id` = :id;
<reponame>URAmiRBin/steamdb -- counts how many times a game is sold SELECT game_id, COUNT ( game_id ) FROM user_games GROUP BY game_id; -- counts how many games a user has bought SELECT user_id, COUNT ( user_id ) FROM user_games GROUP BY user_id;
<gh_stars>0 -- MySQL dump 10.14 Distrib 5.5.68-MariaDB, for Linux (x86_64) -- -- Host: localhost Database: coinos -- ------------------------------------------------------ -- Server version 5.5.68-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CH...
-- Lookup between road and roadlink on fid CREATE OR REPLACE VIEW osmm_itn.road_roadlink AS SELECT road_fid, replace(roadlink_fid, '#', '') AS roadlink_fid FROM (SELECT fid AS road_fid, unnest(networkmember_href) AS roadlink_fid FROM osmm_itn.road) AS a; -- Lookup between roadlink and the roadnod...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 11, 2021 at 02:24 PM -- Server version: 10.4.19-MariaDB -- PHP Version: 7.4.19 -- -------------------------------------------------------- -- -- Dumping data for table `vendors` -- INSERT...
-- Creates a database in the server CREATE DATABASE IF NOT EXISTS hbtn_0d_2; -- Creates a user with SELECT privileges only CREATE USER IF NOT EXISTS 'user_0d_2'@'localhost' IDENTIFIED BY 'user_0d_2_pwd'; GRANT SELECT ON hbtn_0d_2.* TO 'user_0d_2'@'localhost'; FLUSH PRIVILEGES;
<reponame>wf539/TK70-461 ----70-461 Ch 3 Ex 1 USE [TSQL2012]; GO --1. SELECT S.[shipperid] , [companyname] , [phone] AS phone number FROM [Sales].[Shippers] AS S; --2. SELECT S.[shipperid] , [companyname] , [phone] AS "phone number" FROM [Sales].[Shippers] AS S;
<filename>SQL/Weather_Observation_Station_13.sql SELECT CAST(SUM(LAT_N) AS NUMERIC(10,4)) FROM STATION WHERE 1=1 AND LAT_N > 38.7880 AND LAT_N < 137.2345
<filename>mssql/01.DatabasesIntroduction/P18.BasicSelectAllFields.sql GO USE [SoftUni] GO SELECT * FROM [Towns] GO SELECT * FROM [Departments] GO SELECT * FROM [Employees]
select billitem.id as 'Bill Item Id', bill.`ID` as 'Bill Id' , bill.`BILLTYPE`, bill.`CREATEDAT`, billitem.`NETVALUE` as 'BillItem Net Value' , bill.`NETTOTAL` as 'bill Net Total',billitem.`PAIDFORBILLFEE_ID`,billitem.`REFERANCEBILLITEM_ID`,billitem.`REFERENCEBILL_ID`, bill.`REFERENCEBILL_ID`,bill.`CANCELLEDBILL_ID` fr...
<filename>code/SQL/hana_volume_usage_data.sql select TOP 1 d.usage_type, ROUND(MAX( d.total_size)/1024/1024/1024, 1) AS "TOTAL_SIZE_DATA_GB", ROUND(MAX( d.used_size)/1024/1024/1024, 1) AS "USED_SIZE_DATA_GB" from ( ( m_volumes as v1 join M_VOLUME_SIZES as v2 on v1.volume_id = v2.volume_id ) right outer join m_disks as ...
<reponame>TAUSBV/cef-data-marketplace ALTER TABLE `products` ADD COLUMN `matching_data_request_id` INT UNSIGNED AFTER `total_target_words`; ALTER TABLE `products` ADD CONSTRAINT `fk-product-matching_data_request` FOREIGN KEY (`matching_data_request_id`) REFERENCES `matching_data_request` (`...
INSERT INTO `lt_area` VALUES ('1', '0', '北京', '0'); INSERT INTO `lt_area` VALUES ('2', '1', '北京市', '0'); INSERT INTO `lt_area` VALUES ('3', '2', '东城区', '0'); INSERT INTO `lt_area` VALUES ('4', '2', '西城区', '0'); INSERT INTO `lt_area` VALUES ('5', '2', '崇文区', '0'); INSERT INTO `lt_area` VALUES ('6', '2', '宣武区', '0'); IN...
<filename>src/test/resources/schema.sql create table job ( id varchar(256) not null primary key, status varchar(256) not null, current_task int not null, pipeline_id varchar(256) not null, parent_task_execution_id varchar(256), label varchar(256), create_time timestamp not null, start_time timestamp, ...
BEGIN; ALTER TABLE kv_staging RENAME TO graveler_staging_kv; ALTER TABLE graveler_staging_kv ALTER COLUMN identity DROP NOT NULL; COMMIT;
<reponame>mmorel-35/promscale<gh_stars>100-1000 INSERT INTO log VALUES('migration 0.2.0');
<filename>sql/updates/2.0.0-rc1--2.0.0-rc2.sql DROP FUNCTION IF EXISTS detach_data_node(name,regclass,boolean,boolean); DROP FUNCTION IF EXISTS distributed_exec; DROP PROCEDURE IF EXISTS refresh_continuous_aggregate(regclass,"any","any"); DROP VIEW IF EXISTS timescaledb_information.continuous_aggregates; -- Rebuild...
<filename>docker/images/database/fixtures.d/0000-schema.sql create table users ( email longtext null, first_name longtext null, last_name longtext null, role enum ('user', 'admin') null, kdf_algorithm enum ('argon2...
<reponame>strk/nz-buildings -- Verify nz-buildings:buildings/functions/building_use on pg BEGIN; SELECT has_function_privilege('buildings.building_use_update_end_lifespan(integer[])', 'execute'); ROLLBACK;
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50528 Source Host : localhost:3306 Source Database : reading Target Server Type : MYSQL Target Server Version : 50528 File Encoding : 65001 Date: 2015-05-21 21:59:32 */ SET FOREIGN_KEY_CHECKS=0; -- -...
<filename>sql2_persediaan/beban_rinci_sql/beban_barang4_korpri.sql DROP VIEW IF EXISTS view_beban_barang4_korpri; CREATE VIEW view_beban_barang4_korpri AS SELECT *, beban * harga AS jumlah_harga FROM view_beban_barang3_korpri WHERE 1 = 1 AND beban > 0 AND id_skpd = 27; GRANT ALL PRIVILEGES ON view_beban_barang4...
<gh_stars>1-10 /*L Copyright SAIC Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/cabio/LICENSE.txt for details. L*/ DROP PUBLIC SYNONYM PID_INTERACTION_EVIDENCE / -- -- PID_INTERACTION_EVIDENCE (Synonym) -- -- Dependencies: -- PID_INTERACTION_EVIDENCE (Table) -- CR...
<gh_stars>10-100 BEGIN; ALTER TABLE prims ADD COLUMN CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000'; ALTER TABLE prims ADD COLUMN CollisionSoundVolume float not null default 0.0; COMMIT;
<gh_stars>10-100 CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_route_point_to_point_exception_safe(origin GEOMETRY, destination GEOMETRY, mode TEXT, options TEXT[], units TEXT, OUT duration integer, OUT length real, OUT shape geometry) AS $$ SELECT trunc(random() * 1000)::integer duration, ST_Distan...
<gh_stars>100-1000 -- -- Calculate the equal interval bins for a given column -- -- @param in_array An array of numbers to determine the best -- bin boundary -- -- @param breaks The number of bins you want to find. -- -- -- Returns: upper edges of bins -- -- CREATE OR REPLACE FUNCTION @extschema@....
<reponame>Zhaojia2019/cubrid-testcases --[er]create two tables with varchar and nchar varying data types and tests a create syntax with conditions like 'varchar(-1)','nchar varying(-1)' and then report syntax error create class c_v (v varchar(-1)); create class c_nv (nv nchar varying(-1)); drop c_v; drop c_nv;
<filename>examples/mssql/mssql_init.sql<gh_stars>10-100 USE master GO -- Create the new database if it does not exist already IF NOT EXISTS ( SELECT [name] FROM sys.databases WHERE [name] = N'RedisGearsTest' ) CREATE DATABASE RedisGearsTest GO -- Create sample emp table USE [RedisGea...
<reponame>opengauss-mirror/Yat -- @testpoint: opengauss关键字reuse非保留),作为索引名,部分测试点合理报错 --前置条件,创建一个表 drop table if exists reuse_test; create table reuse_test(id int,name varchar(10)); --关键字不带引号-成功 drop index if exists reuse; create index reuse on reuse_test(id); --清理环境 drop index reuse; --关键字带双引号-成功 drop index if exists...
<filename>sql/State/StoredProcedures/SP_DeleteState/SP_DeleteState.create.sql -- Create a new stored procedure called 'SP_DeleteState' in schema 'dbo' -- Drop the stored procedure if it already exists IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE SPECIFIC_SCHEMA = N'dbo' AND SPECIFIC_NAME = N'SP_Delet...
<filename>data_scrapping/db_calc/queries/sql_queries/monthly.sql<gh_stars>0 -- Table is created displaying the max and min based on the previous month -- duplicates needs to be cleared drop table if exists month{}; create table month{0} ( with monthly as ( select * from main where date > subdate(curdate(), int...
<gh_stars>0 create table if not exists prefeitos( id int unsigned not null auto_increment, nome varchar(255) not null, cidade_id int unsigned, PRIMARY KEY(id), UNIQUE KEY(cidade_id), FOREIGN KEY(cidade_id) REFERENCES cidades(id) );
-- Query the list of CITY names from STATION that do not end with vowels. -- Your result cannot contain duplicates. SELECT DISTINCT(CITY) FROM STATION WHERE CITY RLIKE '[^AEIOUaeiou]$';
<gh_stars>1-10 CREATE TABLE babelcache ( keyhash VARCHAR(50), payload MEDIUMBLOB, PRIMARY KEY (keyhash) ) ENGINE = MyISAM;
<filename>migrations/2021-03-18-234004_create_rtc_rw_configs/down.sql DROP TABLE rtc_reader_config; DROP TABLE rtc_writer_config;
/*********************** params: database ***********************/ --Select database USE @database@; GO --Drop raw.hgcpt table IF(OBJECT_ID('raw.hgcpt') IS NOT NULL) BEGIN DROP TABLE raw.hgcpt; END ; GO --Create raw.hgcpt table IF(OBJECT_ID('raw.hgcpt') IS NULL) BEGIN CREATE TABLE raw.hgcpt ( HG...
USE [NavIntegrationDB] GO /****** Object: StoredProcedure [dbo].[SWITCH_Temp_DetailsDelete] Script Date: 02/13/2012 17:17:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[SWITCH_Temp_DetailsDelete] @param_strClientID nvarchar(50) = NULL, @param_strPortfolioID nvarchar(50) = NUL...
-- +goose Up CREATE TABLE IF NOT EXISTS production.test ( id SERIAL PRIMARY KEY, code text NOT NULL, meta jsonb, created_at timestamptz NOT NULL DEFAULT now(), updated_at timestamptz NOT NULL DEFAULT now(), deleted_at timestamptz NULL ); -- +goose Down DROP TABLE IF EXISTS production.test;
<reponame>axvr/txtdb SELECT * FROM foo WHERE bar IN ('hello', 'world') SELECT * FROM foo WHERE baz IN (select * from bar where woz in ('apple', 'steve')) UPDATE sometable SET foo = 'bar', bar = 'foo' /* hello = hello + 1 */ /* WHERE foo = 'baz' */ DELETE FROM [foo bar] /* WHERE x = 1 */ SELECT ...
-- 2019-09-17T15:08:33.611Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2019-09-17 17:08:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=568741 ; -- 2019-09-17T15:22:45.047Z -- I forgot to set the DICTIONARY_ID_COMMENTS Syste...
/* * Every claim change from the RDA API contains a 64-bit sequence number that can be used * to request a replay of past updates. Each claim in the database will have the most recent * sequence number that affected that claim stored in a column. */ /* * Add the sequence number column used to track which update ...
UPDATE MR SET MR.Quantity = CASE WHEN M.DisplayUnit IN (3, 4) THEN ROUND(MR.Quantity * 1000, 4) WHEN M.DisplayUnit IN (1, 2) THEN ROUND(MR.Quantity / 1000, 4) END FROM [Notification].[MovementReceipt] AS MR INNER JOIN [Notification].[Movement] AS M ON M.Id = MR.MovementId WHERE M.DisplayUnit != M.QuantityUnit ...
-- Autumn 2021 edition -- Postgres 13 DROP SCHEMA IF EXISTS patstat CASCADE; CREATE SCHEMA patstat AUTHORIZATION patstat; CREATE TABLE patstat.tls201_appln ( appln_id int NOT NULL DEFAULT ('0'), appln_auth char(2) NOT NULL DEFAULT (''), appln_nr varchar(15) NOT NULL DEFAULT (''), appln_kind char(2) N...
<gh_stars>1-10 DROP DATABASE IF EXISTS itplatform; -- 建立数据库 CREATE DATABASE IF NOT EXISTS itplatform DEFAULT CHARSET utf8 COLLATE utf8_general_ci; alter database itplatform character set utf8; set character_set_client=utf8; set character_set_connection=utf8; set character_set_database=utf8; set character_set_r...
INSERT INTO public.products (id, code, name, description, price, unit_by_user, renewal, game_content, status, image_id, available_from, available_to, type_id) VALUES (2, 'TEST-00002', 'Produit Test 2', 'Description Test Produit 2', 7.99, 1, false, false, 'NO_AVAILABLE', 0, '2019-08-22 14:45:30.473000', null, 2); INSERT...
<gh_stars>1-10 /* Navicat Premium Data Transfer Source Server : 127.0.0.1_pg Source Server Type : PostgreSQL Source Server Version : 130003 Source Host : localhost:5432 Source Catalog : 1024notes Source Schema : public Target Server Type : PostgreSQL Target S...
/* src/test/modules/plsample/plsample--1.0.sql */ -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION plsample" to load this file. \quit CREATE FUNCTION plsample_call_handler() RETURNS language_handler AS 'MODULE_PATHNAME' LANGUAGE C; CREATE TRUSTED LANGUAGE plsam...
<filename>fixtures/doctests/config/008/input.sql include_dir 'conf.d'
<reponame>SKalt/pg_sql_parser_tests CREATE OR REPLACE FUNCTION my_consistent(internal, data_type, smallint, oid, internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT;
CREATE TABLE `mst_projbudget` ( `projbudget_id` varchar(30) NOT NULL , `dept_id` varchar(30) NOT NULL , `project_id` varchar(30) NOT NULL , `projbudget_name` varchar(255) NOT NULL , `projbudget_descr` varchar(255) , `projbudget_year` int(4) NOT NULL , `projbudget_month` int(2) NOT NULL , `projbu...