sql
stringlengths
6
1.05M
-- file:select_parallel.sql ln:112 expect:true select count(*) from tenk1, tenk2 where tenk1.hundred > 1 and tenk2.thousand=0
<gh_stars>0 CREATE TABLE IF NOT EXISTS "Email_Notification_Log" ( "Email_Notification_Log_Id" BIGSERIAL, "Notification_Type" VARCHAR(20) NOT NULL, "Notification_Id" VARCHAR(80) NOT NULL, "Message" JSONB NOT NULL, "Timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "Created" TIMESTAMP WITH TIME ZONE DEFAULT now(...
<gh_stars>0 -- File generated by Mangos Online Translation Editor (MOTE) v2.10 SET NAMES 'utf8'; UPDATE `trans_words` SET `content_loc3`='English Missing: 268925' WHERE `word_id` = 268925; -- locales_page_text - text : entry=2605 UPDATE `trans_words` SET `content_loc3`='Item Text Missing:2822' WHERE `word_id` = 125697;...
CREATE DATABASE aemenersol USE [aemenersol] CREATE TABLE [dbo].[Platform]( [id] [int] NULL, [uniqueName] [varchar](200) NULL, [latitude] [float] NULL, [longitude] [float] NULL, [CreatedAt] [datetime] NULL, [updatedAt] [datetime] NULL ) CREATE TABLE [dbo].[Well]( [id] [int] NULL, [platformId] [int]...
<filename>data/migration/sql/2020_04_13_add_id_ref_for_users_table.sql alter table users add id_ref varchar(50) null;
<gh_stars>1-10 -- Revert ggircs-portal:mutations/create_product_naics_code from pg begin; drop function ggircs_portal.create_product_naics_code; commit;
<reponame>robertpknight/dbt_intercom_source select * from {{ var('conversation_contact_history') }}
CREATE TABLE BOOKMARK ( IDT_BOOKMARK SERIAL PRIMARY KEY NOT NULL, NAM_BOOKMARK VARCHAR (500), DES_LINK VARCHAR (1000), DES_HTML TEXT, FLG_DELETED BOOLEAN NOT NULL, FLG_ARCHIVED BOOLEAN NOT NULL, NUM_VISIBILITY SMALLINT NOT NULL, DAT_CREATION TIMESTAMP DEFAULT CURRENT_TIMESTAMP, DAT_UPDATE TIMESTAMP );
<reponame>MxxxL/dormAdmin /* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 80020 Source Host : localhost:3306 Source Schema : dormadmin Target Server Type : MySQL Target Server Version : 80020 File Encoding :...
<gh_stars>10-100 --/**************************************************************************** -- (c) Copyright IBM Corp. 2008 All rights reserved. -- -- The following sample of source code ("Sample") is owned by International -- Business Machines Corporation or one of its subsidiaries ("IBM") and is -- copyrighte...
create database eazybank; use eazybank; CREATE TABLE `users` ( `id` INT NOT NULL AUTO_INCREMENT, `username` VARCHAR(45) NOT NULL, `password` VARCHAR(45) NOT NULL, `enabled` INT NOT NULL, PRIMARY KEY (`id`)); CREATE TABLE `authorities` ( `id` int NOT NULL AUTO_INCREMENT, `username` varchar(45) NOT NULL, `author...
<gh_stars>1-10 ----------------------------------------- -- Tables Used in this Section ----------------------------------------- @@&&fc_json_loader. 'OCI360_BDS_INSTANCES' ----------------------------------------- DEF title = 'BigData Cluster Info' DEF main_table = 'OCI360_BDS_INSTANCES' BEGIN :sql_text := q'{ SEL...
-- [er]add non-exisiting member(user) to dba group autocommit off; call login('dba','') on class db_user; call find_user ('dba') on class db_user to admin; call add_member('user1') ON admin; DROP user user1; rollback; autocommit on;
<reponame>cufarvid/climb-comp -- AlterTable ALTER TABLE "Route" ALTER COLUMN "round" DROP DEFAULT;
CREATE DATABASE IF NOT EXISTS `hibernate` DEFAULT CHARACTER SET latin1; USE hibernate; GRANT ALL ON hibernate.* TO 'hibuser'@'%' identified by '@@DB_PWD@@'; commit;
CREATE DEFINER=`root`@`localhost` EVENT `TASK_INCIDENCIAS` ON SCHEDULE EVERY 15 MINUTE STARTS '2013-10-18 15:18:13' ON COMPLETION PRESERVE DISABLE COMMENT '' DO BEGIN CALL PROCESAR_INCIDENCIAS(); CALL PROCESAR_INCIDENCIAS_NUEVAS(); END
/* Navicat MySQL Data Transfer Source Server : ILA Source Server Version : 50630 Source Host : 172.16.31.10:8683 Source Database : osc_summer_2017 Target Server Type : MYSQL Target Server Version : 50630 File Encoding : 65001 Date: 2017-02-06 15:19:44 */ SET FOREIGN_KEY_CHECKS=0; ...
<reponame>ITNano/3things -- phpMyAdmin SQL Dump -- version 4.2.12deb2+deb8u2 -- http://www.phpmyadmin.net -- -- Värd: localhost -- Tid vid skapande: 26 sep 2017 kl 01:13 -- Serverversion: 5.5.55-0+deb8u1 -- PHP-version: 5.6.30-0+deb8u1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @O...
-- Author: <NAME> (<EMAIL>) DROP TABLE IF EXISTS all_ways; -- Ways to split --------------------------------------------------------------------------------------------------------- CREATE TABLE all_ways AS SELECT DISTINCT way_id, sort(array_agg(sequence_id)) split_nodes FROM way_nodes INNER JOIN ways ON way_nodes.w...
<filename>database/broggi.sql -- 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'; -- -------------------------------------------...
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100 -- file:portals.sql ln:63 expect:true FETCH 6 in foo6
<gh_stars>1-10 USE new_cg; UPDATE variable SET value='b:1;' WHERE name='up'; TRUNCATE cache; TRUNCATE cache_bootstrap; TRUNCATE cache_form; TRUNCATE cache_menu;
-- 2020-01-23T08:29:22.697Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process SET Name='Allocate Invoices',Updated=TO_TIMESTAMP('2020-01-23 10:29:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=584643 ; -- 2020-01-23T08:30:12.365Z -- I forgot to set the DICTIONARY_ID_CO...
<filename>backend/de.metas.handlingunits.base/src/main/sql/postgresql/system/5486160_sys_gh3430_M_HU_BestBefore_V.sql -- 2018-02-21T11:52:48.777 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Table (AccessLevel,AD_Client_ID,CreatedBy,IsActive,IsSecurityEnabled,IsDeleteable,IsHighVolume...
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SET NOCOUNT ON; SET ANSI_NULLS ON; SET QUOTED_IDENTIFIER ON; USE AP; SELECT VendorName, CustLastName, CustFirstName, VendorState AS State, VendorCity AS City FROM AP.dbo.Vendors AS Vendors JOIN ProductOrders.dbo.Customers AS Customers ON Vendors.VendorZipCode = ...
<reponame>pankaj0567/LearningDapper CREATE PROCEDURE spGetEmployeeById @Id INT AS BEGIN SELECT E.Id ,E.Name ,E.Salary ,E.Email ,E.Gender FROM [tblEmployee] E WHERE Id = @Id; END
<filename>Application/Group/Info/install.sql -- ----------------------------- -- 表结构 `ocenter_group` -- ----------------------------- CREATE TABLE IF NOT EXISTS `ocenter_group` ( `id` int(11) NOT NULL AUTO_INCREMENT, `uid` int(11) NOT NULL, `title` text NOT NULL, `create_time` int(11) NOT NULL, `post_count` i...
<filename>migrations/1514937919_remove_user_activity_table.up.sql ALTER TABLE users ADD COLUMN page_views integer not null default 0; ALTER TABLE users ADD COLUMN search_queries integer not null default 0; UPDATE users SET page_views=coalesce((SELECT page_views FROM user_activity WHERE user_activity.user_id=users.id),...
<filename>src/Frapid.Web/Areas/MixERP.Finance/db/SQL Server/2.x/2.0/src/02.functions-and-logic/finance.get_periods.sql IF OBJECT_ID('finance.get_periods') IS NOT NULL DROP FUNCTION finance.get_periods; GO CREATE FUNCTION finance.get_periods ( @date_from date, @date_to ...
ALTER TABLE gardener_config ADD COLUMN machine_image varchar(256); ALTER TABLE gardener_config ADD COLUMN machine_image_version varchar(256);
<filename>osgp/platform/osgp-core/src/main/resources/db/migration/V2016.038__Refactors_and_renames_device_model_firmware_table.sql<gh_stars>10-100 ALTER TABLE device_model_firmware RENAME TO firmware; ALTER TABLE firmware DROP COLUMN model_code; ALTER TABLE firmware RENAME COLUMN device_model TO device_model_id; ALTE...
DROP TABLE IF EXISTS METRICS_GROUP_ACTIONS CASCADE; DROP TABLE IF EXISTS ACTIONS CASCADE;
<gh_stars>0 -- Set timezone to UTC SET TIME ZONE 'UTC'; -- Enable Uuid CREATE EXTENSION "uuid-ossp"; -- Create the sys_user table CREATE TABLE sys_user ( id uuid PRIMARY KEY DEFAULT uuid_generate_v4(), active BOOLEAN NOT NULL, username VARCHAR(40) NOT NULL UNIQUE, email VARCHAR(50) NOT NULL UNIQUE CHE...
<reponame>eshults5/imbi SET search_path=v1; CREATE TABLE IF NOT EXISTS project_fact_history ( namespace TEXT NOT NULL, "name" TEXT NOT NULL, fact_type TEXT NOT NULL, recorded_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_T...
autocommit off; select name, multiset(select r1.name from resort r1 where r0.activities * r1.activities <> {} order by 1) from resort r0 order by 1 rollback;
-- @testpoint:opengauss关键字right(保留),作为外部数据源名 --关键字不带引号-合理报错 create data source right; --关键字带双引号-成功 drop data source if exists "right"; create data source "right"; drop data source "right"; --关键字带单引号-合理报错 drop data source if exists 'right'; create data source 'right'; --关键字带反引号-合理报错 drop data source if exists `righ...
<reponame>kagaconnect/chromium_host_web_blis CREATE TABLE "drugs" ( "ID" INTEGER PRIMARY KEY AUTOINCREMENT, "Name" TEXT NOT NULL, "Description" TEXT, UNIQUE("Name") );
CREATE DATABASE IF NOT EXISTS `algernon_cloud` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `algernon_cloud`; -- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: 172.16.58.3 Database: algernon_cloud -- ------------------------------------------------------ -- Server version 5.6.27-log /*!4...
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 05, 2019 at 07:52 AM -- Server version: 5.6.26 -- PHP Version: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 29, 2017 at 07:00 AM -- Server version: 10.1.26-MariaDB -- 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...
use partner /*SELECT Cm_Steps.SentDate, Usr_Case_Actions.EntityRef, Usr_Case_Actions.MatterNo, Usr_Case_Actions.[Action], Usr_Case_Actions.ActionDate, Usr_Case_Actions.CurrentUser, Usr_Case_Actions.itemid FROM Cm_CaseItems INNER JOIN Cm_Agendas ON Cm_CaseItems....
<gh_stars>0 -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,,> -- ============================================= CREATE PROCEDURE dbo.Client_Insert -- Add the parameters for the stored procedure here @Name nvarchar(max), @Id in...
INSERT INTO pos_itemtemp VALUES("IATT190000805","193011","191001","192001","40000","1","40000","0","40000","1","1","1","IAT2006190959","NHO2018000007","PAID","","PEDAS"), ("IATT190000805","193023","191001","192003","30000","1","30000","0","30000","1","1","1","IAT2006190959","NHO2018000007","PAID","","193023"), ("IATT19...
<reponame>GabrielSantanaP/MySQL-<filename>Projeto loja/carrinho.sql /** Agenda de contatos @author <NAME> */ -- Criar um novo banco de dados create database dbloja; --------------------------------------------------- -- selecionar o banco de dados use dbloja; --------------------------------------------------- ...
 CREATE FUNCTION [dbo].[ufnGetAccountingStartDate]() RETURNS [datetime] AS BEGIN RETURN CONVERT(datetime, '20030701', 112); END; GO EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Scalar function used in the uSalesOrderHeader trigger to set the ending account date.', @level0type = N'SCHEMA'...
-- file:inet.sql ln:125 expect:true SELECT i, c, i - c AS "minus" FROM inet_tbl
create or replace function londiste.global_add_table( in i_queue_name text, in i_table_name text, out ret_code int4, out ret_note text) as $$ -- ---------------------------------------------------------------------- -- Function: londiste.global_add_table(2) -- -- Register tab...
create table documents( document_id int(11) not null auto_increment primary key, url varchar(200) not null unique, title varchar(100) not null unique, publication_date date, publication_date_precision enum('day','month','year','multi-year'), modified_date date, modified_date_precision enum('...
CREATE KEYSPACE IF NOT EXISTS scassandra WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 }; CREATE TABLE if NOT EXISTS person(first_name text, last_name text, age int, interesting_dates set<timestamp>, primary KEY ((first_name, last_name ))) ;
<gh_stars>1-10 -- Italy BEGIN; UPDATE dim_calendar SET hol_it = FALSE ; -- 1 January New Year's Day Capodanno UPDATE dim_calendar SET hol_it = TRUE WHERE EXTRACT( DAY FROM calendar_date) = 1 AND EXTRACT( MONTH FROM calendar_date) = 1 ; -- 6 January Epiphany Epifania UPDATE dim_calendar S...
/* Navicat Premium Data Transfer Source Server : 本地 Source Server Type : MySQL Source Server Version : 50730 Source Host : localhost:3306 Source Schema : yuque Target Server Type : MySQL Target Server Version : 50730 File Encoding : 65001 Date: 15/06/2021 10:29:41 */...
/************************************************** **************************************************/ ALTER VIEW [labkey_etl].[v_valid_dx_list] AS -- ==================================================================================================================== -- Object: v_valid_dx_list -- Author: <NAME>...
-- Satisfies the "If success, mark plugin as being deployed in plugins table" -- requirement of RFC 0000 DeployPlugin. DO $$ BEGIN IF to_regtype('plugin_deployment_status') IS NULL THEN CREATE TYPE plugin_deployment_status AS ENUM ('fail', 'success'); END IF; END $$; -- This table is append-only - so...
<filename>courses/data-to-insights/demos/specify-schema-definition-with-ddl.sql<gh_stars>1-10 -- This example script shows how to create a table with -- descriptions and labels to help downstream users know what's in it -- -- Documentation: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definitio...
<reponame>shiguoqian/apollo<gh_stars>100-1000 INSERT INTO GrayReleaseRule (`Id`, `AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `Rules`, `ReleaseId`, `BranchStatus`) VALUES (1, 'someAppId', 'default', 'application', 'gray-branch-1', '[{"clientAppId":"someAppId","clientIpList":["1.1.1.1"]}]', 986, 1); INSERT IN...
<reponame>cb-deepak/pgcodekeeper SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE TABLE [dbo].[table1]( [c1] [int] NOT NULL, [c2] [int] NOT NULL, [c3] [varchar](100) NOT NULL) ON [PRIMARY] GO CREATE NONCLUSTERED INDEX [index_table1] ON [dbo].[table1] ([c1]) WITH (FILLFACTOR = 50) ON [PRIMARY] GO
--TEST: update columns with default value of CURRENT_TIMESTAMP create table u01(id int primary key, col1 timestamp default CURRENT_TIMESTAMP unique, col2 timestamp default CURRENT_TIMESTAMP not null, col3 timestamp default CURRENT_TIMESTAMP, col4 timestamp default CURRENT_TIMESTAMP); insert into u01 values(1, times...
drop table if exists foo,range_test; create table range_test(id int not null , test_int int, test_smallint smallint, test_numeric numeric(38,10), test_float float, test_real real, test_double double, test_monetary monetary, test_datetime timestamp,primary key(id,test_int)) PARTITION BY RANGE (test_int) ( PARTITION p0 V...
-- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION pg_natural_sort_order" to load this file. \quit CREATE OR REPLACE FUNCTION natural_sort_order( TEXT, INTEGER ) RETURNS TEXT AS 'pg_natural_sort_order' LANGUAGE C IMMUTABLE;
------------------------------------------------------------------------------- -- -- Script: archival_headroom.sql -- Purpose: to show how much headroom the tightest archival has had -- For: 8.0 and later -- -- Copyright: (c) Ixora Pty Ltd -- Author: <NAME> -- -- Description: Compares the time taken for each...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 29, 2021 at 12:21 PM -- Server version: 10.4.20-MariaDB -- PHP Version: 8.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
CREATE TABLE `t_parkir` ( `id` bigint(20) NOT NULL, `kode_cus_in` varchar(25) DEFAULT NULL, `kode_card_in` varchar(100) DEFAULT NULL, `waktu_in` timestamp NOT NULL DEFAULT current_timestamp(), `tipe` tinyint(4) DEFAULT NULL, `shift_in` tinyint(4) DEFAULT NULL, `pos_in` varchar(5) DEFAULT NULL, `status` ...
<gh_stars>0 #DROP DATABASE databas6; #CREATE DATABASE databas6; #dbunittest #databas6 USE databas6; SET collation_connection = 'utf8_general_ci'; ALTER DATABASE databas6 CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE TABLE `backup_report_06_2018` ( `umpire_type` varchar(100) DEFAULT NULL, `ag...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 15, 2021 at 04:22 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<reponame>sijulll/JKD_AHP -- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 21, 2020 at 04:08 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+0...
drop procedure GamesDB.uspFilterPublishers; go go create procedure [GamesDB].uspFilterPublishers @pageSize int, @pageNumber int, @name varchar(65) as begin declare @tempTable table ( PublisherID int, Name varchar(max) not null, City varchar(max), Country varchar(max), Logo varchar(max) ) set n...
<filename>cemindo_db.sql -- -------------------------------------------------------- -- Host: 172.16.58.3 -- Server version: 10.5.9-MariaDB-1:10.5.9+maria~focal - mariadb.org binary distribution -- Server OS: debian-linux-gnu -- HeidiSQL Version: 10.3...
INSERT INTO burgers (burger_name, devoured) VALUES ("Bacon and Cheddar", false); INSERT INTO burgers (burger_name, devoured) VALUES ("Mushroom", false); INSERT INTO burgers (burger_name, devoured) VALUES ("PB and J", false); INSERT INTO burgers (burger_name, devoured) VALUES ("Bacon and Onion", false); INSERT INTO burg...
<reponame>nbsp1221/algorithm<gh_stars>0 SELECT ANIMAL_TYPE, IFNULL(NAME, 'No name'), SEX_UPON_INTAKE FROM ANIMAL_INS ORDER BY ANIMAL_ID ASC;
<reponame>mburhanudinn/laporrektorweb<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 11, 2017 at 07:25 AM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.5.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101...
<gh_stars>0 create database perntodo; create table todo( todo_id serial primary key, description varchar(255) );
<gh_stars>0 ALTER TABLE Users DROP CONSTRAINT PK_User_IdAndUsername ALTER TABLE Users ADD CONSTRAINT PK_Id PRIMARY KEY (Id) ALTER TABLE Users ADD CONSTRAINT CHK_Username_Length CHECK (DATALENGTH(Username) >= 3)
use master drop database test01 go create database test01 go create database [myDatabase] /* use this database */ use test01 create table table_01( name VARCHAR(10), description VARCHAR(30) ) ALTER TABLE table_01 ALTER COLUMN description VARCHAR(50) NOT NULL; ALTER TABLE table_01 ADD age INT; ALTER TABLE table_01...
SET DEFINE OFF; ALTER TABLE AFW_36_ATRIB_DISPN ADD ( CONSTRAINT AFW_36_ATRIB_DISPN_UK1 UNIQUE (REF_PAGE, NOM_SQL, REF_TYPE_DON) ENABLE VALIDATE) /
DROP TABLE IF EXISTS Descriptions CASCADE; -- SCHEMA CREATE TABLE Descriptions ( -- General description_id SERIAL PRIMARY KEY, created TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), updated TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), -- Attributes revision_id INTEGER NOT NULL REFERENCE...
<gh_stars>1-10 prompt --application/set_environment set define off verify off feedback off whenever sqlerror exit sql.sqlcode rollback -------------------------------------------------------------------------------- -- -- ORACLE Application Express (APEX) export file -- -- You should run the script connected to SQL*Plu...
<gh_stars>1-10 CREATE TABLE [dbo].[BlogPosts] ( [Id] [uniqueidentifier] NOT NULL, [Title] [nvarchar](50) NULL, [Text] [nvarchar](max) NULL -- constraints CONSTRAINT PK_BlogPost PRIMARY KEY (Id), [Hash] NVARCHAR(MAX) NULL )
<filename>src/test/resources/sql/create_table/904d4a37.sql -- file:inherit.sql ln:334 expect:true CREATE TABLE inht2 (x int) INHERITS (inht1)
<reponame>dram/metasfresh -- C_InvoiceLine.M_InOutLine_ID: we need to unlink the iol on certain reversal cases; note that the fileds are read-only -- 31.08.2015 15:27 -- URL zum Konzept UPDATE AD_Column SET IsAlwaysUpdateable='Y', IsUpdateable='Y',Updated=TO_TIMESTAMP('2015-08-31 15:27:20','YYYY-MM-DD HH24:MI:SS'),Up...
<reponame>villeheikkila/maku --! Previous: sha1:d0d1f9eeb425172811bf4cead2b5284c7cb4ecc2 --! Hash: sha1:1d859247e70c6ec1075384ae0b87ab433befb724 --! split: 1-current.sql -- Enter migration here ALTER TABLE app_public.companies ENABLE ROW LEVEL SECURITY; CREATE POLICY select_all ON app_public.companies FOR SELECT ...
<reponame>asif37/AsifCodingSamples CREATE FUNCTION [dbo].[fn_parseaccountnumber] ( @AccountNumber NVARCHAR(10) ) RETURNS NVARCHAR(10) AS BEGIN DECLARE @IntAlpha INT SET @IntAlpha = PATINDEX('%[^0-9]%', @AccountNumber) WHILE @IntAlpha > 0 BEGIN SET @AccountNumber = STUFF(@AccountNumber, @IntAlpha, 1, '') SE...
--use MovieDB; select * from RESERVATION_USER; select * from RESERVATION_BBS; select * from RESERVATION_MOVIE; select * from RESERVATION_SEAT; select * from RESERVATION_TICKET;
<gh_stars>0 CALL adminControl('<KEY>', '3a37e4dec638e8d9114701cc6aafe19837b13455f075376e3a900904ed0a5e13'); CALL userControl ('email_1', '<KEY>');
<reponame>JujaLabs/itevents --liquibase formatted sql --changeset vaa25:3 CREATE TABLE currency ( id SERIAL PRIMARY KEY UNIQUE NOT NULL, name VARCHAR(40) UNIQUE NOT NULL );
<reponame>JoelBondurant/RandomCodeSamples<gh_stars>1-10 -- drop view HistToolStateStatsView create view HistToolStateStatsView as select h.Tool_Id as ToolId, h.ToolState_Id as ToolStateId, datediff(d, td.dateandtime, pbv.tNow) as p, h.DurationInSeconds, h.FullDurationInSeconds, h.NumStateEndings from HistToolSta...
CREATE FUNCTION func632() RETURNS integer LANGUAGE plpgsql AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE151);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE136);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE455);val:=(SELECT COUNT(*)INTO MYCOU...
------------------------------------------------------------------------------- -- pim task ------------------------------------------------------------------------------- CREATE TABLE PIM_TASK( ID BIGINT NOT NULL, NAME VARCHAR(200), CONTENT VARCHAR(200), START_TIME DATETIME, END_TIME...
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50715 Source Host : localhost:3306 Source Database : tp5 Target Server Type : MYSQL Target Server Version : 50715 File Encoding : 65001 Date: 2018-01-15 23:53:25 */ SET FOREIGN_KEY_CHECKS=0; -- -----...
<gh_stars>1000+ /* This script accompanies my blog post of the same title, part of a series on using the object-oriented features of Oracle PL/SQL (object types). This script focuses on how you can use object types inside relational tables, either as an object type table (TABLE OF object_type) or as object type colu...
CREATE OR REPLACE TYPE numbers_t IS TABLE OF NUMBER; / CREATE OR REPLACE PACKAGE pipeline IS CURSOR refcur_c IS SELECT line FROM all_source; TYPE refcur_t IS REF CURSOR RETURN refcur_c%ROWTYPE; FUNCTION double_values (dataset refcur_t) RETURN numbers_t PIPELINED; EN...
<filename>tests/queries/0_stateless/00861_decimal_quoted_csv.sql DROP TABLE IF EXISTS test_00861; CREATE TABLE test_00861 (key UInt64, d32 Decimal32(2), d64 Decimal64(2), d128 Decimal128(2)) ENGINE = Memory; INSERT INTO test_00861 FORMAT CSV "1","1","1","1" ; INSERT INTO test_00861 FORMAT CSV "2","-1","-1","-1" ; INSE...
<reponame>rodel-talampas/gpdb<gh_stars>1-10 -- start_ignore drop schema sundarr; drop role sundarr; drop role wca_dining_role; drop role readonly_dining_role; -- end_ignore create schema sundarr; create role sundarr; create role wca_dining_role; create role readonly_dining_role;
--TEST: string of date/time format is not supported in width_bucket() function. drop if exists foo; create table foo(a varchar); insert into foo values('2012-12-12'); insert into foo values('2011-12-20'); insert into foo values(NULL); select width_bucket(a, '2011-12-12', '2012-12-31', 3) from foo order by 1; prepare ...
<reponame>LasseWolter/clowdr<gh_stars>10-100 ALTER TABLE "job_queues"."CombineVideosJob" ADD COLUMN "message" text NULL;
create or replace function mess.data_normalise(_tbl regclass, colname text, newMin float, newMax float) returns boolean as $$ DECLARE oldMax float; oldMin float; oldAvg float; BEGIN execute format('select avg(%s) from %s;', colname, _tbl) into oldAvg; -- new code oct 2015 to try to move the points into a 50/50 di...
<filename>awasin (1).sql -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 17 Mar 2022 pada 02.02 -- Versi Server: 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_CHARACTER_SET_CLIE...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 16, 2021 at 09:40 PM -- Server version: 10.4.19-MariaDB -- PHP Version: 8.0.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
create table Backers ( project_id INT NOT NULL, user_id INT NOT NULL, amount INT NOT NULL, private BOOLEAN NOT NULL, FOREIGN KEY(project_id) REFERENCES Projects(id), FOREIGN KEY(user_id) REFERENCES Users(id) ); insert into Backers (project_id, user_id, amount, private) values (62, 545, 6012, 0); insert into Backe...
USE master; PRINT 'Checking PvNoneDb'; DBCC CHECKDB(PvNoneDb) WITH NO_INFOMSGS; PRINT 'Checking PvTornPageDb'; DBCC CHECKDB(PvTornPageDb) WITH NO_INFOMSGS; PRINT 'Checking PvCheckSumDb'; DBCC CHECKDB(PvCheckSumDb) WITH NO_INFOMSGS;
<gh_stars>0 CREATE FUNCTION fn_BusinessEntityFullName (@BusinessEntityId INT) RETURNS NVARCHAR(2000) AS BEGIN DECLARE @result NVARCHAR(2000) select @result = [Name] + N' ' + ZipCode FROM dbo.BusinessEntity WHERE Id=@BusinessEntityId RETURN @result END select o.*, dbo.fn_BusinessEntityFullName(BusinessE...