sql
stringlengths
6
1.05M
<gh_stars>0 /******************************************************************************* * LINE__MERGE_POINT() * Merges a point into the SDO_ORDINATES of a Line based upon * proximity to the line. * * 1. A Point whose closest location on the Line matches the FIRST * coordinates of that Line is added t...
-- -- Dumping data for table `apps` -- INSERT INTO `apps` (`app_id`, `name`, `title`, `description`, `is_active`, `role_id`) VALUES (1, 'app-management', 'Apps', 'Manage Apps', 1, 4), (2, 'user-management', 'Users', 'Manage Users', 1, 4), (3, 'lesson-management', 'Lessons', 'Manage Lessons, assign Roles', 1, 3), (4, ...
<reponame>zumcoin/NetWallet<filename>user_db.sql -- setup user database CREATE database users; \c users; CREATE TABLE accounts ( IH char(64) NOT NULL, Verifier char(585) NOT NULL, Username varchar(64) NOT NULL UNIQUE, ID SERIAL PRIMARY KEY, address char(99) NOT NULL);
CREATE TABLE `sessions` ( `session_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `expires` int(11) unsigned NOT NULL, `data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin, PRIMARY KEY (`session_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
<filename>dbobjects/packages/group_management.pkb<gh_stars>1-10 create or replace package body group_management as function get_next_groupless_soldier( i_min_rank in int, i_max_rank in int ) return integer as l_result int; begin select id into l_result from ( select s.id, ro...
<reponame>uk-gov-mirror/SkillsFundingAgency.dfc-coursedirectory<filename>src/Dfc.CourseDirectory.Database/Pttcd/Tables/CourseRunRegions.sql<gh_stars>1-10 CREATE TABLE [Pttcd].[CourseRunRegions] ( [CourseRunId] UNIQUEIDENTIFIER NOT NULL CONSTRAINT [FK_CourseRunRegions_CourseRun] FOREIGN KEY REFERENCES [Pttcd].[CourseR...
-- file:money.sql ln:22 expect:true SELECT m * 2::float8 FROM money_data
<reponame>Gigelf-evo-X/evo-X DELETE FROM script_waypoint WHERE entry=30658; INSERT INTO script_waypoint VALUES (30658, 0, 1830.504517, 799.356506, 44.341801, 5000, 'use activation'), (30658, 1, 1832.461792, 800.431396, 44.311745, 10000, 'SAY_BEGIN call back guards'), (30658, 2, 1824.786987, 803.828369, 44.363434, 0, 'S...
-- ads categories UPDATE `[db_prefix]_category` SET `Description` = 'Jobs', `CustomFieldName2` = '', `Unit2` = '', `Picture` = 'user-md' WHERE `Name` = 'Jobs'; UPDATE `[db_prefix]_category` SET `Description` = 'Music Exchange', `Picture` = 'music' WHERE `Name` = 'Music Exchange'; UPDATE `[db_prefix]_category` SE...
DROP TABLE item_image; ALTER TABLE item ALTER COLUMN image_id TYPE VARCHAR;
create table customer(id serial primary key, name varchar(255) not null);
<gh_stars>1-10 -- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-10-08 13:50:33 -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- *********************************** Drop foreign keys *************************...
<reponame>googlegenomics/bigquery-examples # This is busted. It over counts ref calls due in the GROUP BY operation. It # would work if we grouped all of the same variant into the same row prior to # loading to BigQuery because then we would not need the GROUP BY operation. # # Note that the new BigQuery feature of u...
<reponame>fossabot/automate-1 -- Verify delivery:projects_add_type on pg BEGIN; SELECT id, organization_id, guid, name, type FROM projects WHERE FALSE; ROLLBACK;
USE TableRelations CREATE TABLE Persons( PersonID INT NOT NULL, FirstName NVARCHAR(50) NOT NULL, Salary DECIMAL(15,2) NOT NULL, PassportID INT ) INSERT INTO Persons (PersonID, FirstName, Salary, PassportID) VALUES (1, 'Roberto', 43300.00, 102), (2, 'Tom', 56100.00, 103), (3, 'Yana', 60200.00, 10...
<reponame>jyogu-i/spring-boot-rest-example INSERT INTO public."User"( user_id,mail, password,token) VALUES (/* user.getUserId() */'01',/* user.getMail() */'0', /* user.getPassword() */'0',/* user.getToken() */'000');
<gh_stars>0 create table passenger (Pass_Num int (10), Name varchar (10), primary key(Pass_Num)); create table cash (Note_Num int (10), primary key(Note_Num), Pass_Num int(10), foreign key (Pass_Num) references passenger(Pass_Num)); insert into passenger values (101,'Gyani'); insert into passenger values (102,'Neha'); ...
<reponame>christian-million/cccrepo<filename>inst/sql/tables/create_tbl_SS.sql CREATE TABLE IF NOT EXISTS SS ( COLLEGE_ID TEXT, CCCCO_ASSIGNED_STUDENT_ID TEXT, TERM_ID TEXT, EDUCATIONAL_GOAL TEXT, CREDIT_COURSE_OF_STUDY TEXT, CREDIT_INITIAL_ORIENTATION_EXEMPT_STATUS TEXT, CREDIT_INITIAL_ASSE...
CREATE DATABASE burger_db; USE burger_db; CREATE TABLE burgers( id INT NOT NULL AUTO_INCREMENT, burger_name VARCHAR(255), devoured BOOLEAN DEFAULT false, PRIMARY KEY (id) )
<reponame>bradleypeterson/WeberStateEval<filename>DatabaseCreation/EvalDB_06_QuestionTypes.sql CREATE TABLE QuestionTypes( ID tinyint NOT NULL PRIMARY KEY, name nvarchar(40) NOT NULL ); INSERT INTO QuestionTypes (ID, name) VALUES(1, 'Multiple Choice'); INSERT INTO QuestionTypes (ID, name) VALUES(2, 'M...
<reponame>ucdavis/AD419<filename>Database/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/usp_GetPINames.proc.sql -- ============================================= -- Author: <NAME> -- Create date: 9/27/2006 -- Description: Obtains a list of PIs for a specific department -- using hte Org code. -- ========...
-- phpMyAdmin SQL Dump -- version 4.9.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Dec 09, 2020 at 04:21 AM -- Server version: 5.6.23-cll-lve -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
SET IDENTITY_INSERT [dbo].[Cameras] ON INSERT INTO [dbo].[Cameras] ([idCameras], [resolucaoFrontal], [resolucaoTraseira]) VALUES (8, 2, 2) INSERT INTO [dbo].[Cameras] ([idCameras], [resolucaoFrontal], [resolucaoTraseira]) VALUES (10, 222, 22) INSERT INTO [dbo].[Cameras] ([idCameras], [resolucaoFrontal], [resolucaoTr...
<reponame>goldenapplehotel/goldenapplehotel<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 29, 2016 at 11:07 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 S...
<gh_stars>10-100  CREATE PROCEDURE [dbo].[GetConfigurationScript] @ParentConfigurationName nvarchar(128) AS BEGIN SET NOCOUNT ON; BEGIN TRANSACTION DECLARE @ParamPayload nvarchar(MAX); DECLARE @ConfigID int BEGIN TRY SELECT ScriptName,ScriptPath from [dbo].[ParentConfiguration] WHERE ParentConfigurationNa...
 CREATE View [docs].[RepoObject_Plantuml_ObjectRefList_1_1] As Select ro.RepoObject_guid --, cultures_name = Cast('' As NVarchar(10)) --, ro.RepoObject_fullname2 , ObjectRefList = String_Agg ( Concat ( Cast(N'' As NVarchar(Max)...
-- No need for this flag now, just check if external_organization_id is null ALTER TABLE projects DROP COLUMN is_external; ALTER TABLE projects ADD external_organization_id INT REFERENCES external_organizations (external_organization_id); COMMENT ON COLUMN projects.external_organization_id IS 'Optional extern...
-- DDL script for base table: -- Field - Immunology -- Seed Years - 2000-2004 SET SEARCH_PATH = theta_plus; -- create union of edge lists across 5 years DROP TABLE IF EXISTS theta_plus.imm2000_2004_citing_cited; CREATE TABLE theta_plus.imm2000_2004_citing_cited TABLESPACE theta_plus_tbs AS SELECT * FROM imm2000_...
/* To help Flyway */ BEGIN EXECUTE IMMEDIATE q'[ CREATE TYPE "ORACLE_TOOLS"."T_SORT_OBJECTS_BY_DEPS_REC" AS OBJECT (OBJECT_SCHEMA VARCHAR2(128 CHAR), OBJECT_TYPE VARCHAR2(30 CHAR), OBJECT_NAME VARCHAR2(4000 CHAR), DEPENDENCY_LIST VARCHAR2(4000 CHAR), NR INTEGER) ]'; END; /
<gh_stars>1000+ -- 20.07.2015 17:59 -- URL zum Konzept INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdat...
-- -- -- -- @author <NAME> (<EMAIL>) -- @creation-date 2005-01-23 -- @arch-tag: 2abf85db-45a1-4444-856d-683a01be7937 -- @cvs-id $Id: upgrade-0.3d4-0.3d5.sql,v 1.2 2015/12/03 20:48:59 cvs Exp $ -- -- old define_function_args ('rss_gen_subscr__new','subscr_id,impl_id,summary_context_id,timeout,lastbuild,object_type,c...
<reponame>RahmatSaeedi/LighthouseBnB<gh_stars>0 SELECT city, count(*) as total_reservations FROM reservations LEFT JOIN properties ON properties.id = property_id GROUP BY city ORDER BY total_reservations DESC;
INSERT INTO COURSES VALUES ('CS2172', 'Fundamentals of Computing', 'Ka Chun K. LEE', 'C01'); INSERT INTO COURSES VALUES ('CS2332', 'Object-Oriented Programming', 'Yu MONG', 'C01'); INSERT INTO COURSES VALUES ('CS2468', 'Data Structures and Data Mgt', 'Chung Sing V. LEE', 'C01'); INSERT INTO COURSES VALUES ('CS3103',...
<gh_stars>0 CREATE PROCEDURE [dbo].[CreateIdentityOperationSourceSystemEntity] @operationId UNIQUEIDENTIFIER, @timeStamp DATETIMEOFFSET(7), @entityTypeId UNIQUEIDENTIFIER, @sourceSystemId UNIQUEIDENTIFIER, @sourceSystemEntityId NVARCHAR(512), @entityDataHash VARCHAR(24), @entityData VARBINARY(MAX), @entityLabe...
<filename>src/main/resources/META-INF/load.sql INSERT INTO Ticket(orderId, state, accountId, name, numberOfPersons, totalCost, lraId) VALUES ('124', 'TICKET_BOOKED', 'AA2', 'Live Depeche Mode - Rome 12 june 2019', '1', 60, NULL) INSERT INTO Ticket(orderId, state, accountId, name, numberOfPersons, totalCost, lraId) VALU...
<gh_stars>0 -- One admin user, named admin1 with passwor <PASSWORD> and authority admin INSERT INTO users(username,password,enabled) VALUES ('admin1','<PASSWORD>',TRUE); INSERT INTO authorities(id,username,authority) VALUES (1,'admin1','admin'); -- One owner user, named owner1 with passwor <PASSWORD> INSERT INTO users(...
<reponame>davejoyce/composite-dao<gh_stars>0 create table APP_TWEET ( APP_TWEET_ID bigint not null, CREATED_DT timestamp not null, FROM_APP_USER_ID bigint, FROM_APP_USER_NAME varchar(15), TEXT varchar(140), TO_APP_USER_ID bigint, TO_APP_USER_NAME varchar(15),...
{% macro limit_zero() %} {{ return(adapter.dispatch('limit_zero', dbt_utils._get_utils_namespaces())()) }} {% endmacro %} {% macro default__limit_zero() %} {{ return('limit 0') }} {% endmacro %}
-- @Description Ensures that one session does not hit SLIM in critical section -- @author <NAME> -- @vlimMB 900 -- @slimMB 600 -- content/segment = 0; size = 601MB; sleep = 0 sec; crit_section = true select gp_allocate_palloc_test_all_segs(0, 601 * 1024 * 1024, 0, true);
<filename>test-code-gen-c++/1.ddl<gh_stars>10-100 def Main = {}
create table lmv_bright.buildings ( gid int primary key, the_geom geometry ); INSERT INTO lmv_bright.buildings SELECT ogc_fid, the_geom FROM tatort_by; create index on lmv_bright.buildings using gist (the_geom);
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 25, 2021 at 04:31 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
SET FOREIGN_KEY_CHECKS=0; Truncate table sylius_address; Truncate table sylius_address_log_entries; Truncate table sylius_adjustment; Truncate table sylius_channel_pricing; Truncate table sylius_customer; Truncate table sylius_order; Truncate table sylius_order_item; Truncate table sylius_order_item_unit; Truncate tabl...
-- Find all employees SELECT * FROM employee; -- Find all clients SELECT * FROM clients; -- Find all employees ordered by salary SELECT * from employee ORDER BY salary ASC/DESC; -- Find all employees ordered by sex then name SELECT * from employee ORDER BY sex, name; -- Find the first 5 employees in the table SELE...
<filename>IQToolsApp/DB/Procedures/System/pr_Reports_12MonthCohort.sql if exists(select * from sysobjects where name='pr_Reports_12MonthCohort' and type='P') drop proc pr_Reports_12MonthCohort go create proc pr_Reports_12MonthCohort @fromdate datetime, @todate datetime as begin Select 'Net Cohort' as Category, a....
select * from SelectAnswersByUser where id = 9 AND ENCUESTADO = 'danitza'; SELECT SUM(PUNTAJE) FROM SelectAnswersByUser WHERE ID = 9 AND ENCUESTADO = 'bruniTestToken'; select qu.id,qu.real_section,qu.content,sc.id,sc.options,sc.value from questions qu inner join scores sc on qu.id = sc.question_id where sc.real...
USE [CustomerService] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Customer]( [Id] [numeric](10, 0) IDENTITY(1,1) NOT NULL, [Name] [nvarchar](30) NOT NULL, [Email] [nvarchar](25) NOT NULL, [MobileNo] [numeric](10, 0) NOT NULL, CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED ( [Id] AS...
<filename>webicon.sql -- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Фев 13 2018 г., 08:06 -- Версия сервера: 5.7.20 -- Версия PHP: 7.2.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!4...
CREATE DATABASE IF NOT EXISTS apilaravel; USE apilaravel; CREATE TABLE users( id int(255) auto_increment not null, email VARCHAR (255), role varchar(20), name varchar(20), surname varchar(50), password varchar(255), created_at DATETIME DEFAULT NULL, updated_at DATETIME DEFAULT...
-- savepoint6.test -- -- execsql {PRAGMA incremental_vacuum} PRAGMA incremental_vacuum
-- Potentially runs nest group enumeration -- this will show all the local and domain groups associated with the current login -- https://www.sqlserver-dba.com/2018/05/how-to-get-the-ad-groups-of-a-login-with-syslogin_token.html select * from sys.login_token
-- these indexes are to make sure that all the sorting possible via the web UI -- is fast and _stable_ across multiple pages of the same value -- (e.g. sorting on rarity and navigating through multiple pages of 'Common' values) -- -- of course, these additional indexes don't take care of all possible sorting and filter...
<reponame>flexsocialbox/una<gh_stars>100-1000 -- COMMENTS DELETE FROM `sys_objects_cmts` WHERE `Name`='bx_convos'; INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Html`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `Num...
-- droping unique indices and creating ones without uniqueness DROP INDEX idx_pi_wf_processinstance; CREATE INDEX idx_pi_wf_processinstance_v2 ON eg_wf_processinstance_v2 (businessId,lastModifiedTime); DROP INDEX idx_pi_wf_businessservice; CREATE INDEX idx_pi_wf_businessservice_v2 ON eg_wf_businessservice_v2 (busin...
/* * Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. * * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. * * BK-BASE 蓝鲸基础平台 is licensed under the MIT License. * * License for BK-BASE 蓝鲸基础平台: * ----------------------------------------------...
 CREATE PROC [dbo].[AzureDBElasticPoolResourceStats_Upd](@AzureDBElasticPoolResourceStats dbo.AzureDBElasticPoolResourceStats READONLY,@InstanceID INT,@SnapshotDate DATETIME2(3)) AS SET XACT_ABORT ON DECLARE @Ref VARCHAR(100)='AzureDBElasticPoolResourceStats' IF NOT EXISTS(SELECT 1 FROM dbo.CollectionDates WHERE Snaps...
-- Wazat SAI SET @ENTRY := 19035; UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY; INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_m...
-- -------------------------------------------------------- -- 主機: 192.168.127.12 -- 伺服器版本: 8.0.28-0ubuntu0.20.04.3 - (Ubuntu) -- 伺服器作業系統: Linux -- HeidiSQL 版本: 11.3.0.6295 -- -------------------------------------------------------- ...
-- MySQL dump 10.13 Distrib 5.7.26, for osx10.9 (x86_64) -- -- Host: localhost Database: jaycraft -- ------------------------------------------------------ -- Server version 5.7.26 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; ...
<filename>services/postgres/docker-entrypoint-initdb.d/types_db/01.init_db.postgres.sql -- Create extension for uuid auto-gen support create extension "uuid-ossp"; revoke all on schema "public" from "public"; -- Create user create user "graph-types" password '<PASSWORD>'; grant connect on database "graph-types" to ...
<reponame>arijitcse/DDP DROP TABLE process_deployment_queue; DROP TABLE deploy_status; DROP TABLE general_config; DROP TABLE user_roles; DROP TABLE users; DROP TABLE archive_consump_queue; DROP TABLE batch_consump_queue; DROP TABLE batch_file; DROP TABLE batch; DROP TABLE servers; DROP TABLE etl_driver; DROP TABLE hive...
alter table HARVESTABLE drop column SCRIPT; alter table HARVESTABLE add column CONNECTORURL varchar(4096);
use sakila; #rental #what is the avg duration expressed in hh:mm format? select floor(avg(length)/60) as hours + avg((length)%60) as minute) from film order by length; select datediff(min(rental_date), curdate()) from rental; INSERT INTO `bank`.`account` (`account_id`, `district_id`, `frequency`, `date`) VALUES (<{a...
<gh_stars>0 CREATE TABLE HELLO (HELLO CHAR(12)) INSERT INTO HELLO VALUES ('Fuck You Github!') SELECT * FROM HELLO
<filename>sql/jpa/openjpa/src/script/drop.sql ALTER TABLE PERSON DROP CONSTRAINT PERSON_FAMILY_ID ALTER TABLE PERSON_JOB DROP CONSTRAINT PERSONJOBjobListID ALTER TABLE PERSON_JOB DROP CONSTRAINT PERSONJOBPerson_ID DROP TABLE FAMILY DROP TABLE PERSON DROP TABLE PERSON_JOB DROP TABLE JOB DELETE FROM SEQUENCE WHERE SEQ_NA...
<reponame>CoderSong2015/Apache-Trafodion -- @@@ START COPYRIGHT @@@ -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- t...
<gh_stars>100-1000 /* SQLyog v10.2 MySQL - 5.1.32-community : Database - taoshop ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN...
<gh_stars>1-10 -- services.sql handles basic queries against the service table drop function darwin.getservices(pcrs char(3), pts timestamp with time zone); create or replace function darwin.getservices(pcrs char(3), pts timestamp with time zone) returns json as $$ declare -- start & end time to scan. This is ...
<filename>Migrations/Cats.DatabaseSchema/dbo/Stored Procedures/sp_del_Period.sql  CREATE PROCEDURE [sp_del_Period] ( @PeriodID int ) AS DELETE FROM [dbo].[Period] WHERE ([PeriodID] = @PeriodID)
--+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; -- create and populate tables create table tj (id int, val string); create table tk (id int, val string); create index tj_id on tj(id); create index tk_id on tk(id); insert into tj values (1, 'value a1'); insert into tj values (2, 'value a2'); insert ...
<reponame>MarBesse/smapshot-api CREATE OR REPLACE FUNCTION update_points_vt() RETURNS trigger AS $$ BEGIN -- When state changed, update vt IF old.state <> new.state THEN -- Add id from vt layer IF new.state IN ('initial', 'waiting_alignment', 'validated') THEN PERFORM pg_notify( CASE WHEN new.state = 'valid...
<reponame>ahmedriza/hawq DROP SCHEMA IF EXISTS hornet_helper CASCADE; CREATE SCHEMA hornet_helper; SET SEARCH_PATH = hornet_helper; DROP FUNCTION IF EXISTS ls_hdfs_dir(TEXT); CREATE FUNCTION ls_hdfs_dir(location TEXT) RETURNS table ( file_replication int, file_owner text...
--Consultar si el controlador de eventos global event_scheduler esta activado SHOW VARIABLES WHERE VARIABLE_NAME = 'event_scheduler' --Activar el controlador de eventos global, si no esta activado SET GLOBAL event_scheduler = ON; --Crear evento el cual se va a ejecutar diariamente DELIMITER $$ CREATE EVENT IF NOT EX...
<gh_stars>0 select nf.not_in_nnf from mgnfe.nfe_evento eve, mgnfe.nfe_nfe nfe, mgnfe.nfe_notafiscal nf where eve.nfe_in_sequencia = nfe.nfe_in_sequencia and nfe.not_in_sequencia = nf.not_in_sequencia and eve.eve_in_seqevento = 8
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Хост: localhost -- Время создания: Июл 10 2020 г., 10:27 -- Версия сервера: 8.0.17 -- Версия PHP: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SE...
SELECT * FROM Ontology WHERE ontology_key = ?
<reponame>ashafer01/zero-migration BEGIN; INSERT INTO example_schema (applied) VALUES ('002'); -- Missed constraints in initial schema ALTER TABLE users ADD CONSTRAINT username_unique UNIQUE (username); ALTER TABLE app_data ALTER COLUMN source_url SET NOT NULL; ALTER TABLE app_data ALTER COLUMN data_b64 SET NOT NULL; ...
<gh_stars>0 CREATE TABLE enums ( enum_id VARCHAR(50) NOT NULL, name VARCHAR(50) NOT NULL, description VARCHAR(1024), parent_enum_id VARCHAR(50), tenant_id VARCHAR(50) NOT NULL, created_at DATETIME NOT NULL, created_by VARCHAR(50) NOT NULL, ...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 01, 2020 at 05:15 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
<reponame>LilDad/relation_database CREATE TABLE Employees ( EmployeeID SERIAL PRIMARY KEY, LastName VARCHAR(255), FirstName VARCHAR(255), BirthDate DATE, Photo VARCHAR(255), Notes TEXT );
CREATE TABLE [dbo].[Newsletter] ( [Id] INT IDENTITY (1, 1) NOT NULL, [Name] NVARCHAR (500) NOT NULL, [Email] NVARCHAR (50) NOT NULL, [IPAddress] NVARCHAR (50) NOT NULL, [SubscribeDate] DATETIME NOT NULL, [ObjectId] INT NOT NULL,...
USE sakila; -- Automatically generated by Advanced ETl Processor -- http://www.etl-tools.com/ -- table customer -- Start of script Insert into customer (`customer_id`,`store_id`,`first_name`,`last_name`,`email`,`address_id`,`active`,`create_date`,`last_update`) Values ('1','1','MARY','SMITH','<EMAIL>','5','1','2006-02...
CREATE TABLE employee( id INT NOT NULL, name VARCHAR(32), office VARCHAR(32), age INT, CHECK (age <= 100 AND age >= 0), PRIMARY KEY(id) ); CREATE TABLE book( id INT NOT NULL, name VARCHAR(32), author VARCHAR(32), publisher VARCHAR(32), PRIMARY KEY (id) ); CREATE TABLE record( book_id INT, employee_id INT, time DATE, FO...
<gh_stars>1-10 /* "C:\Program Files (x86)\pgAdmin 4\v3\runtime\pg_dump" --host localhost --port 5432 --username postgres --verbose --table=PASN.PRSN_GRADES --data-only --column-inserts psdc_live > PASN.PRSN_GRADES.sql */ set define off; TRUNCATE TABLE PASN.PRSN_GRADES CASCADE; COMMIT; EXEC SYS.SEQUENCE_NEWVALUE( '...
-- file:rowtypes.sql ln:72 expect:true insert into people select ('Jim', f1, null)::fullname, current_date from pp
-- file:updatable_views.sql ln:1110 expect:true INSERT INTO v1 VALUES (1, 'ok')
IF EXISTS (SELECT * FROM sys.objects WHERE schema_id=SCHEMA_ID('microsoft') AND name = N'rtrim') DROP FUNCTION microsoft.rtrim; GO CREATE FUNCTION microsoft.rtrim(@expression NVARCHAR(MAX), @characters VARCHAR(32) = ' ') RETURNS NVARCHAR(MAX) WITH SCHEMABINDING AS BEGIN -- Fast opt out IF (@characters IS NULL O...
-- Sample query to identify unsupported datatypes by DMS for PostgreSQL to PostgreSQL Migration -- Refer to https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html#CHAP_Source.PostgreSQL.Homogeneous for more details select table_schema,table_name,column_name,data_type from information_schema.colum...
-- 2017-05-17T10:26:05.865 -- URL zum Konzept UPDATE AD_Field SET IsMandatory='Y',Updated=TO_TIMESTAMP('2017-05-17 10:26:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=558493 ; -- 2017-05-17T10:26:44.801 -- URL zum Konzept UPDATE AD_Field SET IsDisplayed='N', IsDisplayedGrid='N',Updated=TO_TIMESTAMP('201...
CREATE USER yakkl; ALTER ROLE yakkl SET search_path TO yakkl,public; CREATE DATABASE yakkl OWNER=yakkl; \connect yakkl CREATE SCHEMA yakkl AUTHORIZATION yakkl; CREATE EXTENSION tsearch_extras SCHEMA yakkl;
/*+------------------------------------------------------------------------------------------------ @q ls /object_type/owner/name : Database objects listing */------------------------------------------------------------------------------------------------- /* Author : <NAME> (mailto:<EMAIL>) Copyright : C...
ALTER TABLE [Notification].[NotificationDates] ADD [WithdrawnDate] DATE NULL;
<filename>v3.1/Database/dbo/Tables/Subject.sql<gh_stars>0 CREATE TABLE [dbo].[Subject] ( --From MergedXSDs XSD --From 'Dc_Elements' Namespace [SubjectId] SMALLINT NOT NULL, CONSTRAINT [PK_SubjectId] PRIMARY KEY CLUSTERED ([SubjectId] ASC) );
<filename>kornell-api/src/main/resources/db/migration/2017/05/V2017.05.18.19.56__rename_course_title_and_add_state_to_c_and_cv.sql SET @sql = (SELECT IF( (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema=DATABASE() AND table_name='Course' AND column_name='ti...
-- -------------------------------------------------------- -- 主机: 192.168.0.199 -- 服务器版本: 5.7.10-log - MySQL Community Server (GPL) -- 服务器操作系统: Win64 -- HeidiSQL 版本: 9.5.0.5280 -- ----------------------------------------------------...
<reponame>teamlint/pg-flow -- -- PostgreSQL database dump -- -- Dumped from database version 12.1 -- 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_co...
{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_engagement_enabled','hubspot_engagement_task_enabled'])) }} with base as ( select * from {{ ref('stg_hubspot__engagement_task_tmp') }} ), macro as ( select {{ fivetran_utils.fill_staging_columns( ...
<gh_stars>1-10 {% macro get_ticket_columns() %} {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()}, {"name": "id", "datatype": dbt_utils.type_int()}, {"name": "is_deleted", "datatype": "boolean"}, {"name": "property_closed_date", "datatype": dbt_utils.type_timestamp...
<filename>sql/_03_object_oriented/_02_collection_type/_001_class/cases/1005.sql --Create a class with collection type: list create class t1(c1 list integer, c2 list varchar(10), c3 list date, c4 list char(2), c5 list timestamp, c6 list bit(8)); insert into t1 values({1,2,3},{'abc','xxx...
<reponame>opengauss-mirror/Yat -- @testpoint:opengauss关键字prepared(非保留),作为外部数据源名 --关键字不带引号-成功 drop data source if exists prepared; create data source prepared; drop data source prepared; --关键字带双引号-成功 drop data source if exists "prepared"; create data source "prepared"; drop data source "prepared"; --关键字带单引号-合理报错 dro...