sql
stringlengths
6
1.05M
CREATE FUNCTION pg_catalog.reverse(str text) RETURNS text AS $$ SELECT plvstr.rvrs($1,1,NULL);$$ LANGUAGE SQL IMMUTABLE STRICT; COMMENT ON FUNCTION pg_catalog.reverse(text) IS 'Reverse string or part of string'; CREATE FUNCTION dump(text) RETURNS varchar AS 'MODULE_PATHNAME', 'orafce_dump' LANGUAGE C; CREATE FUNCTIO...
<filename>sql/hive/src/test/resources/sqlgen/rollup_cube_6_4.sql -- This file is automatically generated by LogicalPlanToSQLSuite. SELECT a, b, sum(a) FROM parquet_t2 GROUP BY CUBE(a, b) ORDER BY a, b -------------------------------------------------------------------------------- SELECT `gen_attr` AS `a`, `gen_attr` A...
<reponame>supakjack/ajax-form -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 29, 2019 at 04:30 AM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone...
-- Author: <NAME> -- Task 1: select location from quarter UNION select statecode from employer; -- Task 2: select employer.companyname, employer.division, employer.statecode, interview.salaryoffered FROM employer INNER JOIN interview ON employer.companyname = interview.companyname AND employer.division = interview.di...
<filename>SQL_LDD/CREATE.sql DROP VIEW IF EXISTS STATISTIQUES_ANIMAUX; DROP VIEW IF EXISTS STATISTIQUES_GLOBALES_MEDICAMENTS; DROP VIEW IF EXISTS vIndividu; DROP VIEW IF EXISTS vPersonnel; DROP TABLE IF EXISTS Medicament_autorise; DROP TABLE IF EXISTS Traitement_contient; DROP TABLE IF EXISTS Medicaments; DROP TABLE I...
<reponame>ithaka/artstor-metadata-service-os -- name: sql-retrieve-item select dog.object_id as objectId, dog.object_type_id as objectTypeId, dog.clustered, dog.thumbnail1, dog.thumbnail2, dog.thumbnail3, dog.list_img_url as largeImgUrl, dog.thumbnail_img_url as thumbnailImgUrl, dog.cf_object_id as cfOb...
SELECT s.* FROM Settlements s JOIN Groups g ON g.id=s.groupId WHERE g.id=:groupId AND s.isTemporary=IFNULL(:isTemporary,s.isTemporary);
/* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50541 Source Host : localhost:3306 Source Database : postalcodes_mx Target Server Type : MYSQL Target Server Version : 50541 File Encoding : 65001 Date: 2015-02-21 15:07:54 */ SET FOREIGN_K...
<filename>SQLStorage/getDataSourceAndStaffInfo.sql<gh_stars>0 CREATE PROCEDURE `getDataSourceStaffInfo`( in_casefileUID VARCHAR (45) ) BEGIN SELECT s.StaffEmail, s.StaffName, s.StaffTitle, s.StaffExt, s.Staff800, d.DBID, d.DBName, d.DBAdd1, d.DBAdd2, d.DBCity, d.DBProv, d.DBPCod, d.DBClt, d.DBOrigCreditory, d.DBBal, d...
<reponame>JacobBlomgren/twitter-clone<filename>db/schema.sql<gh_stars>0 CREATE TABLE account ( username VARCHAR(15) UNIQUE NOT NULL CONSTRAINT lowercase CHECK (lower(username) = username), user_id BIGSERIAL PRIMARY KEY, hash CHAR(60) NOT NULL, salt_rounds INTEGER NOT NULL, created_at DATE DEFAULT CURRENT_DATE...
<gh_stars>1-10 /********************************************************************************************************************* * Procedure Name : [h3giGetDocketWelcomeMessage] * Author : <NAME> * Date Created : 23/06/2005 * Version : 1.1.0 * ***********************************...
<filename>DDL/DDL.sql -- -- 테이블 구조 `game_character` -- CREATE TABLE `game_character` ( `no` int(11) UNSIGNED NOT NULL, `game_no` int(11) UNSIGNED NOT NULL DEFAULT 0, `user_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `char_name` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', ...
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('996579102750175233', 'project', '0', '[0],', '项目信息', '', '/project', '99', '1', '1', NULL, '1', '0'); INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `na...
<reponame>viswaratha12/dbwarden /****** Object: View [dbo].[V_DatasetDetails_Analysis] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW dbo.V_DatasetDetails_Analysis AS SELECT dbo.T_Campaign.Campaign_Num AS Campaign, dbo.T_Experiments.Experiment_Num AS Experiment, dbo.T_Dataset.Dataset_N...
<reponame>snake19870227/star-tiger-framework drop table if exists pay_notify; create table pay_notify ( notify_flow varchar(50) not null comment '通知流水号', notify_time varchar(20) not null comment '通知时间', notify_type_id varchar(50) comment '通知类型', notify_type_name varchar(50) ...
<reponame>evisional1/mixerp IF OBJECT_ID('finance.get_retained_earnings') IS NOT NULL DROP FUNCTION finance.get_retained_earnings; GO CREATE FUNCTION finance.get_retained_earnings ( @date_to date, @office_id integer, @factor integer ) RE...
-- add the reporting columns -- stream characteristics, accessibility model status ALTER TABLE {point_schema}.{point_table} ADD COLUMN IF NOT EXISTS stream_order integer; ALTER TABLE {point_schema}.{point_table} ADD COLUMN IF NOT EXISTS stream_magnitude integer; ALTER TABLE {point_schema}.{point_table} ADD COLUMN IF ...
-- Return an array of statements found in the given query text -- -- Regexp curtesy of <NAME> (depesz) -- Implemented in plpython for performance reasons -- CREATE OR REPLACE FUNCTION @extschema@.CDB_QueryStatements(query text) RETURNS SETOF TEXT AS $$ import re pat = re.compile( r'''((?:[^'"$;]+|"[^"]*"|'[^']*'|(...
<reponame>do4Mother/learn-nestjs /* Warnings: - You are about to drop the column `images` on the `Product` table. All the data in the column will be lost. */ -- AlterTable ALTER TABLE `Product` DROP COLUMN `images`; -- CreateTable CREATE TABLE `ProductImage` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `name`...
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 13-Ago-2019 às 03:01 -- Versão do servidor: 10.1.25-MariaDB -- PHP Version: 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
CREATE PROCEDURE [Staging].[usp_ProcessULNs] -- WITH ENCRYPTION AS /* -------------------------------------------------------------------------------------- Example Call - EXEC [Staging].[usp_ProcessULNs] */ -------------------------------------------------------------------------------------- BEGIN SET NOCO...
/** * @author: KentProjects <<EMAIL>> * @license: Copyright KentProjects * @link: http://kentprojects.com */ CREATE TABLE IF NOT EXISTS `Token` ( `token_id` INT UNSIGNED AUTO_INCREMENT NOT NULL, `application_id` INT UNSIGNED NOT NULL COMMENT 'Token Application Identifier', `user_id` INT UNSIGNED NOT NULL COMMENT...
<gh_stars>1-10 DROP VIEW IF EXISTS open9292ov.curr_pos_trail; CREATE VIEW open9292ov.curr_pos_trail As WITH dump AS ( SELECT agency_id, vehicle, trip_headsign, route_short_name, trip_id, trip_id::integer + to_char(now(), 'SSSS')::integer as id, to_char(now(), 'YYYY-MM-DD HH24:MI:SS') as time, current_time...
<reponame>tomvlk/BusinessRuleGenerator-to CREATE OR REPLACE TRIGGER BRG_{code}_{attribute_table}_TRG BEFORE DELETE OR INSERT OR UPDATE ON {attribute_table} FOR EACH ROW DECLARE L_OPER VARCHAR2(3); L_ERROR_STACK VARCHAR2(4000); BEGIN IF INSERTING THEN L_OPER := 'INS'; ELSIF UPDATING THEN L...
<gh_stars>1-10 BEGIN; ALTER TABLE listening_sessions DROP COLUMN spotify_playlist; COMMIT;
--liquibase formatted sql --changeset mharis:10 dbms:postgresql --adding column to handle named URLs alter table observatories add display_id varchar; --replacing default value with name of observatories update observatories set display_id=replace(replace(observatories.name,' ','_'), '''',''); alter table obser...
<gh_stars>10-100 /****** Object: StoredProcedure [AddF03_Continent_ReChild] ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[AddF03_Continent_ReChild]') AND type in (N'P', N'PC')) DROP PROCEDURE [AddF03_Continent_ReChild] GO CREATE PROCEDURE [AddF03_Continent_ReChild] @Contine...
alter table tasks rename to todos; alter table chat_members rename column task_weight to todo_weight;
<gh_stars>10-100 -- file:rowsecurity.sql ln:1679 expect:true CREATE POLICY p1 ON r1 FOR SELECT USING (a < 20)
<reponame>michael-the1/diepvries<filename>test/sql/expected_result_hashdiff.sql MD5(REGEXP_REPLACE(COALESCE(CAST(customer_id AS TEXT), 'dv_unknown')||'|~~|'||COALESCE(CAST(test_string AS TEXT), '')||'|~~|'||COALESCE(TO_CHAR(CAST(test_date AS DATE), 'yyyy-mm-dd'), '')||'|~~|'||COALESCE(TO_CHAR(CAST(test_timestamp_ntz AS...
DROP FUNCTION IF EXISTS conreality.point_gps(float, float) RESTRICT; CREATE FUNCTION conreality.point_gps(lon float, lat float) RETURNS geography AS $$ SELECT ST_SetSRID(ST_MakePoint(lon, lat), 4326)::geography; $$ LANGUAGE sql STABLE PARALLEL SAFE;
<filename>BD/Laborator/lab02/2.sql SELECT nume, functie, data_angajarii, salariu from angajati WHERE data_angajarii BETWEEN '1-JAN-2020' AND '31-DEC-2020';
CREATE DATABASE IF NOT EXISTS SYSMASG DEFAULT CHARACTER SET utf8 COLLATE utf8_spanish_ci; USE SYSMASG; CREATE TABLE IF NOT EXISTS tbl_usuarios ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, usuario varchar(90) DEFAULT NULL, password varchar(60) DEFAULT NULL, rol varchar(30) DEFAULT 'USER', fecha_registro D...
<filename>appstore.sql /* SQLyog Ultimate v12.09 (64 bit) MySQL - 5.7.25-log : Database - appmanage ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!400...
<gh_stars>0 -- :name read-stream :? :* select stream_id, stream_revision, global_revision, data::text from event where stream_id = :stream and stream_revision > :since order by stream_revision; -- :name read-all-events :? :* select stream_id, stream_revision, global_revision, data::text from event where global_revis...
<filename>postgres-esgcet/start/esgf_esgcet.sql -- -- PostgreSQL database dump -- -- Started on 2016-09-01 10:02:01 PDT SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off;...
<gh_stars>0 CREATE DATABASE IF NOT EXISTS `albedo_repair` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; USE `albedo_repair`; -- MySQL dump 10.16 Distrib 10.1.31-MariaDB, for Win32 (AMD64) -- -- Host: localhost Database: albedo_repair -- ------------------------------------------------------ ...
CREATE TABLE IF NOT EXISTS _log ( id TIMESTAMP WITHOUT TIME ZONE DEFAULT NOW() PRIMARY KEY, message TEXT NOT NULL ); INSERT INTO _log(message) SELECT concat('Start initialize "', CURRENT_SCHEMA(), '" database');
<reponame>UAMS-DBMI/PosdaTools<filename>posda/posdatools/queries/sql/InsertFileDispositionsRow.sql<gh_stars>1-10 -- Name: InsertFileDispositionsRow -- Schema: posda_files -- Columns: [] -- Args: ['offset_days', 'uid_root', 'only_modify_group_13'] -- Tags: ['export_event'] -- Description: Insert export_file_disposition...
<reponame>cuba-platform/bpm alter table BPM_PROC_INSTANCE drop column LONG_ENTITY_ID^
drop table if exists t; create table t(a int); insert into t values(1); select t into var from t; drop table t; select var; select var; select var; drop table if exists t;
<filename>api/db/fixtures/truncate-all.sql -- Turn off foreign key checks when truncating tables PRAGMA foreign_keys = OFF; DELETE FROM author; DELETE FROM book; DELETE FROM oauth_clients; DELETE FROM oauth_access_tokens; DELETE FROM oauth_authorization_codes; DELETE FROM oauth_refresh_tokens; DELETE FROM oauth_users; ...
<filename>plugins/extracted/mysql-sys-1.2/sql/uninstall.sql UPDATE plugin_main SET est_actif = -1;
<reponame>PedroPovedaQ/fleet-suite-server -- DropIndex DROP INDEX "Driver.cdl_state_unique";
<filename>db_web_lect.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.7.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Sep 04, 2017 at 06:44 PM -- Server version: 10.1.26-MariaDB -- PHP Version: 7.1.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time...
<reponame>GispoCoding/tarmo ALTER TABLE kooste.osm_kohteet_piste RENAME TO osm_pisteet; --sp_rename @objname = N'[kooste.lipas_pisteet].[kooste.lipas_kohteet_piste_pk]', @newname = N'lipas_pisteet_pk' ALTER TABLE kooste.osm_kohteet_alue RENAME TO osm_alueet;
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 06, 2016 at 07:05 AM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
<reponame>llf7788/Rare_Birds CREATE TABLE `user` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', `name` varchar(32) NOT NULL COMMENT 'name', `password` varchar(32) NOT NULL COMMENT 'password', `role` varchar(32) NOT NULL COMMENT 'role', PRIMARY KEY (`id`), UNIQUE KEY `u_id...
SELECT name, order_date FROM customers LEFT JOIN orders ON orders.cid = customers.cid LEFT JOIN addresses ON addresses.cid = customers.cid WHERE state = 'MA'
<gh_stars>0 -- MySQL Script generated by MySQL Workbench -- Mon 29 Oct 2018 17:23:50 GMT -- 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_MO...
/* SQLyog Community v13.1.5 (64 bit) MySQL - 10.4.11-MariaDB : Database - technovates ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CH...
create table if not exists flyway_schema_history ( installed_rank integer not null constraint flyway_schema_history_pk primary key, version varchar(50), description varchar(200) not null, type varchar(20) not null, script...
<gh_stars>0 -- Revert database-message-store:privileges/reader/schema from pg BEGIN; REVOKE USAGE ON SCHEMA message_store FROM message_store_reader; COMMIT;
<filename>tests/data.sql<gh_stars>0 INSERT INTO user (email, password, api_key, curr_num) VALUES ('<EMAIL>', 'pbkdf2:sha256:50000$TCI4GzcX$0de171a4f4dac32e3364c7ddc7c14f3e2fa61f2d17574483f7ffbb431b4acb2f', 'key1', 0), ('<EMAIL>', 'pbkdf2:sha256:50000$kJPKsz6N$d2d4784f1b030a9761f5ccaeeaca413f27f2ecb76d6168407af962dd...
-- -- PostgreSQL database dump -- -- Dumped from database version 12.4 -- Dumped by pg_dump version 13.3 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_catalog.set_config('search_path', '', fal...
-- QUERY USED TO INSERT A USER INSERT INTO USERS VALUES ('<EMAIL>', '********', '12-mar-2013', 'xxx-xxx-xxxx', IMAGE, 'This is a Description', 100, ...
<reponame>LBHackney-IT/residents-social-care-platform-api<filename>database/views/vw_personal_relationships.sql<gh_stars>1-10 CREATE VIEW dbo.vw_personal_relationships AS SELECT dpr.personal_relationship_id, dpr.person_id, dpr.other_person_id, dprt.description, CASE WHEN dprt.family_category = 'Child''s C...
CREATE TABLE Directors( Id INT PRIMARY KEY, DirectorName VARCHAR(60) NOT NULL, Notes VARCHAR(MAX) ) INSERT INTO Directors([Id], [DirectorName], [Notes]) VALUES (1, '<NAME>', NULL), (2, '<NAME>', 'French'), (3, '<NAME>', 'Russian'), (4, '<NAME>', 'American'), (5, '<NAME>', NULL) CREATE TABLE Genres( Id INT PRIMARY KE...
SET ECHO ON SET LINESIZE 200 SET WRAP OFF CREATE TABLE SKILL( sname VARCHAR(30) NOT NULL, /* Skill name */ sclass VARCHAR(20) NOT NULL, /* Skill class */ CONSTRAINT SKILL_pkey PRIMARY KEY ( sname ) ); INSERT INTO SKILL VALUES ( 'CORBA programming', 'programming' ); INSERT INT...
USE [ANTERO] GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dw].[f_haku_ja_valinta_korkea_aste_valintatapajonot]') AND type in (N'U')) BEGIN CREATE TABLE [dw].[f_haku_ja_valinta_korkea_aste_valintatapajonot]( [id] [int] IDENTITY(1,1) NOT NULL, [henkilo_oid] [varchar](255) NULL, [haku_o...
Rem Copyright (c) 2018 by <NAME> Rem SimpleCRUD (CodeIgniter + Oracle Database) Rem Created : 21/Juni/2018 SET TERMOUT OFF SET ECHO OFF -- -- Membuat User Oracle Database -- GRANT CONNECT,RESOURCE,UNLIMITED TABLESPACE TO FORUM IDENTIFIED BY FNDIAMD; ALTER USER FORUM DEFAULT TABLESPACE USERS; ALTER USER ...
<reponame>DjordjeVucinac82/crunchbutton ALTER TABLE `admin` ADD UNIQUE INDEX (`invite_code`);
insert into uCommerce_AdminPage ( FullName, ActiveTab ) values ( 'ASP.umbraco_ucommerce_settings_security_edituseraccess_aspx', '' ) insert into uCommerce_AdminTab ( VirtualPath, AdminPageId, SortOrder, MultiLingual, ResouceKey, HasSaveButton, HasDeleteButton, [Enabled] ) values ( 'EditUserRoles.ascx',...
<reponame>sears-s/fluffi<filename>srv/fluffi/data/fluffiweb/app/sql_files/createLMDB.sql<gh_stars>10-100 /* Copyright 2017-2020 Siemens AG Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without r...
CREATE PROCEDURE [dbo].[spInvoice_Create] @EmployerId uniqueidentifier, @CreationDate datetime2, @TotalTime BIGINT, @StartDate datetime2, @EndDate datetime2 AS BEGIN INSERT INTO Invoice ([EmployerId], [CreationDate], [TotalTime], [StartDate], [EndDate]) VALUES (@EmployerId, @CreationDate, @TotalTime, @Start...
<filename>Course II/Python_SQL/pract/pract4/6.sql /* Упражение 6 стр 42 */ SELECT UPPER(NAME || " " || SURNAME) || " родился в " || strftime('%Y',birthday) || " году." AS result FROM student WHERE kurs IN (1,2,4)
<filename>backend/de.metas.materialtracking/src/main/sql/postgresql/system/50-de.metas.materialtracking/5563520_sys_gh7009_PP_Order_MarkColumnsAsIsCalculated_3.sql -- 2020-07-15T11:14:52.806Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsCalculated='N',Updated=TO_TIMESTAMP('20...
<reponame>smith750/kc<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/RELEASE-SCRIPTS/KC-RELEASE-3_0-CLEAN/oracle/krrelease/datasql/KR_01_KRIM_ATTR_DEFN_T.sql INSERT INTO KRIM_ATTR_DEFN_T (KIM_ATTR_DEFN_ID,NMSPC_CD,NM,LBL,CMPNT_NM,ACTV_IND,OBJ_ID,VER_NBR) VALUES (KRIM_ATTR_DEFN_ID_BS_S....
<gh_stars>1-10 WITH double_entry_book AS ( -- debits SELECT array_to_string(inputs.addresses, ",") as address , inputs.type , -inputs.value as value FROM `bigquery-public-data.crypto_bitcoin.inputs` as inputs UNION ALL -- credits SELECT array_to_string(outputs.a...
CREATE TABLE [SalesLT].[Address] ( [AddressID] INT IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL, [AddressLine1] NVARCHAR (60) NOT NULL, [AddressLine2] NVARCHAR (60) NULL, [City] NVARCHAR (30) NOT NULL, [StateProvince] [dbo].[Name] NOT NULL, [CountryRegio...
-- formerly trigger function stratcon.loading_dock_metric_text_s_change_log CREATE OR REPLACE FUNCTION noit.metric_text_archive_log_changes() RETURNS trigger AS $BODY$ DECLARE v_oldvalue text; v_sid integer; v_name text; v_value text; v_whence timestamptz; v_old_whence timestamptz; v_old_...
CREATE UNIQUE INDEX EDX_ACTIVATION_CODE_MINCODE_IS_PRIMARY_TRUE_UK ON EDX_ACTIVATION_CODE (MINCODE) WHERE IS_PRIMARY=true;
USE [RailML_3_1] GO INSERT [dbo].[TStrictDirection] ([TStrictDirectionId], [Value]) VALUES (1, N'Up') GO INSERT [dbo].[TStrictDirection] ([TStrictDirectionId], [Value]) VALUES (2, N'Down') GO
<filename>src/plib/resources/schemas/1.0.0.sql CREATE TABLE `files` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `path` TINYTEXT NOT NULL, `size` INTEGER NOT NULL ); CREATE INDEX `idx_size` ON `files` (`size`);
<filename>_SQL/laundry.sql -- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 13, 2021 at 07:09 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.3.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
<filename>db/ecommerce.sql<gh_stars>0 /* SQLyog Enterprise - MySQL GUI v7.02 MySQL - 5.5.5-10.1.9-MariaDB : Database - ecommerce ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_...
<gh_stars>0 ### Schema CREATE DATABASE info_db; USE info_db; create table question ( id int NOT NULL AUTO_INCREMENT, question varchar(255) NOT NULL, answer varchar(255) NOT NULL, PRIMARY KEY (id) ) CREATE DATABASE rutgers; USE rutgers; CREATE TABLE users ( id int NOT NULL AUTO_INCREMENT, username varchar(...
-- -- PostgreSQL database dump -- -- Dumped from database version 12.4 -- Dumped by pg_dump version 12.4 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_catalog.set_config('search_path', '', fal...
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '<PASSWORD>' WITH GRANT OPTION;
<filename>Java DB/Data Definition And Data Types/Exercises/create_hotel_database.sql<gh_stars>0 CREATE TABLE `employees` ( id INT PRIMARY KEY AUTO_INCREMENT, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, title VARCHAR(255), notes TEXT ); CREATE TABLE `customers` ( account_numbe...
create or replace package body param_admin as c_pkg constant &ORA_NAME_TYPE. := $$PLSQL_UNIT; c_true constant &FLAG_TYPE. := &C_TRUE.; c_false constant &FLAG_TYPE. := &C_FALSE.; function convert_boolean( p_value in boolean) return varchar2 as l_boolean parameter_tab.par_boolean_valu...
SELECT AVG(speed) FROM pc; SELECT p.maker, AVG(l.screen) FROM laptop l, product p WHERE p.model = l.model GROUP BY p.maker; SELECT AVG(speed) FROM laptop WHERE price > 1000; SELECT p.maker, AVG(pc.price) FROM product p, pc WHERE p.model = pc.model AND p.maker = 'A'; SELECT speed, AVG(price) FROM pc GROUP BY...
CREATE PROCEDURE [Demo].[spPersonGet] @PersonId AS UNIQUEIDENTIFIER AS BEGIN /* * This is automatically generated; any changes will be lost. */ SET NOCOUNT ON; -- Execute the primary select query. SELECT [p].[PersonId], [p].[FirstName], [p].[LastName], [p].[Birthday], [p...
<reponame>lk-gov-health-hiu/hmis<gh_stars>1-10 select id,`TOTAL`, `PAYMENTMETHOD`, `BILLTYPE`, `BILLDATE`, `BILLTIME`, `BACKWARDREFERENCEBILL_ID` , `NETTOTAL`,`VAT`,`VATPLUSNETTOTAL` from bill where id=5090083 order by id desc limit 40;
USE [VipunenTK_SA] GO /****** Object: View [dbo].[v_sa_2_13_Tutkintoon_johtavan_koulutuksen_opiskelijat_kansalaisuuden_mukaan] Script Date: 7.1.2021 19:02:02 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER VIEW [dbo].[v_sa_2_13_Tutkintoon_johtavan_koulutuksen_opiskelijat_kansalaisuuden_mukaan] ...
ALTER TABLE "public"."users" ADD COLUMN "amp_user_id" int4; ALTER TABLE "public"."users" ALTER COLUMN "amp_user_id" DROP NOT NULL;
-- memsubsys1.test -- -- db eval {SELECT count(*) FROM t1} SELECT count(*) FROM t1
<filename>src/test/resources/sql/insert/b2af8f58.sql -- file:timetz.sql ln:19 expect:true INSERT INTO TIMETZ_TBL VALUES ('2003-07-07 15:36:39 America/New_York')
-- file:abstime.sql ln:13 expect:true CREATE TABLE ABSTIME_TBL (f1 abstime)
-- original: insert2.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test CREATE TABLE d1(n int, log int) ;INSERT INTO d1 VALUES(sub_i,sub_j) ;SELECT * FROM d1 ORDER BY n ;CREATE TABLE t1(log int, cnt int); PRAGMA count_changes=on ;EXPLAIN INSERT INTO t1 SELECT log, count(*) FROM d1 GROUP BY log ;IN...
/*======================================================================================================================== Description: Script that automaticly rebuilds or reorganizes the indexes according to user defined thresholds. The fill factor can be reset or kept the same. Old and new frag data is dispalye...
<reponame>h136799711/src_bak_001 INSERT INTO `my_coupon_category` (`cate_id`, `cate_name`, `cate_view`, `cate_order`) VALUES (9, '美食', 1, 1), (10, '休闲', 1, 2), (11, '女性', 1, 3), (12, '出行', 1, 4), (13, '摄影', 1, 5), (14, '其它', 1, 6);
ALTER TABLE /*_*/interwiki DROP KEY /*i*/iw_prefix, ADD PRIMARY KEY (iw_prefix);
-- 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. ALTER TABLE tpdm.AnonymizedStudentAssessmentCourse...
ALTER TABLE SALES_DETAIL ADD CONSTRAINT SYS_C0038684 FOREIGN KEY ( CUSTOMER_ID ) REFERENCES CUSTOMER ( CUSTOMER_ID ) ON UPDATE CASCADE ON DELETE RESTRICT;
<reponame>manu9812/dataBase CREATE SCHEMA IF NOT EXISTS `Movies_perfect` DEFAULT CHARACTER SET utf8 ; USE `Movies_perfect` ; CREATE TABLE `movies_perfect`.`languages` ( language_id int not null, language_name VARCHAR not null, langu...
-- MySQL dump 10.10 -- -- Host: localhost Database: projects -- ------------------------------------------------------ -- Server version 4.1.18-nt /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECT...
<reponame>zhuimengrenweijian/mlsql<filename>streamingpro-mlsql/src/main/resources-online/test/sql/save-filenum.sql select array("a","b","c","d","e") as t as tod_boss_dashboard_sheet_1; select explode(t) as newt from tod_boss_dashboard_sheet_1 as tod_boss_dashboard_sheet_2; save overwrite tod_boss_dashboard_sheet_2 as...
-- -- PostgreSQL database dump -- -- Dumped from database version 9.6.10 -- Dumped by pg_dump version 10.12 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_catalog.set_config('search_path', '', ...
<filename>jbpm-installer/src/main/resources/db/upgrade-scripts/oracle/jbpm-6.0-to-6.1.sql -- update context mapping info table with owner id (deployment id) for per process instance strategies alter table ContextMappingInfo add OWNER_ID varchar2(255 char); update ContextMappingInfo set OWNER_ID = (select externalId fro...