sql
stringlengths
6
1.05M
-- -- Name: order_det; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public.order_det ( id integer NOT NULL, oreder_enc_id integer NOT NULL, product_id integer NOT NULL, " quantity" integer NOT NULL, price double precision NOT NULL, amount double precision NOT NULL ); -- -- Nam...
<reponame>marcus210/sanguebom<gh_stars>0 -- MySQL Script generated by MySQL Workbench -- 05/03/15 13:00: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...
<gh_stars>1-10 CREATE TABLE contato( con_codigo INT(11) PRIMARY KEY AUTO_INCREMENT, con_nome VARCHAR(255) NULL, con_fone1 VARCHAR(45) NULL, con_fone2 VARCHAR(45) NULL, con_cel VARCHAR(45) NULL, con_email VARCHAR(255) NULL );
CREATE TABLE IF NOT EXISTS comments ( tid REFERENCES threads(id), id INTEGER PRIMARY KEY, parent INTEGER, created FLOAT NOT NULL, modified FLOAT, mode INTEGER, remote_addr VARCHAR, text VARCHAR, author VARCHAR, email VARCHAR, website VARCHAR, likes INTEGER DEFAULT 0, ...
ALTER TABLE {$NAMESPACE}_calendar.calendar_event ADD spacePHID VARBINARY(64);
INSERT INTO `positions` (`id`, `salary`, `working_hours`) VALUES (0, 1000.00, 40), (0, 2000.00, 30), (0, 3000.00, 30), (0, 4000.00, 34), (0, 5000.00, 44), (0, 6000.00, 50); INSERT INTO `employee` (`id`, `username`, `hash_pass`, `pin`, `address`, `remaining_days_off`, `position_id`) VALUES ...
/*multiStatementOne*/ Select 1 ;
<gh_stars>0 // START-create table CREATE TABLE emp3(emp_id int PRIMARY KEY,emp_name text); /* a a a */
CREATE DATABASE caejd CHARACTER SET utf8;
<reponame>Elrandra420/postgressql<gh_stars>0 SELECT pstate || 'HAS THE CITY' || pcity AS "TOWNS" FROM people ORDER BY pstate ASC, pcity DESC;
SELECT d.TYPESCHEMA AS schema_name , d.TYPENAME AS domain_name , d.* FROM SYSCAT.DATATYPES d WHERE 1=1 /*if isNotEmpty(schemaName) */ AND rtrim(d.TYPESCHEMA) IN /*schemaName*/('%') /*end*/ /*if isNotEmpty(domainName) */ AND rtrim(d.TYPENAME) IN /*domainName*/('%') /*end*/ --A = ユーザー定義配列タイプ --C ...
<gh_stars>1-10 -- To run this script, use the following command at the mysql prompt -- source create-table.sql; -- Drop table first. DROP TABLE IF EXISTS test; -- Create a table in database. CREATE TABLE test ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, email VARCHAR(100) NOT NULL UNIQUE ); -- Use insert to popu...
<filename>aai_database.sql -- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 11, 2019 at 02:19 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 = "+...
<gh_stars>1-10 # 显示价格加上税的10%的新列显示 select *, if(CAR_TAX is null, 0, (CAR_TAX + CAR_PRICE) * 0.1 ) from `20200603_tb_car0`; # 显示如果税不是空的,是本身,如果税是空,那么判断价格800以上%5,500-800 百分之七 其他百分之10% 这个位置的百分比是价格加税 select *, if(CAR_Tax is null, if(CAR_Price > 800, CAR_Pri...
<reponame>notriddle/paste<gh_stars>100-1000 alter table api_keys drop column name;
DROP DATABASE IF EXISTS employee_tracker_db; CREATE DATABASE employee_tracker_db; USE employee_tracker_db; CREATE TABLE department ( id INT AUTO_INCREMENT, name VARCHAR(30) NOT NULL, PRIMARY KEY(id) ); CREATE TABLE role ( id INT auto_increment, title VARCHAR(30) NOT NULL, salary decimal(10,4) NOT NULL, department_...
 CREATE Procedure property.usp_RepoObject_Inheritance ----keep the code between logging parameters and "START" unchanged! ---- parameters, used for logging; you don't need to care about them, but you can use them, wenn calling from SSIS or in your workflow to log the context of the procedure call @executio...
<filename>src/test/resources/sql/select/b83e97a5.sql<gh_stars>10-100 -- file:xml.sql ln:281 expect:true SELECT xml_is_well_formed('abc')
-- 2022-03-11T09:55:05.562Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,545110,0,TO_TIMESTAMP('2022-03-11 10:55:05','YYYY-MM-DD HH24:MI:SS'),100,'D'...
-- Add the COI Approver role and assign various permissions INSERT INTO KRIM_ROLE_T (ROLE_ID, OBJ_ID, VER_NBR, ROLE_NM, NMSPC_CD, DESC_TXT, KIM_TYP_ID, ACTV_IND, LAST_UPDT_DT) VALUES (KRIM_ROLE_ID_BS_S.NEXTVAL, SYS_GUID(), 1, 'COI Approver', 'KC-COIDISCLOSURE', 'Role similar to COI Reviewer with some added limited adm...
/* SPDX-FileCopyrightText: 2020 Friedrich-Alexander University Erlangen-Nürnberg (FAU) * * SPDX-License-Identifier: Apache-2.0 */ \connect product_model; CREATE TABLE public.product ( id SERIAL PRIMARY KEY, name TEXT, version TEXT, vcs TEXT, description TEXT, comment TEXT, homepage_url...
@@create_table tab_new_pk "" "" "" "" "" "" @@alter_table_add_column tab_new_pk id number(15) mandatory "" "" @@alter_table_add_primary_key2 tab_new_pk tab_new_pk id "" @@create_table tab_wrong_pk_name "" "" "" "" "" "" @@alter_table_add_column tab_w...
<filename>cq1.sql Create View view_A as Select Fx.Fid, Fx.Fname, Cx.Cnum from Faculty Fx, Class Cx where Fx.Fid=Cx.Fid ORDER BY fx.fid; select * from view_a; Create View view_B as Select Sx.Sid, Sx.Sname, Ex.Cnum from Student Sx, Enrolled Ex where Ex.sid=Sx.sid ORDER BY sx.sid; select * from view_b;
CREATE TABLE [dbo].[cmsDocumentType] ( [contentTypeNodeId] INT NOT NULL, [templateNodeId] INT NOT NULL, [IsDefault] BIT DEFAULT ('0') NOT NULL, CONSTRAINT [PK_cmsDocumentType] PRIMARY KEY CLUSTERED ([contentTypeNodeId] ASC, [templateNodeId] ASC), CONSTRAINT [FK_cmsDocumentType_umbracoNod...
-- file created at Tue Feb 26 12:51:03 CET 2019 alter table tc_device_attribute drop constraint FKguwgkku5xouwwi5uw8u3fmxbs; alter table tc_device_attribute drop constraint FK2yp7gbcdutco78i4ifwxcgiej; alter table tc_device_command drop constraint FKo9g5r02bd18e308uv23kq0gno; ...
<filename>sql/sqlserver/view/system/create.view.sys.sql -- ============================================= -- 使用刚创建的数据库 -- ============================================= use noveltysearch go -- ============================================= --用途:用户组织机构视图 -- 表名:v_user_org_view -- ====================================...
CREATE FUNCTION org_user_last_submitted() RETURNS TRIGGER AS $org_user_last$ BEGIN UPDATE etl.organization_quota SET submitted_at = now() WHERE organization_id = NEW.organization_id; UPDATE etl.user_submission SET submitted_at = now() WHERE user_id = NEW.user_id; RETURN null; END; $org_user_last$ lang...
SELECT district_name, block_name, supervisor_name, awc_name, cbe_table.cbe_conducted FROM awc_location_local awc_location INNER JOIN (SELECT awc_id, count(*) AS cbe_conducted FROM "ucr_icds-cas_static-cbe_form_f7988a04" WHERE date_cbe_organise>='{from_date}' AND date_c...
DROP DATABASE IF EXISTS meowoof; CREATE DATABASE meowoof; USE meowoof; CREATE TABLE signup ( id INT NOT NULL AUTO_INCREMENT, firstName VARCHAR (15) NULL, lastName VARCHAR (15) NULL, signupEmail VARCHAR (25) NULL, signupPassword VARCHAR (25) NULL, signupBday DATETIME Null, userGender VARCH...
create table if not exists message ( id integer not null constraint message_pk primary key autoincrement, content text not null, from_ varchar(50) not null, "to" varchar(50) not null, type_ varchar(10) not null, timestamp varchar(30) not null, statu...
<reponame>LucianoFromTrelew/datawarehouse-patsur<gh_stars>0 -- Script sacado de: -- http://www.agevaled.com/wp-content/uploads/provincias%20y%20localidades.txt INSERT INTO provincia VALUES (1, 2, 'Buenos Aires'), (2, 2, 'Capital Federal'), (3, 5, 'Catamarca'), (4, 4, 'Chaco'), (5, 1, 'Chubut'), (6, 2, 'Córdoba'), (7, ...
-- phpMyAdmin SQL Dump -- version 4.0.10.20 -- https://www.phpmyadmin.net -- -- Host: localhost -- Czas wygenerowania: 22 Sty 2019, 23:32 -- Wersja serwera: 5.5.62-0+deb8u1 -- Wersja PHP: 5.6.39-0+deb8u1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
/* Navicat Premium Data Transfer Source Server : Localhost-Docker-MySQL Source Server Type : MySQL Source Server Version : 80021 Source Host : localhost:3306 Source Schema : blog_system Target Server Type : MySQL Target Server Version : 80021 File Encoding :...
CREATE TABLE [dbo].[Settings] ( [Id] INT NOT NULL PRIMARY KEY IDENTITY, [EffectiveStartedOn] DATETIME NOT NULL, [EffectiveStartedBy] INT NOT NULL, [EffectiveModifiedOn] DATETIME NOT NULL, [EffectiveModifiedBy] INT NOT NULL, [EffectiveEndedOn] DATETIME NOT NULL, [EffectiveEndedBy] INT NOT NULL, [C...
CREATE TABLE "items" ( "item" TEXT NOT NULL, "status" TEXT NOT NULL, "id" INT AUTO_INCREMENT, PRIMARY KEY("id") );
CREATE TABLE [dbo].[Users] ( [Id] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY DEFAULT (newid()), [Code] VARCHAR(100) NOT NULL UNIQUE, [Name] VARCHAR(100) NOT NULL, [LastName] VARCHAR(100) NOT NULL, [Address] VARCHAR(500) NOT NULL, [Phone] VARCHAR(50) NOT NULL, [Email] VARCHAR(200) NOT NULL, ...
CREATE TABLE list (id VARCHAR(10) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "list" ("id", "value") VALUES (E'ZA', E'Afrika ya Súdi'); INSERT INTO "list" ("id", "value") VALUES (E'AF', E'Afuganisita'); INSERT INTO "list" ("id", "value") VALUES (E'AZ', E'Ajelbayidja'); INSERT INTO "list" ("id",...
<filename>Source/Apps/Microsoft/Released/Microsoft-NewsTemplate/Service/Database/40 programmability.sql SET ANSI_NULLS ON; SET ANSI_PADDING ON; SET ANSI_WARNINGS ON; SET ANSI_NULL_DFLT_ON ON; SET CONCAT_NULL_YIELDS_NULL ON; SET QUOTED_IDENTIFIER ON; go CREATE PROCEDURE bps...
<reponame>andy-9/socialnetwork DROP TABLE IF EXISTS users; DROP TABLE IF EXISTS reset_codes; DROP TABLE IF EXISTS friendships; CREATE TABLE users ( id SERIAL PRIMARY KEY, first VARCHAR(70) NOT NULL, last VARCHAR(70) NOT NULL, email VARCHAR(100) NOT NULL UNIQUE, password VARCHAR(255) NOT NULL, i...
select id, data from other_table
start transaction; alter table file_entry add column owner_id bigint(20) default null, add key `ix_file_entry__owner_id` (owner_id), add constraint `fk_user__file_entry` foreign key (owner_id) references `user` (`id`); commit;
<gh_stars>1-10 CREATE TABLE IF NOT EXISTS `gconfig` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `key` varchar(128) NOT NULL COMMENT '配置键名', `type` varchar(32) NOT NULL COMMENT '值类型', `value` text NOT NULL COMMENT '配置值', `oldvalue` text ...
<filename>airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql create table test_normalization.`nested_stream_with_co__lting_into_long_names__dbt_tmp` a...
<reponame>maiha/facebook.cr CREATE TABLE video_list ( id String, creation_time Nullable(String), description Nullable(String), last_modified Nullable(String), season_number Nullable(Int64), thumbnail Nullable(String), title Nullable(String), videos_count Nullable(Int64) ) ENGINE = Log
<gh_stars>100-1000 -- fkey2.test -- -- execsql { -- CREATE TABLE pp(a, b, c, PRIMARY KEY(b, c)); -- CREATE TABLE cc(d DEFAULT 3, e DEFAULT 1, f DEFAULT 2, -- FOREIGN KEY(f, d) REFERENCES pp -- ON UPDATE SET DEFAULT -- ON DELETE SET NULL -- ); -- INSERT INTO pp VALUES(1, 2, 3);...
<gh_stars>10-100 -- file:hash_index.sql ln:179 expect:true VACUUM hash_split_heap
<filename>src/SqlStreamStore.Postgres/PgSqlScripts/ListStreamsStartingWith.sql CREATE OR REPLACE FUNCTION __schema__.list_streams_starting_with( _pattern VARCHAR(1000), _max_count INT, _after_id_internal INT ) RETURNS TABLE( stream_id VARCHAR(1000), id_internal INT ) AS $F$ BEGIN ...
USE employeeDB; INSERT INTO department (Department_Name) VALUES ("Human Resources"); INSERT INTO department (Department_Name) VALUES ("Marketing"); INSERT INTO department (Department_Name) VALUES ("Information Technology"); INSERT INTO role (Title, Salary, Department_ID) VALUES ("Analyst", 70, 3); INSERT INTO role (T...
<reponame>gpipperr/OraPowerShell --============================================================================== -- GPI - <NAME> -- Desc: get all indexes of a user - parameter - Owner --============================================================================== set verify off set linesize 130 pagesize 4000 ...
<reponame>Gigelf-evo-X/evo-X UPDATE `creature_template` SET `ScriptName` = 'npc_invis_legion_teleporter' WHERE `entry` = 21807;
DELETE FROM arch_contract_data WHERE tenantid = ${tenantid}; DELETE FROM contract_data WHERE tenantid = ${tenantid}; DELETE FROM actormember WHERE tenantid = ${tenantid}; DELETE FROM actor WHERE tenantid = ${tenantid}; DELETE FROM processcategorymapping WHERE tenantid = ${tenantid}; DELETE FROM category WHERE tenantid ...
<gh_stars>0 SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE OR ALTER VIEW [edfi].[vw_ListAllAssignments] AS select distinct d.CodeValue as [Text] ,ksa.KleinStaffClassificationDescriptorId as [Value] from extension.KleinStaffAssignment as ksa join edfi.Descriptor as d on d.DescriptorId = ksa.KleinStaff...
-- 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. PRINT N'Dropping [edfi].[RestraintEvent_DF_CreateD...
------------------------------------------------------------------------------- -- portal info ------------------------------------------------------------------------------- CREATE TABLE PORTAL_INFO( ID BIGINT NOT NULL, NAME VARCHAR(200), DESCRIPTION VARCHAR(200), USER_ID VARCHAR(64), C...
<reponame>sisu-callum/dbt_marketo {% macro lead_history_columns_warning() %} {% if not var('lead_history_columns') %} {{ log( """ Warning: You have passed an empty list to the 'lead_history_columns'. As a result, you won't see the history of any columns in the 'marketo__lead_history' model. """, in...
<gh_stars>1-10 /* Navicat Premium Data Transfer Source Server : www.youlai.tech Source Server Type : MySQL Source Server Version : 80023 Source Host : www.youlai.tech:3306 Source Schema : mall_oms Target Server Type : MySQL Target Server Version : 80023 File Encoding :...
-- -- Copyright 2021 Red Hat Inc. -- SPDX-License-Identifier: Apache-2.0 -- -- Function public.app_needs_migrations(leaf_migrations, _verbose) -- Returns bool: true = run migrations; false = migrations up-to-date -- leaf_migrations (jsonb) = leaf migration names by app from the django code -- Ex: '{<django-app>: <la...
<reponame>skeleton-moveton/postgres CREATE EXTENSION pgstattuple; -- -- It's difficult to come up with platform-independent test cases for -- the pgstattuple functions, but the results for empty tables and -- indexes should be that. -- create table test (a int primary key, b int[]); select * from pgstattuple('test')...
\c gptest; select subt_inData(1,105); select count(*) from subt_plpgsql_t1;
CREATE DATABASE IF NOT EXISTS `basic_test` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `basic_test`; -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: basic_test -- ------------------------------------------------------ -- Server version 8.0.15 /*!40101 SET @OLD_CHARACTER_SET_...
-- @testpoint:opengauss关键字Go(非保留),作为外部数据源名 --关键字不带引号-成功 drop data source if exists Go; create data source Go; drop data source Go; --关键字带双引号-成功 drop data source if exists "Go"; create data source "Go"; drop data source "Go"; --关键字带单引号-合理报错 drop data source if exists 'Go'; create data source 'Go'; --关键字带反引号-合理报错 dr...
<gh_stars>0 CREATE MASTER KEY ENCRYPTION BY PASSWORD = '<PASSWORD>'; CREATE CERTIFICATE UserInfo WITH SUBJECT = 'User Information'; GO CREATE SYMMETRIC KEY UserInfo_Key WITH ALGORITHM = AES_256 ENCRYPTION BY CERTIFICATE UserInfo; GO ALTER TABLE Users ADD EncryptedFirstName varbina...
USE [master] GO CREATE DATABASE [controle-estoque] GO USE [controle-estoque] GO CREATE USER [admin] FOR LOGIN [admin] WITH DEFAULT_SCHEMA=[dbo] GO ALTER ROLE [db_owner] ADD MEMBER [admin] GO CREATE TABLE [dbo].[grupo_produto] ( [id] [int] IDENTITY(1,1) NOT NULL, [nome] [nvarchar](50) NULL, [ativo] [bit] NULL, CONST...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:33067 -- Generation Time: Jun 10, 2020 at 03:48 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET...
# HeidiSQL Dump # # -------------------------------------------------------- # Database: blog # Server version: 5.5.28-debug # Server OS: Linux # Target-Compatibility: Same as source server (MySQL 5.5.28-debug) # max_allowed_packet: 25165824 # HeidiSQL version: 3.2 Revision: ...
-- clear the tables for recreation DROP TABLE Empdetails; DROP TABLE Employee; DROP TABLE Department; -- create all the tables CREATE TABLE Department ( DeptID INT NOT NULL PRIMARY KEY IDENTITY(1, 1), Name NVARCHAR(50) NOT NULL, Location NVARCHAR(100) NOT NULL ); GO CREATE TABLE Employee ( EmployeeID INT NOT NULL...
--------------------------------------------------------------- -- table: userphone --------------------------------------------------------------- -- drop table userphone; create table userphone ( phone_key integer not null, user_key integer, empty character(1), constraint pk_userphone_key primary key (phone_...
CREATE OR REPLACE FUNCTION Select_Zone_Employee(arg_zone_cod BIGINT) RETURNS JSON LANGUAGE plpgsql AS $$ BEGIN IF(select exists(select 1 From Zone_Employees where Zone_Employees.zone_cod = arg_zone_cod)) THEN RETURN ( Select json_build_object( 'Zone_Designation', zones.designation, ...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 16, 2019 at 07:05 AM -- Server version: 10.1.40-MariaDB -- PHP Version: 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
/* * This program creates a function on the * SQL command line where the User enters * a number and the function calculates * the square of the entered number and * displays it. */ SET SERVEROUTPUT ON; SET VERIFY OFF; -- Creating the FUNCTION CREATE OR REPLACE FUNCTION square_num(num in number) return nu...
<filename>sql/SynWeb.sql<gh_stars>1-10 CREATE TABLE IF NOT EXISTS `coms` ( `nodeid` varchar(12) DEFAULT NULL, `comtime` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `comuser` varchar(500) DEFAULT NULL, `compost` varchar(6000) DEFAULT NULL, `comip` varchar(500) DEFAULT NULL, `comurl` varchar(500) DEFAULT ...
<filename>test/sql/official-suite/sqllimits1-1.sql -- original: sqllimits1.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test CREATE TABLE t4(x); INSERT INTO t4 VALUES(1); INSERT INTO t4 VALUES(2); INSERT INTO t4 SELECT 2+x FROM t4 ;DROP TABLE t4 ;PRAGMA max_page_count = 1000 ;CREATE TABLE...
CREATE TABLE [dbo].[Certifications] ( [Id] UNIQUEIDENTIFIER NOT NULL DEFAULT NEWID(), [Name] NVARCHAR (250) NOT NULL, [IsEnabled] BIT NOT NULL DEFAULT 1, [ExpiresOnUtc] DATETIME NULL, [CreatedBy] NVARCHAR (250) NOT NULL , [UpdatedBy] NVARCHAR (250) NULL, [CreatedOnUtc] DATETIMEOFFSET NOT NULL DEFAULT GETU...
<reponame>m3dsh/shwitter /* Warnings: - The `createdAt` column on the `Profile` table would be dropped and recreated. This will lead to data loss if there is data in the column. */ -- AlterTable ALTER TABLE "Profile" ALTER COLUMN "avatar" DROP NOT NULL, ALTER COLUMN "bio" DROP NOT NULL, DROP COLUMN "createdAt", A...
-- file:guc.sql ln:288 expect:true select func_with_bad_set()
<gh_stars>1-10 CREATE DATABASE company; USE company; CREATE TABLE employees ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, firstName VARCHAR(100) NOT NULL, lastName VARCHAR(100) NOT NULL, active BOOLEAN NOT NULL DEFAULT 0, PRIMARY KEY (id) ); CREATE TABLE departments ( id INT UNSIGNED NOT NULL AU...
<filename>backend/de.metas.acct.base/src/main/sql/postgresql/system/43-de.metas.acct/5491150_sys_gh3873-app_drop_FK-constraint_add_index.sql -- 2018-04-17T15:52:27.999 -- URL zum Konzept UPDATE AD_Column SET DDL_NoForeignKey='Y', TechnicalNote='We have no FK-constraint, because Counterpart_Fact_Acct_ID => Fact_Acct_ID ...
<reponame>iamalwaysuncomfortable/mobilecoin -- Copyright (c) 2018-2022 The MobileCoin Foundation -- Ingress keys CREATE TABLE ingress_keys ( -- The public key bytes ingress_public_key BYTEA PRIMARY KEY, -- The first block this key could have been used for (or, a lower bound on that, since this is a racy qu...
-- -- This modifies the default maintenance resource -- management plan as described in the blog -- post. -- connect / as sysdba exec dbms_resource_manager.clear_pending_area begin dbms_resource_manager.create_pending_area(); dbms_resource_manager.update_plan_directive( plan => 'D...
<filename>migrations/frontend/1648115472/down.sql DROP VIEW IF EXISTS gitserver_localclone_jobs_with_repo_name;
<reponame>nftstorage/nft.storage<gh_stars>100-1000 -- Import dag cargo schema IMPORT FOREIGN SCHEMA cargo LIMIT TO (metrics, metrics_log) FROM SERVER dag_cargo_server INTO cargo;
-- -- Test foreign-data wrapper and server management. Greenplum MPP specific -- -- start_ignore DROP FOREIGN DATA WRAPPER dummy CASCADE; -- end_ignore CREATE FOREIGN DATA WRAPPER dummy; COMMENT ON FOREIGN DATA WRAPPER dummy IS 'useless'; -- CREATE FOREIGN TABLE CREATE SERVER s0 FOREIGN DATA WRAPPER dummy; CREATE FO...
<filename>common/models/sql/assetReg_old.sql -- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: May 26, 2016 at 06:59 PM -- Server version: 5.5.49-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = ...
<gh_stars>0 -- @testpoint: list_hash二级分区表:分区键为表达式/分区数0,测试点合理报错 --step1: 创建表空间; expect:成功 drop table if exists t_subpartition_0151; drop tablespace if exists ts_subpartition_0151; create tablespace ts_subpartition_0151 relative location 'subpartition_tablespace/subpartition_tablespace_0151'; drop tablespace if exists t...
USE [projeto7] GO /****** Object: StoredProcedure [dbo].[buscaUser_username_pw] Script Date: 27/04/2022 17:49:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[buscaUser_username_pw] @username nchar(50), @pw nchar(50) AS SELECT u.nome, u.numero, u.apelido, u.id_tipoUtilizador as tip...
create table t as select changesid, dob from Daily_20140414 except select * from Person;
--Nursing Notes--Patel3293 SELECT nr.Coid AS HospId ,Substr(Cast(Cast(Trim(OTranslate(reg.Medical_Record_Num,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ,'')) AS INTEGER) + 135792468 + Cast(nr.Coid AS INTEGER) + 1000000000000 AS CHAR(13)),2,12) AS PtID ,Cast((reg.Patient_DW_ID (Format '99999999999999...
<reponame>FabioFumioWada/TOTVS<filename>MSSQL/retira_letras_numeros.sql Function - Retira Letras/Números Fiz uma function abaixo, que retira os numeros ou as letras de um campo string.. por exemplo o integrachave.... Exemplo: -- TRAZER SOMENTE OS NUMEROS DE UM CAMPO SELECT dbo.FNC_RETIRALETRANUM('FABIOFUMIO1978','N')...
drop trigger GamesDB.triggerAddDeveloper; go go create trigger GamesDB.triggerAddDeveloper on GamesDB.[Developers] instead of insert as begin set nocount on; declare @devName as varchar(100); declare @email as varchar(100); declare @phone as varchar(100); declare @site as varchar(100); declare @image as ...
-- -- PostgreSQL database dump -- -- Dumped from database version 9.4.8 -- Dumped by pg_dump version 9.4.8 -- Started on 2016-09-09 21:58:57 ECT SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messag...
ALTER TABLE votes DROP COLUMN geo, DROP COLUMN fence_title, DROP COLUMN date_voted; DROP TABLE fences cascade; DROP EXTENSION postgis;
-- Demolitions summarized by year on a 500m grid SELECT grid.id AS ID, demos.* INTO _temp_demolitions_tagged_on_500m_grid_ FROM neshap_demolitions AS demos, grid_500m AS grid WHERE ST_Intersects(grid.geom, demos.geom);
<filename>src/SFA.DAS.Commitments.Database/Triggers/ApprenticeshipUpdate.sql CREATE TRIGGER Trg_Apprenticeship_Update ON Apprenticeship AFTER UPDATE AS BEGIN UPDATE Apprenticeship SET UpdatedOn = GETUTCDATE() FROM Inserted i WHERE i.Id = Apprenticeship.Id END GO
SELECT c.contype AS "constraintType", ns.nspname AS "constraintSchema", table_class.relname AS "constraintTable", c.conname AS "constraintName", index_ns.nspname AS "indexSchema", index_class.relname AS "indexName", -- Is equal to "constraintName" for constraints other than FK. Equals to referenced unique I...
SELECT subscriptions.subscription_name, subscriptions.last_seen, streams.stream_version - subscriptions.last_seen as pending_events FROM subscriptions INNER JOIN streams on streams.stream_uuid = subscriptions.stream_uuid ORDER BY subscriptions.subscription_name;
-- If the database already exists, drop it IF EXISTS(SELECT * FROM sysdatabases WHERE name='$(testDBName)') DROP DATABASE $(testDBName) GO
<gh_stars>1000+ -- 10.02.2017 11:55 -- URL zum Konzept INSERT INTO AD_Index_Table (AD_Client_ID,AD_Index_Table_ID,AD_Org_ID,AD_Table_ID,BeforeChangeCode,BeforeChangeCodeType,Created,CreatedBy,EntityType,ErrorMsg,IsActive,IsUnique,Name,Processing,Updated,UpdatedBy,WhereClause) VALUES (0,540395,0,114,'IsSalesContact_Def...
<reponame>smith750/kc<gh_stars>0 delimiter / TRUNCATE TABLE AFFILIATION_TYPE / INSERT INTO AFFILIATION_TYPE (AFFILIATION_TYPE_CODE,DESCRIPTION,ACTIVE_FLAG,UPDATE_USER,UPDATE_TIMESTAMP,OBJ_ID,VER_NBR) VALUES (1,'Faculty','Y','admin',NOW(),UUID(),1) / INSERT INTO AFFILIATION_TYPE (AFFILIATION_TYPE_CODE,DESCRIPTION,A...
{%- test expect_row_values_to_have_data_for_every_n_datepart(model, date_col, date_part="day", interval=None, ...
create view [dbo].[dimPoll] as select mvp.PollID ,mvp.PollQuestion ,mvp.PollCategoryID ,mvc.CategoryName as PollCategoryName from dbo.MVPoll mvp inner join dbo.MVCategory mvc on mvp.PollCategoryID = mvc.CategoryID