sql
stringlengths
6
1.05M
<reponame>patrickfischer1/WebAPI<gh_stars>10-100 -- 101 Number of persons by age, with age at first observation period --insert into @results_schema.heracles_results (cohort_definition_id, analysis_id, stratum_1, count_value) select c1.cohort_definition_id, 101 as analysis_id, year(op1.index_date) - p1...
<filename>src/main/resources/org/support/project/knowledge/dao/sql/ServiceLocaleConfigsDao/ServiceLocaleConfigsDao_select_all.sql SELECT * FROM SERVICE_LOCALE_CONFIGS WHERE DELETE_FLAG = 0 ORDER BY INSERT_DATETIME %s;
create database pms -- ---------------------------- -- Table structure for pms_album -- ---------------------------- DROP TABLE IF EXISTS `pms_album`; CREATE TABLE `pms_album` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(64) DEFAULT NULL, `cover_pic` varchar(1000) DEFAULT NULL, `pic_count` int(11...
<reponame>skyling/bookz # Host: localhost (Version: 5.6.21) # Date: 2015-07-16 00:27:22 # Generator: MySQL-Front 5.3 (Build 4.118) /*!40101 SET NAMES utf8 */; # # Structure for table "bookz_admin" # DROP TABLE IF EXISTS `bookz_admin`; CREATE TABLE `bookz_admin` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT CO...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Фев 24 2019 г., 17:21 -- Версия сервера: 5.6.41 -- Версия PHP: 7.0.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
BEGIN; ALTER TABLE validez_nacional_solicitud ADD nro_expediente character varying(200); ------------------------------------- INSERT INTO deltas_sql (numero, app, comentario) VALUES ('125', 'Validez Nacional', 'Número de expediente en Solicitud - #389'); COMMIT;
<reponame>Andrew0502/employee-tracker<filename>schema.sql DROP DATABASE IF EXISTS trackerDB; CREATE DATABASE trackerDB; USE trackerDB; CREATE TABLE employee ( id INTEGER NOT NULL AUTO_INCREMENT, first_name VARCHAR(30), last_name VARCHAR(30), role_id INTEGER, manager_id INTEGER, PRIMARY KEY (id) ); CREA...
<filename>SQL/Query/nhattienphat.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 27, 2016 at 06:24 AM -- Server version: 10.1.10-MariaDB -- PHP Version: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 ...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 04, 2021 at 05:38 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
<gh_stars>0 --Kill open transactions DBCC opentran KILL 64 GO --Create Schema CREATE SCHEMA SchemaName GO --Change collation to something case sensative USE master; ALTER DATABASE [your database name] SET SINGLE_USER WITH ROLLBACK IMMEDIATE ALTER DATABASE [your database name] COLLATE SQL_Latin1_General_CP1_CS_AS...
<filename>dist_block_app_db.sql -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 16, 2017 at 06:21 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
<reponame>Nerffie/SodibetApp<filename>sodibet.sql -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : mer. 10 juil. 2019 à 05:09 -- Version du serveur : 5.7.24 -- Version de PHP : 7.2.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START T...
CREATE DATABASE IF NOT EXISTS `users`;
<filename>06-joinoperation.sql #In the first example shows the goal scored by a player with the last name 'Bender'. #The * says to list all the columns in the table - a shorter way of saying matchid, teamid, player, gtime #Modify it to show the matchid and player name for all goals scored by Germany. To identify Germa...
WITH restore_date_cte AS ( SELECT d.name AS DatabaseName , rh.restore_date AS BackUpRestoredDatetime , ISNULL(rh.user_name, 'No Restore') AS RestoredBy , bs.name AS BackUpName , bs.user_name AS BackupCreatedBy , bs.backup_finish_date AS backupCompletedDatetime , bs.database_name AS BackupSourceDB ...
INSERT INTO environment ( id, creator_id, updater_id, name, "order" ) VALUES ( 5001, 101, 101, 'Dev', 0 ); INSERT INTO environment ( id, creator_id, updater_id, name, "order" ...
<reponame>gianadda/ZenPRM<gh_stars>1-10 IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'ImportColumn') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) DROP TABLE ImportColumn GO CREATE TABLE ImportColumn ( Ident BIGINT IDENTITY(1,1) NOT NULL , Label NVARCHAR(250) NULL , ColumnName NVARCHAR(250) NULL , ...
UPDATE playercreateinfo_spell SET Spell = '21084' WHERE Spell = '20154'; UPDATE playercreateinfo_action SET action = '21084' WHERE action = '20154'; DELETE FROM `character_spell` WHERE spell='20154'; -- re-add all default spells if not have with from spell list INSERT IGNORE INTO `character_spell` SELECT `character`.`...
-- -- The ReliefWeb API. -- Prepared SQL queries for 'category' definition. -- -- -- SELECT template for table `category` -- SELECT `id`, `name` FROM `category` WHERE 1; -- -- INSERT template for table `category` -- INSERT INTO `category`(`id`, `name`) VALUES (?, ?); -- -- UPDATE template for table `category` -- UP...
<filename>qal/qal_sales (4).sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 17, 2021 at 05:46 AM -- Server version: 10.4.20-MariaDB -- PHP Version: 7.3.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:...
DROP TABLE key_by_accountid; CREATE TABLE key_by_accountid ( account_id text, key blob, email_idx set<frozen<tuple<text, bigint>>>, PRIMARY KEY (account_id) );
-- // CLOUD-91592 handle parallel usage generation -- Migration SQL that makes the change goes here. DELETE FROM cloudbreakusage; ALTER TABLE ONLY cloudbreakusage ADD CONSTRAINT uk_stack_instancegroup_day UNIQUE (stackid, instancegroup, day); -- //@UNDO -- SQL to undo the change goes here. ALTER TABLE ONLY cloudbrea...
<filename>.databases/mysql-blog.sql CREATE DATABASE IF NOT EXISTS `mvccore_blog` /*!40100 DEFAULT CHARACTER SET utf8mb4 */; USE `mvccore_blog`; CREATE TABLE IF NOT EXISTS `users` ( `id` int(10) NOT NULL AUTO_INCREMENT, `active` tinyint(1) NOT NULL DEFAULT 1, `admin` tinyint(1) NOT NULL DEFAULT 0, `user_name` v...
-- @testpoint: ceil函数入参为空值 select ceil(''); select ceil(null);
<reponame>Elludenf/proyecto_titulacion --Creacion administrador de la base de datos CREATE ROLE titulacion_db_admin LOGIN ENCRYPTED PASSWORD '<PASSWORD>' SUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION; --Creamos base de datos llamada db_titulacion --con titulacion_db_admin como owner CREATE DATABASE db_titu...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: Mar 01, 2018 at 01:18 AM -- Server version: 5.6.35 -- PHP Version: 7.0.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
<filename>Week8/Database/student-data.sql insert into student (student_id, student_name, student_email, student_oit_id) values(4, '<NAME>', '<EMAIL>', 918193453); insert into student (student_id, student_name, student_email, student_oit_id) values(6, '<NAME>', '<EMAIL>', 918653242); insert into student (student_id, stu...
<reponame>zonafets/TSQL-Utils /* leave this l:see LICENSE file g:utility,script v:100328\s.zaglio: */ create proc sp__script_refactor as begin print 'http://www.dpriver.com/pp/sqlformat.htm' end -- sp__script_refactor
<gh_stars>0 SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP TABLE IF EXISTS `message_log`; CREATE TABLE `message_log` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', `message_sent` datetime DEFAULT NULL COMMENT 'Message sent', `message_statu...
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 10, 2017 at 02:49 PM -- Server version: 5.6.26 -- PHP Version: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
CREATE DATABASE unisys; use unisys; -- grant all on unisys.* to unsclient@'localhost' identified by 'unsclient'; -- create table device(); CREATE TABLE device( id INT UNSIGNED auto_increment PRIMARY KEY NOT NULL comment '设备唯一ID', type INT UNSIGNED NOT NULL comment '设备类型', ip VARCHAR(64) comment '设备IPv4/IPv6', port INT...
CREATE OR REPLACE TRIGGER zmiana_statusu_trigger AFTER UPDATE ON REZERWACJE FOR EACH ROW DECLARE wolne_miejsca_delta int; BEGIN INSERT INTO REZERWACJE_LOG (ID_REZERWACJI, DATA, STATUS) VALUES (:NEW.NR_REZERWACJI, CURRENT_DATE, :NEW.STATUS); CASE WHEN :OLD.STATUS = 'A' AND :NEW.STATUS <...
/* Cantidad de pagos exitosos realizados por un cliente dividido por mes año Author: <NAME> */ select u.user_name, u.user_last_name, u.user_email, YEAR(p.created), MONTHNAME(p.created), COUNT(p.id) from generalreservation gres join user u on u.user_id =gres.gen_res_user_id join ownershipreservation owres on owres.ow...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 08, 2021 at 05:22 PM -- Server version: 10.4.21-MariaDB -- PHP Version: 7.3.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
-- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Waktu pembuatan: 04 Apr 2022 pada 13.45 -- Versi server: 10.5.13-MariaDB-cll-lve -- Versi PHP: 7.3.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jul 20, 2018 at 11:48 AM -- Server version: 5.7.19 -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101...
<filename>MySQL-Queries/11- TABLE RELATIONS/9.Peaks in Rila.sql SELECT m.`mountain_range`, p.`peak_name`, p.`elevation` FROM mountains AS `m` JOIN peaks AS `p` ON m.`id` = p.`mountain_id` WHERE m.`mountain_range` = 'Rila' ORDER BY p.`elevation` DESC;
<filename>environment/sql/tables/command.sql<gh_stars>1-10 CREATE TABLE `command` ( `id` bigint(11) PRIMARY KEY AUTO_INCREMENT, `name` varchar(30) NOT NULL, `description` bigint(11) NOT NULL, `paramCount` int(11) NOT NULL, `optionalParams` int(11) NOT NULL, `level` tinyint(1) NOT NULL, `minPermission` int...
/* Weather Observation Station 2 Query the following two values from the STATION table: The sum of all values in LAT_N rounded to a scale of decimal places. The sum of all values in LONG_W rounded to a scale of decimal places. */ SELECT ROUND(SUM(lat_n),2), ROUND(SUM(long_w),2) FROM station;
<filename>db/sql/2293__alter_procedure_d_arvovastaus_koulutustausta.sql USE [ANTERO] GO /****** Object: StoredProcedure [dw].[p_lataa_d_arvovastaus_koulutustausta] Script Date: 11.6.2019 16:08:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dw].[p_lataa_d_arvovastaus_koulutustausta] A...
<filename>src/test/resources/sql/select/fdd832a0.sql -- file:regproc.sql ln:19 expect:true SELECT to_regoperator('+(int4,int4)')
<filename>src/test/resources/sql/select/2ed34a7b.sql -- file:timestamptz.sql ln:309 expect:true SELECT make_timestamptz(1910, 12, 24, 0, 0, 0, 'Nehwon/Lankhmar')
<gh_stars>100-1000 -- MENUS UPDATE `sys_menu_items` SET `visibility_custom`='a:3:{s:6:"module";s:9:"bx_convos";s:6:"method";s:18:"is_allowed_contact";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}' WHERE `module`='bx_convos' AND `name`='convos-compose' AND `title_system`='_bx_cnv_menu_item_title_system_message'; --...
SELECT movies.id, title, movie_reviews FROM movies JOIN reviews ON reviews.movie_id = movies.id;
-- 2019-06-10T11:44:17.066 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO M_AttributeValue (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,IsNullFieldValue,M_Attribute_ID,M_AttributeValue_ID,Name,Updated,UpdatedBy,Value) SELECT 0,0,TO_TIMESTAMP('2019-06-10 11:44:16','YYYY-MM-DD HH24:M...
<gh_stars>1-10 CREATE OR REPLACE package UTIL.pl authid current_user as logger logtype := logtype.init('anonymous'); type varchar2_table is table of varchar2(4000); function format(i_base long, i_values strings) return long; function make_string( i_data varchar2_table, i_delimiter varchar2 default '...
CREATE TABLE `tb_febzciaoij` ( `col_cchheryffd` mediumint unsigned NULL, `col_emlschxjrp` mediumblob, `col_qjiterpuli` binary(101), `col_icnjklhceu` numeric(12) NOT NULL, CONSTRAINT PRIMARY KEY (`col_icnjklhceu`) ) DEFAULT CHARSET=latin1; CREATE TABLE `tb_vmghxdnngw` ( `col_qbfketzeju` smallint(...
<reponame>Abraflare/dbt_mixpanel<gh_stars>0 {{ config(materialized='ephemeral') }} with events as ( select * from {{ ref('stg_mixpanel__event_tmp') }} ), fields as ( select cast( {{ dbt_utils.date_trunc('day', 'time') }} as date) as date_day, lower(name) as event_type, -- pull...
<filename>saluki-ops/saluki-ops-console/src/main/resources/mappers/create-db.sql<gh_stars>10-100 CREATE TABLE IF NOT EXISTS `saluki_invoke` ( `id` varchar(255), `invokeDate` datetime DEFAULT NULL, `application` varchar(255) DEFAULT NULL, `service` varchar(255) DEFAULT NULL, `method` varchar(255) DEFAULT NULL,...
<filename>sql/2020/01_CSS/specificity.sql #standardSQL CREATE TEMPORARY FUNCTION getSpecificityInfo(css STRING) RETURNS STRUCT< ruleCount NUMERIC, selectorCount NUMERIC, distribution ARRAY<STRUCT<specificity STRING, specificity_cmp STRING, freq INT64>> > LANGUAGE js AS ''' try { function extractSpecificity(ast)...
/* Navicat Premium Data Transfer Source Server : BLOG Source Server Type : MySQL Source Server Version : 80017 Source Host : localhost:3306 Source Schema : chatapp Target Server Type : MySQL Target Server Version : 80017 File Encoding : 65001 Date: 11/02/2021 19:41:4...
--- 用户<EMAIL> 密码<PASSWORD> INSERT INTO `go_test`.`users` (`id`, `created_at`, `updated_at`, `deleted_at`, `username`, `password`, `phone`, `email`, `nick_name`, `avatar`, `status`, `role_id`, `dept_id`, `uid`, `create_by`) VALUES ('1', '2021-09-18 12:30:28', '2021-09-18 12:30:28', NULL, 'luban', '$2a$10$zn0dAfLmdIC...
<filename>sql/2021/jamstack/resource_weights.sql #standardSQL # Median resource weights by SSG SELECT client, ssg, COUNT(0) AS pages, APPROX_QUANTILES(total_kb, 1000)[OFFSET(500)] AS median_total_kb, APPROX_QUANTILES(html_kb, 1000)[OFFSET(500)] AS median_html_kb, APPROX_QUANTILES(js_kb, 1000)[OFFSET(500)] A...
<gh_stars>100-1000 ALTER TABLE `ta_user` ADD COLUMN `avatar` varchar(255) NULL COMMENT 'avatar';
<reponame>TheDecker/liquibase-snowflake ALTER TABLE posts ADD CONSTRAINT pk_posts PRIMARY KEY (id) ALTER TABLE posts DROP PRIMARY KEY
delete from tb_ordem_servico_demanda where id_demanda = 440; delete from tb_demanda_servico where id_demanda = 440; delete from tb_demanda where id_demanda = 440; delete from tb_ordem_servico_demanda where id_demanda in (658, 659, 661); delete from tb_demanda_servico where id_demanda in (658, 659, 661); delete from tb...
<reponame>opengauss-mirror/openGauss-graph<filename>src/test/regress/sql/gpi_hw_partition_vacuum_full_01.sql<gh_stars>100-1000 -- -- test vacuum full partition -- --i1. create table create table hw_partition_vacuum_full_partition_table(id int,name text, city text) partition by range(id) ( partition hw_partitio...
<filename>autotrader-parent/install/uploads/tf_autotrader_seek_index_posts.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Хост: localhost -- Время создания: Июл 26 2013 г., 08:03 -- Версия сервера: 5.5.24-log -- Версия PHP: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time...
<filename>raw/IC_Process_Details.sql set head on set array 1 set linesize 30000 set pagesize 50000 set long 100000 set echo on set trimspool on set colsep ';' set numformat 9999999999999999.9999 spool c:\IC_Process_Details.SPL select * from ictm_branch_parameters / select count(*) from ictb_entries ...
<gh_stars>0 ALTER TABLE "public"."facility" ADD COLUMN "hospital_category" text NOT NULL;
<reponame>siyoutechweb/s2c-PROD -- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64) -- -- Host: 172.16.17.32 Database: S2C -- ------------------------------------------------------ -- Server version 8.0.19 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=...
<reponame>DSSG-EUROPE/wef_oceans<filename>sql_scripts/marine_areas_within.sql CREATE SCHEMA world_protected_areas; --Create marine protected areas table (Ia are the most stringent ones) CREATE TABLE world_protected_areas.marine_areas AS SELECT * FROM world_protected_areas.protected_areas WHERE MARINE IN ('1', '2') AND...
SELECT setval('"seq_eg_user"', (SELECT MAX(ID) FROM eg_user ));
SELECT * FROM recipients LEFT JOIN users USING (user_id) WHERE campaign_id = :campaign_id
<gh_stars>1-10 -- Opintopisteet kuukausittain ja vuosittain uusinta luonti USE ANTERO GO IF NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='dw' AND TABLE_NAME='f_virta_otp_opintopisteet_kuukausittain' ) BEGIN CREATE TABLE dw.f_virta_otp_opintopisteet_kuukausittain ( id bigint IDENTITY...
create table ads ( id text primary key not null, html text not null, political integer not null, not_political integer not null, fuzzy_id integer, title text, message text, image text, big_image text ); create index index_ads_on_fuzzy_id on ads(fuzzy_id);
CREATE TABLE TEMP_QUARTER_DX_INFO PARTITION BY LIST(MONTH_ID) (PARTITION M201201 VALUES (201201)) NOLOGGING PARALLEL 4 AS SELECT A.MONTH_ID ,B.IDW_PATIENT_ID ,A.IMS_PAT_NBR ,A.DX_CD ,A.PROCEDURE_CD FROM DX_TRANSACTION_TAB_R1 A INNER JOIN TMP_SCH_PAT_XREF_0415 B ON(A.IMS_PAT_NBR=B.PAT_IDB_COM...
-- 13.12.2016 15:17 -- URL zum Konzept INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,AllowProcessReRun,Classname,CopyFromProcess,Created,CreatedBy,EntityType,IsActive,IsApplySecuritySettings,IsBetaFunctionality,IsDirectPrint,IsOneInstanceOnly,IsReport,IsServerProcess,IsUseBPartnerLanguage,Loc...
<gh_stars>1000+ UPDATE ad_Sysconfig SET value='http://app:8282/api', description='Base URL for the app Server''s REST-API. Used by jasper reports that do not only use SQL, but also API-Responses (JSON).' WHERE name = 'API_URL' ;
<reponame>frederic-junier/DIU /* https://gitlab-fil.univ-lille.fr/diu-eil-lil/portail/-/blob/master/bloc4-5/sql1/Readme.md */
startcode MsSqlServer_OutboxCreateSql declare @tableName nvarchar(max) = @tablePrefix + 'OutboxData'; if not exists ( select * from sys.objects where object_id = object_id(@tableName) and type in (N'U') ) begin declare @createTable nvarchar(max); set @createTable = N' create tab...
<gh_stars>0 create database if not exists glance; GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'GLANCE_DB_PASSWD'; GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'GLANCE_DB_PASSWD';
<filename>src/test/resources/contactData.sql insert into contacts (first, last, number, houseName, address1, town, county, postcode, telephone) values(0,'Alan','South',22,,'L<NAME>ve','London','London','NW3 4JK','0123456789'); insert into contacts (first, last, number, houseName, address1, town, county, postcode, telep...
<gh_stars>0 -- -- Cypher Query Language - DML -- -- prepare DROP TABLE IF EXISTS history; CREATE TABLE history (year, event) AS VALUES (1996, 'PostgreSQL'), (2016, 'Graph'); DROP GRAPH agens CASCADE; CREATE GRAPH agens; -- -- RETURN -- RETURN 3 + 4, 'hello' + ' agens'; RETURN 3 + 4 AS lucky, 'hello' + ' agens' A...
<reponame>elihe999/zabbix_agent2_plugin_example DO LANGUAGE plpgsql $$ DECLARE ver integer; res text; BEGIN SELECT current_setting('server_version_num') INTO ver; IF (ver >= 90600) THEN SELECT row_to_json(T) INTO res from ( SELECT coalesce(extract(epoch FROM max(CASE WHEN state = 'idle in transa...
insert into admin_account values ('admin', crypt('admin', gen_salt('bf', 8)), 'Default', 'Admin'); insert into user_account values ('user', crypt('user', gen_salt('bf', 8)), 'Default', 'User', '+4917123456'); insert into project values ('pizza', 'Pizza Project', 'admin'); insert into ticket(name, summary, description...
<filename>scripts/sql/sqlite3/email_tr.sql ------------------------------message------------------------------ CREATE TRIGGER IF NOT EXISTS message_after_insert AFTER INSERT ON message FOR EACH ROW BEGIN UPDATE timeline_seq SET num = (num + 1); UPDATE history_seq SET num = (num + 1); UPDATE mes...
-- Verify base BEGIN; -- Verify all the tables (and expected columns) are present. SELECT id, authz_id FROM auth_container WHERE FALSE; SELECT id, authz_id FROM auth_actor WHERE FALSE; SELECT id, authz_id FROM auth_group WHERE FALSE; SELECT id, authz_id FROM auth_object WHERE FALSE; SELECT target, authorizee, permis...
<reponame>steve-chavez/supautils select supa.index(array['a','b','c'], 'c'); select supa.index(array[1, 2, 3], 4); select supa.index(array[]::int[], 1); select supa.index(null::int[], 1);
<filename>packs/snowflake_query_pack.sql<gh_stars>100-1000 CREATE OR REPLACE VIEW rules.snowflake_admin_role_grant_monitor_alert_query COPY GRANTS AS SELECT OBJECT_CONSTRUCT('cloud', 'Snowflake', 'account', current_account()) AS environment , ARRAY_CONSTRUCT('snowflake') AS sources , REGEXP_SUBSTR(query_t...
CREATE TABLE `audit_log` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `tb_name` varchar(100) NOT NULL COMMENT '名称', `ref_id` bigint(20) NOT NULL COMMENT '外键id', `content` text NOT NULL COMMENT '内容', `insert_by` varchar(100) DEFAULT NULL COMMENT '操作人', `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP...
<reponame>ivywe/geeklogjapan-ivywe<filename>sql/updates/0.1_to_0.2.sql ALTER TABLE links MODIFY description text; ALTER TABLE stories MODIFY sid varchar(20) DEFAULT '' NOT NULL; ALTER TABLE comments MODIFY sid varchar(20) DEFAULT '' NOT NULL; ALTER TABLE blocks ADD COLUMN blockorder tinyint unsigned DEFAULT 1 NOT NULL;...
<reponame>taritom/bn-api DROP INDEX IF EXISTS index_ticket_types_event_id_name;
<reponame>moisesz01/Cotizador<gh_stars>0 CREATE TABLE IF NOT EXISTS `cliente` ( `id` INT NOT NULL AUTO_INCREMENT, `nombres` VARCHAR(45) NOT NULL, `apellidos` VARCHAR(45) NOT NULL, `ruc` VARCHAR(45) NOT NULL, `direccion` VARCHAR(140) NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- --------------------...
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for user -- ---------------------------- DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户id', `username` varchar(16) NOT NULL COMMENT '用户名', `nickname` varchar(16) ...
--inet_aton_ntoa_select_002.sql SELECT INET_NTOA(167773449); SELECT INET_ATON('10.0.5.9'); select (INET_NTOA(167773449)=('10.0.5.9')); select (167773449=INET_ATON('10.0.5.9')); -- SELECT INET_NTOA(167772170); SELECT INET_ATON('10.0.0.10'); select (INET_NTOA(167772170)=('10.0.0.10')); select (167772170=INET_ATON('10....
<reponame>ExpoSpecial/news.loc -- phpMyAdmin SQL Dump -- version 4.7.3 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Окт 18 2017 г., 00:47 -- Версия сервера: 5.7.19 -- Версия PHP: 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00...
-- -- Первоначальное создание таблиц -- DROP TABLE IF EXISTS resources; CREATE TABLE IF NOT EXISTS resources ( id BIGSERIAL PRIMARY KEY NOT NULL, categoryName VARCHAR (255) availableName VARCHAR (255), localisedName VARCHAR (255), amount INT, sellPrice DOUBLE, sellOffers INT, buyPrice...
CREATE DEFINER = CURRENT_USER TRIGGER `sidiraunt`.`anularExamenesDeObservacion` AFTER UPDATE ON `observacion` FOR EACH ROW BEGIN DECLARE codExamenPostulanteAnulado int; DECLARE var_final INTEGER DEFAULT 0; DECLARE codGrupo INT; DECLARE codObservacion INT; -- EL TRIGGER SE ACTIVA CUANDO SE HACE UN UPDATE EN...
SELECT t1.name, count(*) FROM site as s, so_user as u1, question as q1, answer as a1, tag as t1, tag_question as tq1 WHERE q1.owner_user_id = u1.id AND a1.question_id = q1.id AND a1.owner_user_id = u1.id AND s.site_id = q1.site_id AND s.site_id = a1.site_id AND s.site_id = u1.site_id AND s.site_id = tq1.site_id AND s.s...
<filename>SQL/queries.sql<gh_stars>0 -- All types DROP VIEW IF EXISTS all_lessons; CREATE VIEW all_lessons AS SELECT TO_CHAR(music_lesson.time_start, 'month') AS month, Count(*) AS nr_of_lessons --SELECT EXTRACT(MONTH FROM music_lesson.time_start) AS Month, Count(*) AS nr_of_lessons FROM music_lesson --WHERE EXTRACT(YE...
<reponame>valery1707/test-sorm<gh_stars>0 INSERT INTO conn (ts, uid, id_orig_h, id_orig_h_ip, id_orig_p, id_resp_h, id_resp_h_ip, id_resp_p, proto, service, duration, orig_bytes, resp_bytes, conn_state, local_orig, local_resp, missed_bytes, history, orig_pkts, orig_ip_bytes, resp_pkts, resp_ip_bytes, tunnel_parents, am...
<gh_stars>0 alter table "public"."facility" add constraint "facility_covid_facility_type_fkey" foreign key ("covid_facility_type") references "public"."covid_facility_type" ("key") on update cascade on delete cascade;
<gh_stars>0 CREATE TABLE [Purchasing].[SupplierTransactions] ( [SupplierTransactionID] [int] NOT NULL CONSTRAINT [DF_Purchasing_SupplierTransactions_SupplierTransactionID] DEFAULT (NEXT VALUE FOR [Sequences].[TransactionID]), [SupplierID] [int] NOT NULL, [TransactionTypeID] [int] NOT NULL, [PurchaseOrderID] [int] NULL,...
-- phpMyAdmin SQL Dump -- version 2.10.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 21, 2009 at 07:34 PM -- Server version: 5.0.41 -- PHP Version: 5.2.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `loggix` -- -- -------------------------------------------------------- -...
<gh_stars>1-10 -- -- PostgreSQL database dump -- 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_messages = warning; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF N...
<gh_stars>1-10 INSERT INTO irCMS_i18nKey (i18nName, active, userId) VALUES ('modules.com.IcedReaper.irUser.registration.existing.headline', true, 1); INSERT INTO irCMS_i18nKey (i18nName, active, userId) VALUES ('modules.com.IcedReaper.irUser.registration.existing.message', true, 1); INSERT INTO irCMS_i18nKey (i18nName,...
 create procedure [semanticinsight].[insert_process_data_object_stats] ( @@process_id int, @@data_object_mapping_id int, @@ssis_row_count int ) as begin insert into [semanticinsight].[process_data_object_stats] ([process_id] ,[data_object_mapping_id] ,[ssis_...
CREATE TABLE `datatables_demo` ( `id` int(10) NOT NULL auto_increment, `first_name` varchar(250) NOT NULL default '', `last_name` varchar(250) NOT NULL default '', `position` varchar(250) NOT NULL default '', `email` varchar(250) NOT NULL default '', `office` varchar(250) NOT NULL default '', `start_date` timestamp DEF...
-- file:portals.sql ln:117 expect:true FETCH backward 10 in foo14