sql
stringlengths
6
1.05M
<gh_stars>10-100 ALTER TABLE permit ADD COLUMN permit_no_sequence integer; CREATE SEQUENCE permit_number_seq; ALTER SEQUENCE permit_number_seq RESTART WITH 100000000;
<gh_stars>100-1000 CREATE TABLE work.hotel_category_mst AS( SELECT -- カテゴリのインデックス番号作成 ROW_NUMBER() OVER() - 1 AS hotel_category_no, hotel_id FROM work.reserve_tb rsv -- レコメンデーション対象のデータに出てくるホテルのみに絞り込み WHERE rsv.checkin_date >= '2016-01-01' AND rsv.checkin_date < '2017-01-01' GROUP BY hotel_id )
/* // //DATABASE CREATION // */ --create database PFA CREATE DATABASE PFA ENCODING='WIN1252' template=template0 CONNECTION LIMIT -1; /* // //TABLES CREATION // */ --create table usuario CREATE TABLE IF NOT EXISTS usuario( id_usuario SERIAL CONSTRAINT nn_id_usuario NOT NULL, nome_usuario VARCHAR(70) CONSTRAINT nn_no...
<filename>core/target/classes/scripts/sql/insert_colors.sql insert into "public".colors (color) values ('Red'); insert into "public".colors (color) values ('Green'); insert into "public".colors (color) values ('Orange'); insert into "public".colors (color) values ('Blue'); insert into "public".colors (color) values ('K...
<filename>adapters/src/main/resources/db/migration/mysql/V201910202200__create_following_table.sql CREATE TABLE t_following ( followed VARCHAR(20) NOT NULL, followed_by VARCHAR(20) NOT NULL, CONSTRAINT t_following_pk PRIMARY KEY (followed, followed_by) );
-- script that converts hbtn_0c_0 database to UTF8 ( ALTER DATABASE hbtn_0c_0 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; USE hbtn_0c_0; ALTER TABLE first_table CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE first_table MODIFY name VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unico...
create table nohros_state ( state_name varchar(8000) not null, [state] varchar(8000) not null ) create unique nonclustered index IX_nohros_state on nohros_state ( state_name ) include ( [state] )
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 10, 2019 at 06:57 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
-- MySQL Script generated by MySQL Workbench -- 11/11/15 15:09:16 -- 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='TRADITION...
 CREATE View [ssas].[Measures_translation_displayfolder_union] As --real measures Select T1.Measure_guid , T1.cultures_name , T1.RepoObject_name , T1.RepoSchema_name , T1.measures_name , T1.Measure_translation , T1.Measure_DisplayName , T1.measures_displayFolder , T1.displayfolder_translation , T...
CREATE DATABASE IF NOT EXISTS FINAL_FINAL; USE FINAL_FINAL; CREATE TABLE dataset ( id VARCHAR(10), dataset_name VARCHAR(100), data_source LONGTEXT, dataset_type VARCHAR(100), industry_sector VARCHAR(100), class_or_regression VARCHAR(100), tot_col INT, tot_row INT, PRIMARY KEY(id) ); -- ---...
DROP TABLE SCM.SCM_CSTMR_SUPLR_SITES CASCADE CONSTRAINTS PURGE; CREATE TABLE SCM.SCM_CSTMR_SUPLR_SITES ( CUST_SUPPLIER_ID NUMBER, CONTACT_PERSON_NAME VARCHAR2 (200 BYTE), CONTACT_NOS VARCHAR2 (200 BYTE), EMAIL VARCHAR2 (100 BYTE), CREATED_BY NUMBER, CREA...
<reponame>dmerrick/danalol-stream<gh_stars>1-10 DROP TABLE IF EXISTS scoreboards;
DELETE FROM exports WHERE commodity IN('All', 'Extractives'); INSERT INTO exports (state, commodity, year, value) SELECT state, 'Extractives' AS commodity, year, SUM(value) AS value FROM exports WHERE commodity != 'Total' GROUP BY state, commodity, year; SELECT COUNT(*) FROM exports WH...
<reponame>difu/oci-geoserver DROP USER geoserver CASCADE; CREATE USER geoserver IDENTIFIED BY "<PASSWORD>"; GRANT connect, CREATE TABLE TO geoserver; ALTER USER geoserver QUOTA 5G ON data;
<reponame>0xflotus/graphql-compiler<filename>graphql_compiler/tests/test_data_tools/integration_data/create_orientdb_integration.sql # Copyright 2018-present Kensho Technologies, LLC. create vertex Animal set name = 'Animal 1', net_worth = Decimal('100'), uuid = 'cfc6e625-8594-0927-468f-f53d864a7a51' create vertex Anim...
-- ---------------------------- -- Table structure for my_admin_department -- ---------------------------- DROP TABLE IF EXISTS `my_admin_department`; CREATE TABLE `my_admin_department` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL, `desc` varchar(200) NOT NULL, `status` int(11) NO...
begin; delete from transaction_history; insert into transaction_history (id, sum, other_party, created_at, last_modified_at, transaction_type, description) values ('76727d3e-48f6-4204-b2c9-37d8180c74e3', 4097, '<NAME>', '2019-08-31T21:18:37Z', '2020-12-21T00:55:54Z', 'SHIPPING', 'Morbi porttitor lorem id ligu...
<reponame>DaniloMuniz/Jersey2grizzlycdi2jwt --CREATE DATABASE appws; CREATE TABLE `appws`.`N01_Autor` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NULL, PRIMARY KEY (`id`)); CREATE TABLE `appws`.`N02_Category` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NULL, PRIMARY KEY (`id`)); CR...
/****** Object: StoredProcedure [dbo].[PreviewRequestStepTask] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[PreviewRequestStepTask] /**************************************************** ** ** Desc: Previews the next step task that would be returned for a given processor ...
ALTER TABLE agent ALTER COLUMN raw_jwt DROP NOT NULL; ALTER TABLE agent ALTER COLUMN label DROP NOT NULL; ALTER TABLE connection ALTER COLUMN approved DROP NOT NULL; ALTER TABLE connection ALTER COLUMN approved SET DEFAULT NULL; ALTER TABLE connection ALTER COLUMN archived DROP NOT NULL; ALTER TABLE connection ALTER...
----------------------------------- Mapping number 1 ---------------------------------------------- 12 initial source relations =all_schools..bikeability..defibrillators..eal_jan16..eal_january2017..eal_may16..eal_may2017..eal_oct15..eal_oct2016..eal_oct2017..free_meals_schools..road_safety_training target table = tar...
<gh_stars>1-10 CREATE TABLE spdx_file_info ( file_info_pk bigserial, -- Primary Key filename text, filetype text, checksum text, license_concluded text NOT NULL, license_info_in_file text, license_comment text, file_copyright_text text, artifact_of_project text, artifact_of_homepage...
IF OBJECT_ID('tSQLt.Private_Configurations') IS NOT NULL DROP TABLE tSQLt.Private_Configurations; ---Build+ CREATE TABLE tSQLt.Private_Configurations ( Name NVARCHAR(100) PRIMARY KEY CLUSTERED, Value SQL_VARIANT ); ---Build-
-- @description function_in_subqry_withfunc2_100.sql -- @db_name functionproperty -- @author tungs1 -- @modified 2013-04-03 12:00:00 -- @created 2013-04-03 12:00:00 -- @tags functionProperties SELECT * FROM foo, (SELECT func1_read_int_sql_stb(func2_nosql_vol(5))) r order by 1,2,3;
<reponame>rodel-talampas/gpdb Create Language plpythonu; DROP FUNCTION subt_queryexec(text); CREATE OR REPLACE FUNCTION subt_queryexec( query text ) returns boolean AS $$ try: plan = plpy.prepare( query ) rv = plpy.execute( plan ) except: plpy.not...
<filename>admin/sql/updates/20170507-mbs-8951.sql \set ON_ERROR_STOP 1 BEGIN; -- Copy of 20160604-mbs-8951.sql for upgrade.sh (minus CONCURRENTLY, since it -- runs inside a transaction). DROP INDEX IF EXISTS edit_note_idx_post_time_edit; CREATE INDEX edit_note_idx_post_time_edit ON edit_note (post_time DESC NULLS LAS...
<reponame>paksuz/examendw -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 19-01-2017 a las 15:05:59 -- Versión del servidor: 10.1.10-MariaDB -- Versión de PHP: 5.5.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET...
CREATE FUNCTION [report].[CourseAttendeeXML] ( @SkolenieID INT ) RETURNS NVARCHAR(MAX) AS BEGIN DECLARE @result NVARCHAR(MAX) SET @result = CAST( (SELECT ' Priezvisko a meno' AS th, '' ,' Titul' AS th, '' ,' Pracovné zaradenie' AS th, '' ,' Organizácia' AS th, '' ,' Školenie ID' AS th, '' ,' Referencia' AS th,...
<filename>database/sistem_pakar111.sql /* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50505 Source Host : localhost:3306 Source Database : sistem_pakar111 Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2018-09-26 1...
<reponame>rehansyed89/laravel-advance-blog<gh_stars>0 -- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64) -- -- Host: localhost Database: advancedblog -- ------------------------------------------------------ -- Server version 5.7.21-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT...
Create table TESTVIDEO( v_id int NOT NULL, file_type varchar(4), length_sec int, name varchar(40), u_id int NOT NULL, views int, vid_filepath varchar(50), tn_id int, description varchar(300), Primary Key (v_id) );
<gh_stars>0 drop table if exists Pokemon cascade; drop table if exists Trainer cascade; drop table if exists Owns cascade; create table Pokemon ( name text primary key, type text not null ); insert into public.Pokemon(name,type) values ('Pikachu', 'Electric'), ('Charmander', 'Fire') ; /* insert into Pokemon...
<reponame>creative2020/f4u DROP TABLE IF EXISTS #__rokcommon_configs;
create sequence __table_name___id_seq start with 1; CREATE TABLE __table_name__ ( __table_name___id INTEGER PRIMARY KEY NOT NULL DEFAULT nextval('__table_name___id_seq'::regclass), sortable_id integer null, uuid UUID NOT NULL DEFAULT uuid_in((md5(((random())::text || (now())::text)))::cstring), website_page_id...
<reponame>alexandrateneva/DB-Fundamentals-SoftUni USE Orders -- Problem 16 SELECT ProductName, OrderDate, DATEADD(DAY, 3, OrderDate) AS [Pay Due], DATEADD(MONTH, 1, OrderDate) AS [Deliver Due] FROM Orders -- Problem 17 CREATE TABLE People ( Id int PRIMARY KEY IDENTITY, Name nvarchar(50) NOT NULL, Birthdate da...
INSERT INTO eg_roleaction (roleid, actionid) select (select id from eg_role where name='Financial Administrator'), id from eg_action where name in('Create Fundsource','Create-Fundsource','Update-Fundsource','View-Fundsource','Edit-Fundsource','Result-Fundsource', 'View Fundsource','Edit Fundsource','Search and Vi...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.9.5deb2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Mar 29, 2021 at 03:34 PM -- Server version: 8.0.23-0ubuntu0.20.04.1 -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = ...
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Hôte : mysql:3306 -- Généré le : mar. 27 fév. 2018 à 15:12 -- Version du serveur : 5.7.21 -- Version de PHP : 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
-- Function: get_url(text, numeric, numeric, integer) -- DROP FUNCTION @extschema@.get_url(text, numeric, numeric, integer); CREATE OR REPLACE FUNCTION @extschema@.get_url( url text, wait numeric, timeout numeric, tries integer DEFAULT 3) RETURNS text AS $BODY$ #!/bin/sh sleep $2 & wget -T $3 -t $4 ...
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 12, 2019 at 05:37 AM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<reponame>takax1977/local_wikipedia<gh_stars>1-10 ALTER TABLE `page` ADD UNIQUE `name_title` (`page_namespace`,`page_title`); CREATE INDEX `page_random` ON `page` (`page_random`); CREATE INDEX `page_len` ON `page` (`page_len`); CREATE INDEX `page_redirect_namespace_len` ON `page` (`page_is_redirect`,`page_namespace`,`p...
/* schema: id: uuid -> id of the log entry link_id: uuid -> id of the link this action was done user_id: string -> username of the user that made the change action: string -> modified, deleted, created old_destination_value: string new_destination_value: string old_regex_value: string new_regex_value:...
<reponame>awkz/ekinerja -- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jul 07, 2019 at 03:10 PM -- Server version: 5.7.17-log -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
-- file:rowsecurity.sql ln:681 expect:true CREATE VIEW bv1 WITH (security_barrier) AS SELECT * FROM b1 WHERE a > 0 WITH CHECK OPTION
-- -- A statement has been identified as a SQL or Script statement. -- Resolve which, and consume (possibly execute) it. -- delimiter // drop procedure if exists _resolve_and_consume_sql_or_script_statement // create procedure _resolve_and_consume_sql_or_script_statement( in id_from int unsigned, in i...
use BookManage; drop table book; drop table room; drop table publisher; source tables/1.publisher.sql source tables/2.room.sql source tables/3.book.sql
insert into publication_type (identifier, "table") values ('platform','platform'); insert into publication_type (identifier, "table") values ('instrument','instrument');
<gh_stars>10-100 SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE sp_AddBucketFollowup @i_BucketStr varchar(100), @i_Followup varchar(50) AS BEGIN DECLARE @iBucket int DECLARE @iFollowup int IF NOT EXISTS (SELECT * FROM FollowupIds WHERE Followup = @i...
<filename>server/src/main/resources/org/cloudfoundry/identity/uaa/db/mysql/V4_8_0__UniqueMfaName.sql ALTER TABLE mfa_providers ADD UNIQUE KEY `idx_mfa_unique_name` (`identity_zone_id`,`name`);
CREATE OR REPLACE FUNCTION "CONCATGEOLOGYATTRIBUTEDETAIL" (locid in number ) return varchar2 as type rc is ref cursor; l_str varchar2(4000); l_sep varchar2(30); l_val varchar2(4000); /* returns a pipe-delimited list of geology attribute determinations */ begin ...
<gh_stars>1-10 -- Copyright [1999-2016] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://ww...
<gh_stars>1-10 select title, akas, project from gcp.gcp_project_organization_policy where id = '{{ output.resource_id.value }}';
<reponame>xiaohuazi123/mssql-script USE [MonitorElapsedHighSQL] GO /****** Object: StoredProcedure [dbo].[usp_checkElapsedHighSQL] Script Date: 2015/6/23 17:16:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO --创建存储过程 CREATE PROCEDURE [dbo].[usp_checkElapsedHighSQL] ( @SessionID INT ) AS BEGIN ...
ALTER TABLE "public"."EventVonageSession" ADD COLUMN "layoutData" jsonb NULL;
<gh_stars>0 -- @testpoint:opengauss关键字modifies(非保留),作为视图名 --关键字explain作为视图名,不带引号,创建成功 CREATE or replace VIEW modifies AS SELECT * FROM pg_tablespace WHERE spcname = 'pg_default'; drop view modifies; --关键字explain作为视图名,加双引号,创建成功 CREATE or replace VIEW "modifies" AS SELECT * FROM pg_tablespace WHERE spcname = 'pg_def...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 2.11.11.3 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.3 -- Erstellungszeit: 03. August 2018 um 13:05 -- Server Version: 5.6.19 -- PHP-Version: 4.4.9 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET ...
SELECT * from emp; SELECT empno, ename, sal from emp; SELECT empno, ename, sal FROM emp where sal>3000; SELECT empno, ename, sal FROM emp where sal<=3000; SELECT empno, ename, SAL FROM emp where sal<>3000; SELECT * FROM emp WHERE DEPTNO=10; SELECT empno, ename, sal from emp where sal <= 1500; SELECT empno, ename, s...
/* Navicat MySQL Data Transfer Source Server : mysql Source Server Version : 50553 Source Host : localhost:3306 Source Database : data2007 Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2020-10-09 16:57:00 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
<filename>Homework_5/PostgreSQL/create_sp_select_note.sql<gh_stars>0 CREATE OR REPLACE function select_note( note_id uuid) RETURNS TABLE ( _id uuid, _header varchar, _body varchar, _is_deleted boolean, _user_id int, _modified_at timestamp with time zone, _first_name varchar, _last_name v...
<filename>geopagos.sql -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 19-01-2018 a las 19:40:13 -- Versión del servidor: 10.1.13-MariaDB -- Versión de PHP: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @O...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 25, 2017 at 05:47 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.5.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
------------------------------------------------------------------------------- -- -- Script: accept.sql -- Purpose: to prompt for a script parameter, but allow a default value -- -- Copyright: (c) Ixora Pty Ltd -- Author: <NAME> -- -- Synopsis: @accept name prompt default -- -------------------------------------------...
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 10, 2018 at 04:08 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 5.6.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 04, 2017 at 05:38 PM -- Server version: 5.7.14 -- PHP Version: 7.0.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
CREATE OR REPLACE FUNCTION ti.getvalidtaxabytaxagroupidlist(_taxagrouplist character varying) RETURNS TABLE(taxonid integer, taxoncode character varying, taxonname character varying, author character varying, valid boolean, highertaxonid intege...
-- CreateTable CREATE TABLE "Tenant" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "name" TEXT NOT NULL, "service" TEXT NOT NULL, "database" TEXT NOT NULL, "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" DATETIME NOT NULL ); -- CreateIndex CREATE INDEX "Tenant.name_ser...
<reponame>just-a-rookie-2001/ecommerce-platform drop procedure if exists alter_payment; delimiter // CREATE PROCEDURE alter_payment(in bid int, in cname varchar(45), in cnum bigint, in cexpdt date) begin declare nme varchar(50); declare numb, finished bigint; declare expdate date; DECLARE py CURSOR FOR select...
<filename>src/test/resources/vtabC.test_5.sql<gh_stars>100-1000 -- vtabC.test -- -- execsql { -- INSERT INTO m VALUES(1000); -- SELECT * FROM m; -- } INSERT INTO m VALUES(1000); SELECT * FROM m;
<gh_stars>10-100 -- file:triggers.sql ln:212 expect:true select * from tttest
<gh_stars>1000+ ALTER TABLE THUMBNAIL_SERIES RENAME TO TMP_THUMBNAIL_SERIES; CREATE TABLE THUMBNAIL_SERIES ( ID varchar NOT NULL PRIMARY KEY, URL varchar NULL DEFAULT NULL, SELECTED boolean NOT NULL DEFAULT 0, THUMBNAIL blob NULL DEFAULT NULL, ...
<reponame>ewj160/data-analysis /* # Synonyms */ select s.SYNONYM_NAME as "Name" , s.TABLE_OWNER as "Target Schema" , s.TABLE_NAME as "Target Name" , s.DB_LINK as "Target Link" , o.CREATED as "Created On" , o.STATUS as "Status" , o.LAST_DDL_TIME as "Modified On" , case when o.TEMPORARY = 'Y' then 'Yes' else 'No' end as...
<reponame>harryboulderdash/PlayGFC SELECT DISTINCT field_tournament_match_node.nid AS field_tournament_match_node_nid, node_field_data_field_match_team_1.nid AS node_field_data_field_match_team_1_nid, node_field_data_field_match_team_2.nid AS node_field_data_field_match_team_2_nid, node.nid AS nid, field_team_reference...
<filename>content-resources/src/main/resources/sql/upgrade/1.22/01-alter_my_places_update_drop_not_null.sql<gh_stars>0 ALTER TABLE my_places ALTER COLUMN updated DROP NOT NULL;
/* Navicat MySQL Data Transfer Source Server : 本地 Source Server Version : 50505 Source Host : localhost:3306 Source Database : smart_home Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2016-08-30 01:47:05 */ SET FOREIGN_KEY_CHECKS=0; -- -----...
create procedure [Northwind].[Ten Most Expensive Products] AS SET ROWCOUNT 10 SELECT Products.ProductName AS TenMostExpensiveProducts, Products.UnitPrice FROM [Northwind].Products ORDER BY Products.UnitPrice DESC
<gh_stars>0 --=====================================================-- --Problem 1. Employees with Salary Above 35000-- --=====================================================-- USE SoftUni GO CREATE PROC usp_GetEmployeesSalaryAbove35000 AS BEGIN SELECT E.FirstName, E.LastName FROM Employees AS e WHERE e.Salary >...
<reponame>PedroHPAlmeida/problemas-uri-SQL<gh_stars>0 select docs.name, round(sum((att.hours * 150) * (1 + ws.bonus / 100)), 1) as salary from attendances as att inner join doctors as docs on att.id_doctor = docs.id inner join work_shifts as ws on att.id_work_shift = ws.id group by docs.name order by salary desc;
SET VERIFY OFF spool /tmp/orbooks/scripts/postDBCreation.log append host /opt/oracle/product/19c/dbhome_1/OPatch/datapatch -skip_upgrade_check -db orbooks; connect "SYS"/"&&sysPassword" as SYSDBA set echo on create spfile='/opt/oracle/product/19c/dbhome_1/dbs/spfileorbooks.ora' FROM pfile='/tmp/orbooks/scripts/init.ora...
<gh_stars>1-10 INSERT INTO cart (id, product_name, product_image, product_price, product_quantity, user_email, session_id, product_id, cate_id, created_at, updated_at) VALUES (82, 'Black Ruched Bodycon Hybrid Dress', 'black-ruched-bodycon-hybrid-dress.jpg', 430, 1, '', 'yPlhMtPzqBihLIgspqw9LRSihN4JWUYOj45C1XIl', 3, 2...
DROP TABLE IF EXISTS "MovieCast" DROP TABLE IF EXISTS "MovieDetails" DROP TABLE IF EXISTS "Movie" @_create.quoted.sql
<gh_stars>10-100 CREATE TABLE [srv].[ErrorInfoArchive] ( [ErrorInfo_GUID] UNIQUEIDENTIFIER CONSTRAINT [DF_ErrorInfoArchive_ErrorInfo_GUID] DEFAULT (newsequentialid()) ROWGUIDCOL NOT NULL, [ERROR_TITLE] NVARCHAR (MAX) NULL, [ERROR_PRED_MESSAGE] NVARCHAR (MAX) NULL, [ERROR_NUMBER] NV...
<gh_stars>10-100 insert into f.person (id, name) values (1, 'Alice'), (2, 'Bob'), (3, 'Eve'); insert into f.junction (follower_id, following_id) values (2, 1), (3, 1), (3, 2);
alter table lc_entry_value add column label_task_id varchar(255); UPDATE lc_entry_value as lv, (SELECT lt.id as `task_id`, lev.id as `value_id` FROM label_task as lt JOIN label_iteration li on lt.label_iteration_id = li.id JOIN lc_entry_value lev on li.id = lev.label_iteration_id ...
create table CONTENTREVIEW_ITEM ( id number(19,0) not null, contentId varchar2(255) not null, userId varchar2(255), siteId varchar2(255), taskId varchar2(255), externalId varchar2(255), dateQueued date, dateSubmitted date, dateReportReceived d...
-- -- PostgreSQL database dump -- -- Dumped from database version 9.6.3 -- Dumped by pg_dump version 9.6.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; SET check_function_bodies = false; SET client_min...
<reponame>evisional1/mixerp<filename>src/Frapid.Web/Areas/MixERP.Finance/db/PostgreSQL/2.x/2.0/src/02.functions-and-logic/finance.is_new_day_started.sql DROP FUNCTION IF EXISTS finance.is_new_day_started(_office_id integer); CREATE or replace FUNCTION finance.is_new_day_started(_office_id integer) RETURNS boolean AS ...
<reponame>TheCodeYu/work<filename>doc/pape.sql -- 纪念日 -- 100见小事 -- 日记 -- 相册 -- 打卡 -- 闹钟 -- 助手 -- 每日一句 -- 心情 -- 商城 -- 货物,酒店等 -- 账单 -- 收获地址 -- 所有信息都要有创建者,修改者,信息属于谁 -- ---------------------------- -- 1、用户信息表 -- 用户账号用来匹配,每个用户的唯一ID -- ---------------------------- drop table if exists sys_user; create table sys_user ( ...
<filename>sql/voxce_sql.sql<gh_stars>10-100 -- add version number to a document ALTER TABLE study_documents ADD VER integer; -- Create inventory table create table inventory (inventory_id integer, subscriber_id integer, name text, part_no text, objectType text, mass integer, BatchNumber text, mass_unit text, ...
-- SENTRY-74 ALTER TABLE `SENTRY_DB_PRIVILEGE` ADD `COLUMN_NAME` VARCHAR(128) DEFAULT '__NULL__'; ALTER TABLE `SENTRY_DB_PRIVILEGE` DROP INDEX `SENTRY_DB_PRIV_PRIV_NAME_UNIQ`; ALTER TABLE `SENTRY_DB_PRIVILEGE` ADD UNIQUE `SENTRY_DB_PRIV_PRIV_NAME_UNIQ` (`SERVER_NAME`,`DB_NAME`,`TABLE_NAME`,`COLUMN_NAME`,`URI`(250),`ACT...
<filename>kata-files/lesson2/postgresql/expected/MYLARGESCHEMA/table/table252.sql //// CHANGE name=change0 CREATE TABLE table252 ( id integer NOT NULL, field1 character varying(30), usertype0field usertype0, usertype2field usertype2, usertype6field usertype6 ); GO //// CHANGE name=change1 ALTER ...
CREATE PROCEDURE [bll].[ResourceDefinitions_Validate__Delete] @Ids [dbo].[IndexedIdList] READONLY, @Top INT = 200, @IsError BIT OUTPUT AS BEGIN SET NOCOUNT ON; DECLARE @ValidationErrors [dbo].[ValidationErrorList]; -- Check that ResourceDefinitionId is not used INSERT INTO @ValidationErrors([Key], [ErrorName],...
<filename>src/olympia/migrations/922-drop-auto-validation-stuff.sql ALTER TABLE `file_validation` DROP COLUMN `signing_trivials`, DROP COLUMN `signing_lows`, DROP COLUMN `signing_mediums`, DROP COLUMN `signing_highs`, DROP COLUMN `passed_auto_validation`; DROP TABLE `validation_annotations`;
<reponame>opengauss-mirror/Yat -- @testpoint: opengauss关键字function(非保留),作为同义词对象名,部分测试点合理报错 --前置条件 drop table if exists explain_test; create table explain_test(id int,name varchar(10)); --关键字不带引号-成功 drop synonym if exists function; create synonym function for explain_test; insert into function values (1,'ada'),(2, 'b...
<filename>app/data/events/getEvents.sql SELECT [ID] ,[USERID] ,[TITLE] ,[DESCRIPTION] ,[STARTDATE] ,[STARTTIME] ,[ENDDATE] ,[ENDTIME] FROM [dbo].[events] WHERE [USERID] = @userId ORDER BY [STARTDATE], [STARTTIME]
-- antiwraparound vacuum determining may work incorrect (FunBox case) WITH table_opts AS ( SELECT c.oid, c.relname, c.relfrozenxid, c.relminmxid, n.nspname, array_to_string(c.reloptions, '') AS relopts FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid ), vacuum_settings AS ( S...
SELECT i.Id, Username + ' : ' + Title AS IssueAssignee FROM Issues AS i JOIN Users AS u ON u.Id = i.AssigneeId ORDER BY i.Id DESC, IssueAssignee ASC
ALTER TABLE [dbo].[FIELD_MAP_COLLECTION] ADD CONSTRAINT [UK_FieldMapCollection] UNIQUE (WITypeMapId, ValueMappingId, Direction)
CREATE TABLE subdivision_TZ (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "subdivision_TZ" ("id", "name", "level") VALUES ('TZ-01', 'Arusha', 'region'); INSERT INTO "subdivision_TZ" ("id", "name", "level") VALUES ('TZ-02', 'Dar es Salaam', 'region'); INSERT INTO ...
<filename>src/Database/dbo/Tables/Messages.sql CREATE TABLE [dbo].[Messages] ( [Id] INT NOT NULL IDENTITY, [MessageThreadId] INT NOT NULL, [SendingUserId] INT NOT NULL, [ToAddress] NVARCHAR(250) NOT NULL, [FromAddress] NVARCHAR(250) NOT N...