text
stringlengths
1
1.05M
CREATE PROCEDURE [Data_Load].[GetCommitmentStatistics] AS WITH TA_CTE AS ( SELECT CommitmentID, PaymentStatus FROM [Data_Load].[Das_Commitments] WHERE IsLatest = 1 ) SELECT ( SELECT COUNT(CommitmentID) FROM TA_CTE WHERE PaymentStatus <> 'Deleted' ) AS TotalApprenticeships, ( SELECT COUNT(CommitmentID) FROM T...
/* Copyright 2019 New Vector Ltd * * 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://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 02, 2019 at 07:36 PM -- Server version: 10.3.15-MariaDB -- 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 @O...
DROP TABLE IF EXISTS events; DROP TABLE IF EXISTS locations; DROP TABLE IF EXISTS users; CREATE TABLE users( id SERIAL PRIMARY KEY, username VARCHAR(255), password VARCHAR(255), constraint usernameunique UNIQUE(username) ); CREATE TABLE locations( id SERIAL PRIMARY KEY, formatted_query VARCHAR(40), latit...
/*==============================================================*/ /* DBMS name: MySQL 5.0_qb */ /* Created on: 2011-05-11 22:45:06 */ /*==============================================================*/ /* drop table if exists RM_AFFIX; */ /* drop index ...
running recipe recipe finished -- -- PostgreSQL database dump -- -- Dumped from database version 9.6.1 -- Dumped by pg_dump version 9.6.1 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...
ALTER TABLE "stream_voice_stream" DROP COLUMN uri;
-- In Spring Boot using Spring Data, we use ~/src/main/resources/data.sql to seed data. -- We no longer have to use ~/src/main/resources/database/h2/calendar-data.sql to seed data. -- New Calendar Users --------------------------- -- Password for user1 was 'user1' insert into calendar_users(id, email, password, first...
-- phpMyAdmin SQL Dump -- version 4.7.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Apr 01, 2019 at 09:29 AM -- Server version: 5.7.19 -- PHP Version: 7.1.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
SELECT count(distinct ws1.ws_order_number) as order_count, sum(ws1.ws_ext_ship_cost) as total_shipping_cost, sum(ws1.ws_net_profit) as total_net_profit FROM web_sales ws1 JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk) JOIN web_site s ON (ws1.ws_web_site_sk = s.web_sit...
drop table if exists top_genre1; create temp table top_genre1 as select genre1, count(genre1) from movies_analytical_table2 group by genre1 having count(genre1)>50 order by count(genre1) desc; select a.*, b.genre1 as top_genre1 from movies_analytical_table2 as a left join top_genre1 as b on a.genre1=b.genre1;
BEGIN; -- -- Alter field author on project -- SET CONSTRAINTS "project_author_id_c601d117_fk_accounts_user_id" IMMEDIATE; ALTER TABLE "project" DROP CONSTRAINT "project_author_id_c601d117_fk_accounts_user_id"; ALTER TABLE "project" ADD CONSTRAINT "project_author_id_c601d117_fk_accounts_user_id" FOREIGN KEY ("author_id"...
USE `testdb`; DROP FUNCTION IF EXISTS `irr_secand`; DELIMITER $$ CREATE FUNCTION `irr_secand`( maxiter SMALLINT(5) UNSIGNED, toleps DOUBLE ) RETURNS DOUBLE DETERMINISTIC BEGIN -- Internal Rate of Return (IRR) by applying the -- Secand Method as root-finding algorithm -- -- Parameters: ...
CREATE TABLE subdivision_PL (id VARCHAR(6) NOT NULL, name VARCHAR(255) NOT NULL, level VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; INSERT INTO `subdivision_PL` (`id`, `name`, `level`) VALUES ('PL-WP', 'Voivodato della Grande Polonia', 'voivodship'); INSERT...
PRAGMA foreign_keys=off; BEGIN TRANSACTION; DROP TABLE IF EXISTS `usage_reactions_archive`; CREATE TABLE `usage_reactions_archive` ( `user` TEXT NOT NULL, `server` TEXT NOT NULL, `channel` TEXT NOT NULL, `messages_reacted_count` INTEGER DEFAULT 0, `user_reacted_count` INTEGER DEFAU...
USE SnakesAndLadder; drop procedure if exists CheckUserLogin; DELIMITER // SET autocommit = 0; CREATE PROCEDURE CheckUserLogin(pName varchar(50), pPassword varchar(50)) begin declare lcOkPasswordCount int; declare lcUserNameCount int; declare lcLoginAttempts int; DECLARE exit handler for sqlexception BEGIN ...
-- values to consider renaming: -- mrr -- dmrc -- dtcv -- tcv -- uom WITH source AS ( SELECT * FROM {{ source('zuora', 'discount_applied_metrics') }} ), renamed AS( SELECT id AS discount_applied_metrics_id, --keys accountid ...
-- -- Table structure for table `catalog_categories` -- DROP TABLE IF EXISTS `catalog_categories`; CREATE TABLE `catalog_categories` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `category_id` int(10) unsigned NOT NULL DEFAULT '0', `level` int(10) unsigned NOT NULL DEFAULT '0', `uri` varchar(255) COLLATE ut...
DROP DATABASE IF EXISTS employee_tracker_db; -- Created the DB "wizard_schools_db" (only works on local connections) CREATE DATABASE employee_tracker_db; -- Use the DB wizard_schools_db for all the rest of the script USE employee_tracker_db; -- Created the table "schools" CREATE TABLE department ( id int AUTO_INCR...
/* Copyright 2021 Snowplow Analytics Ltd. All rights reserved. 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://www.apache.org/licenses/LICENSE-2.0 Unless required by a...
USE ota; DROP PROCEDURE IF EXISTS stopping_candle_from_timeframes; DELIMITER // CREATE PROCEDURE stopping_candle_from_timeframes( IN instrumentId INT UNSIGNED, IN timeframeId INT UNSIGNED, IN startTime DATETIME, -- IN endTime DATETIME, IN distal DECIMAL(9,5), IN bidAsk INT UNSIGNED, IN supplyDema...
create table if not exists `versions` ( `id` int(10) unsigned not null PRIMARY KEY auto_increment, `name` varchar(128) not null default '', `created` timestamp default current_timestamp ) engine = innodb auto_increment = 1 character set utf8 collate utf8_general_ci;
DELIMITER $$ -- -- Procedures -- DROP PROCEDURE IF EXISTS `sp_detailed_fifteenth_analysis_closePrice`$$ CREATE PROCEDURE `sp_detailed_fifteenth_analysis_closePrice` (IN `commodity` VARCHAR(100), IN `daycount` INT, IN `inputprices` TEXT, IN `diff` DOUBLE, IN `page_count` INT, IN `rows_count` INT,IN sell_month_str varch...
-- update module version UPDATE `sys_modules` SET `version` = '1.3.3' WHERE `uri` = 'ads' AND `version` = '1.3.2';
INSERT INTO burgers (burger_name) VALUES ("BBQ Burger"), ("Fried Egg Burger"), ("Blue Cheese Burger");
CREATE TABLE `tl_page` ( `ga_analyticsid` varchar(20) NOT NULL default '' `ga_anonymizeip` char(1) NOT NULL default '', `ga_measurespeed` char(1) NOT NULL default '', `ga_eventtracking` char(1) NOT NULL default '', `ga_externaltracking` char(1) NOT NULL default '', `ga_addlinktracking` char(1) NOT NULL defa...
-- [er]vclass is unupdatable if select using right outer join create class c1 ( id int, id_key int, id_s string ); insert into c1 values( 1, 1, 'test1'); insert into c1 values( 2, 2, 'test2'); insert into c1 values( 3, null, 'test3'); insert into c1 values( 4, null, 'test4'); insert into c1 values( 5, null, 'test5');...
# Account DROP SCHEMA IF EXISTS db_account; CREATE SCHEMA db_account; USE db_account; CREATE TABLE `account_tbl` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `user_id` VARCHAR(255) DEFAULT NULL, `money` INT(11) DEFAULT 0, PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8; INSERT INTO acc...
INSERT INTO department (id, name) VALUES (1,"SALES"), (2,"ACCOUNTING"), (3, "LEGAL"); INSERT INTO role (id, title, salary, department_id) VALUES (1, "Sales Manager", "75000", 1), (2, "Sales Associate", "55000", 1), (3, "Accountant", "90000", 2), (4, "Lawyer", "120000", 3); (5, "Law Mana...
/* * Copyright 2016 SEARCH-The National Consortium for Justice Information and Statistics * * 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://www.apache.org/licenses/LICENSE-...
-- create a table holding all distinct observation points for the species of interest DROP TABLE IF EXISTS bcfishpass.observations; CREATE TABLE bcfishpass.observations ( fish_obsrvtn_pnt_distinct_id integer, linear_feature_id bigint , blue_line_key integer ...
INSERT INTO api_imagemetadatadict VALUES(2,'author','Author associated with this image'); INSERT INTO api_imagemetadatadict VALUES(3,'species','Species associated with this image'); INSERT INTO api_imagemetadatadict VALUES(4,'tissue','Tissue imaged'); INSERT INTO api_imagemetadatadict VALUES(5,'voxel_size_bytes','Size ...
-- SETTINGS SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules'); INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES ('modules', 'bx_albums', '_bx_albums', 'bx_albums@modules/boonex/albums/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1...
-- Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC") -- Copyright (C) 2015-2017 Deutsche Telekom AG. -- Author: Razvan Becheriu <razvan.becheriu@qualitance.com> -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You...
USE T20; INSERT IGNORE INTO jos_dp_common_os_version (id, version_major, version_minor, version_rev, os_name, isenabled, code_name, normalized_version_major, normalized_version_minor, normalized_version_fix, platform_id) VALUES (960500,96,5,0,'Android 5.0',1,'LOLLIPOP',96,5,0,6);
insert into event_map(event_up_name, event_down_name) values('GLUSTER_HOST_ADD_FAILED', 'UNASSIGNED');
-- ============================ -- PRE-REQUISITOS -- ============================ -- Cargar tablas: -- UbigeoTipo -- Ubigeo -- Perfil -- TipoPregunta -- ADMIN do $$ declare p_idubigeo int; declare p_idperfil int; declare p_claveadmin varchar(50); declare p_fechaexpadmin timestamp; declare p_respuestapreguntaadmi...
/* table cc_athlete_sicklecell_waiver */ CREATE TABLE cc_athlete_sicklecell_waiver ( /* core */ id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, cid INT(11) NOT NULL, created_at DATETIME NOT NULL, /* waiver fields */ waive TINYI...
-- -- The MIT License -- Copyright (c) 2011 Kuali Mobility Team -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, c...
drop table context; alter table c_agg rename to context;
alter table ACT_RU_TASK add CATEGORY_ varchar(191); alter table ACT_RU_EXECUTION drop constraint act_ru_execution_proc_def_id__business_key__key; alter table ACT_RE_DEPLOYMENT add TENANT_ID_ varchar(191) default ''; alter table ACT_RE_PROCDEF add TENANT_ID_ varchar(191) default ''; ...
-- -- TCapture rdb_bdr structure rdb schema -- # SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET client_min_mes...
select gufi, "timestamp", route_text, fix_list_values from matm_flight where "timestamp" between :start_time and :end_time and arrival_aerodrome_icao_name = :arrival_airport_icao and route_text is not null order by gufi, "timestamp"
ALTER TABLE `blitems` MODIFY COLUMN `guid` VARCHAR(255) DEFAULT NULL;
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- 主机: localhost -- 生成日期: 2020-04-19 13:03:54 -- 服务器版本: 8.0.18 -- PHP 版本: 7.2.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; -- -- 数据库: `yii2-advanced-template` -- CREATE DATABASE I...
-- Product name migration START TRANSACTION; DELETE FROM ezsite_data WHERE name IN ('ezpublish-version', 'ezplatform-release'); INSERT INTO ezsite_data (name, value) VALUES ('ezplatform-release', '3.0.0'); COMMIT; -- ALTER TABLE ezcontentclass_attribute ALTER COLUMN data_text1 TYPE varchar(255); -- -- ALTER TABLE ezc...
DROP TABLE ips;
-- fts3aj.test -- -- execsql { -- ATTACH DATABASE 'test2.db' AS two; -- SELECT rowid FROM t1 WHERE t1 MATCH 'hello'; -- DETACH DATABASE two; -- } ATTACH DATABASE 'test2.db' AS two; SELECT rowid FROM t1 WHERE t1 MATCH 'hello'; DETACH DATABASE two;
SELECT COUNT(*) FROM tag as t, site as s, question as q, tag_question as tq WHERE t.site_id = s.site_id AND q.site_id = s.site_id AND tq.site_id = s.site_id AND tq.question_id = q.id AND tq.tag_id = t.id AND (s.site_name in ('stackoverflow')) AND (t.name in ('apache-spark','bash','c','class','cocoa','database','numpy',...
drop table if exists PRE_PROCESS_POST_HIST; /*==============================================================*/ /* Table: PRE_PROCESS_POST_HIST */ /*==============================================================*/ create table PRE_PROCESS_POST_HIST ( INDEX_KEY varchar(100) n...
USE delivery; -- SET GLOBAL event_scheduler = ON; -- SHOW PROCESSLIST; DROP EVENT IF EXISTS verifica_vigencia_contrato; CREATE EVENT verifica_vigencia_contrato ON SCHEDULE EVERY 1 HOUR STARTS NOW() DO UPDATE CONTRATOS SET ESTADO = 'VENCIDO' WHERE estado = 'VIGENTE' and fecha_vencimiento < NOW(); -- los contratos acaba...
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 27, 2019 at 03:07 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
select * from ADDRESS where ADDRESS_ID = /* id */0
-- file:json.sql ln:584 expect:true SELECT json_build_array(VARIADIC '{1,2,3,4}'::int[])
-- Copyright 1999 Kevin Closson -- 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://www.apache.org/licenses/LICENSE-2.0 -- Unless required by applicable law or agreed to in writi...
INSERT INTO projeto VALUES ('0','Projeto Festa Junina','RUIM'), ('1','Projeto Valorização das Difere','BOM'), ('2','Projeto Família na Escola','RUIM'), ('3','Projeto Leitura permanente na ','RUIM'), ('4','Projeto Festa Junina','BOM'), ('5','Projeto Civismo se aprende na ','RUIM'), ('6','Projeto Civismo se apren...
[sql] select t0.v1 from t0 where t0.v2 = (select t3.v11 from t3) [result] INNER JOIN (join-predicate [2: v2 = 5: v11] post-join-predicate [null]) SCAN (columns[1: v1, 2: v2] predicate[null]) EXCHANGE BROADCAST ASSERT LE 1 EXCHANGE GATHER SCAN (columns[5: v11] predicate[null])...
-- file:arrays.sql ln:249 expect:true SELECT '{1,null,3}'::int[]
-- file:rowtypes.sql ln:40 expect:true select f1, (q).c1, (qq.q).c1.i from quadtable qq
DROP DATABASE IF EXISTS employee_trackerDB; CREATE database employee_trackerDB; USE employee_trackerDB; CREATE TABLE employee ( id INT NOT NULL AUTO_INCREMENT, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, role_id INT NOT NULL, manager_id INT, INDEX man_id(manager_id), PRIMARY KEY (id...
create view covid19.v_reporte_registro_paciente as SELECT rffsdb.fecha_creacion ,fsdb.nombre ,fsdb.apellido , case fsdb.tipo_documento when '0' then 'Cédula de Identidad' when '1' then 'Pasaporte' end "tipo_documento" , fsdb.numero_documento , fsdb.numero_celular , fsdb.fecha_nacimiento , '' as "estado_civil" , fsdb.d...
SET XACT_ABORT ON begin transaction; INSERT INTO [testdatabase].[dbo].[AGREEMENT4] VALUES (?, 4043, 4, N'PagOvRDn', N'PYydIsuL', N'2016-05-02', N'2016-07-13', N'2016-06-25', N'2016-07-04', N'4027', N'4065'); INSERT INTO [testdatabase].[dbo].[BANK4] VALUES (4489, ?, 4441, 4, N'l', N'NAHJCqkFeaAaqJhG', N'2016-07-14', N'2...
ALTER TABLE `m_loan_repayment_schedule` ADD COLUMN `total_paid_in_advance_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `penalty_charges_waived_derived`, ADD COLUMN `total_paid_late_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `total_paid_in_advance_derived`;
SELECT AREA_CODE, FIRSTNAME, LASTNAME, PHONENUMBER FROM CUSTOMERS_BY_AREA_CODE EMIT CHANGES LIMIT 10;
-- 2018-03-13T14:41:59.171 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Index_Column SET ColumnSQL='COALESCE(M_HU_ID,0)',Updated=TO_TIMESTAMP('2018-03-13 14:41:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Index_Column_ID=540837 ;
insert into t_phone ( sdk,price,Brand, model, memory, color, weight, pattern, origin) values ( 'sdk0000001',5899.00,'华为', 'Mate 20', '16', '黑色', '200', '4G', '东莞'); insert into t_phone ( sdk,price,Brand, model, memory, color, ...
set trimspool on set echo off set feedback off set verify off Clear Screen set linesize 32767 set pagesize 0 set long 200000000 set longchunksize 1000000 set serveroutput on size unlimited format truncated @@lib/RunVars.sql @@lib/mystats/mystats_pkg.sql exec mystats_pkg.ms_start; spool RunAll.log --Global setup @@he...
----------------------------------------------------------------------- -- -- Copyright (C) 2021 CARTO -- ----------------------------------------------------------------------- CREATE OR REPLACE FUNCTION `@@BQ_PROJECTID@@.@@BQ_DATASET_QUADKEY@@.KRING` (quadint INT64, distance INT64) RETURNS ARRAY<INT64> D...
CREATE TABLE [dbo].[Weapons] ( [Id] INT NOT NULL PRIMARY KEY, [Type] INT NOT NULL, [Caliber] INT NOT NULL, [TankId] INT NOt NULL, CONSTRAINT [FK_Tank] FOREIGN KEY ([TankId]) REFERENCES [Tanks]([Id]), )
select toDecimal64(-9223372036854775808, 0);
/** * \file * \brief The CurrentTest_SetTest stored procedure. * \author Chris Oldwood */ if (object_id('ssunit_impl.CurrentTest_SetTest') is not null) drop procedure ssunit_impl.CurrentTest_SetTest; go /** * Stores the details of the currently running test so the framework doesn't * have to pass them 'throug...
insert into C_BPartner_Stats ( C_BPartner_Stats_ID, AD_Client_ID, AD_Org_ID, C_BPartner_ID, Created, CreatedBy, IsActive, Updated, UpdatedBy, ActualLifeTimeValue, SOCreditStatus, SO_CreditUsed, TotalOpenBalance ) select nextval('c_bpartner_stats_seq') as C_BPartner_Stats_ID, bp.AD_Client_ID as AD...
--Create Tables-- IF OBJECT_ID('LKUP_level0', 'U') IS NOT NULL ALTER TABLE FACT_content DROP CONSTRAINT FK_FACT_content_LKUP_level0; IF OBJECT_ID('LKUP_level1', 'U') IS NOT NULL ALTER TABLE FACT_content DROP CONSTRAINT FK_FACT_content_LKUP_level1; IF OBJECT_ID('LKUP_level2', 'U') IS NOT NULL ALTER TABLE FACT_content DR...
CREATE TABLE ids ( id integer ); INSERT INTO ids VALUES (1); INSERT INTO ids VALUES (2); INSERT INTO ids VALUES (3); CREATE INDEX grnindex ON ids USING pgroonga (id); SET enable_seqscan = off; SET enable_indexscan = off; SET enable_bitmapscan = on; SELECT id FROM ids WHERE id <= 2; DROP TABLE ids;
-- This script drops the SQL login created by the scripts. DECLARE @DatabaseName as nvarchar(30); SET @DatabaseName = 'CALI'; DECLARE @AccountName as nvarchar(30); SET @AccountName = '$AccountName'; DECLARE @UseWindowsAuth as bit; SET @UseWindowsAuth = $UseWindowsAuth; -------------------------------...
create table channel ( id integer not null primary key autoincrement, title text not null, url text not null ); create table item ( title text not null, guid text not null, link text, description text, publication_date dat...
-- Tags: distributed SELECT uniq(UserID), uniqIf(UserID, CounterID = 800784), uniqIf(FUniqID, RegionID = 213) FROM remote('127.0.0.{1,2}', test, hits)
-------------------------------------------------------------- -- Properties -------------------------------------------------------------- -- [OptionGroup] MERGE Into [EntityData].[Entity].[OptionGroup] AS Target USING (VALUES (N'3DBC544F-9331-4FB6-B7E0-710162B15E4D', N'Venture Roles', N'Venture Roles', N'VRO')...
-- // CB-13650 Integrate Multi AZ with FreeIPA controller layer -- Migration SQL that makes the change goes here. ALTER TABLE environment ADD COLUMN IF NOT EXISTS freeipaenablemultiaz boolean NOT NULL DEFAULT false; -- //@UNDO -- SQL to undo the change goes here. ALTER TABLE environment DROP COLUMN IF EXISTS freeipa...
CREATE TABLE modifiers ( id SERIAL NOT NULL PRIMARY KEY, displayName TEXT NOT NULL UNIQUE ); INSERT INTO modifiers (displayName) VALUES ('CutClean'), ('Fast Smelting'), ('Beta Zombies'), ('Hasty Boys'), ('Veinminer'), ('Timber');
/* Query para publicar a tabela. Esse é o lugar para: - modificar nomes, ordem e tipos de colunas - dar join com outras tabelas - criar colunas extras (e.g. logs, proporções, etc.) Qualquer coluna definida aqui deve também existir em `table_config.yaml`. # Além disso, sinta-se à vontade para alterar alg...
--! Previous: sha1:77672d2ac143aefed94dc2517a137a0b0469471e --! Hash: sha1:cee93f1d6c8c670fc330af3cfdab7f005913c88b drop type if exists app_public.facility_ranking cascade; create type app_public.facility_ranking as ( rank integer, id integer, value float, tags text[] ); create or replace function app_pu...
WITH RECURSIVE c0(src, trg) AS ((SELECT edge.src, edge.src FROM edge UNION SELECT edge.trg, edge.trg FROM edge UNION SELECT s0.src, s1.trg FROM (SELECT trg as src, src as trg, label FROM edge) as s0, edge s1 WHERE s0.trg = s1.src AND s0.label = language AND s1.label = language UNION SELECT s0.src, s3.trg FROM (SELECT ...
-- Table describing protein - sequence mutations only (no DNA mutations) CREATE TABLE PSM( snp_id INT NOT NULL, locus_id INT NOT NULL, aa_Position INT NOT NULL, residue VARCHAR(128) NOT NULL, wildtype VARCHAR(128) NOT NULL, UNIQUE(snp_id, locus_id, aa_Position, residue, wildtyp...
-- 2015-12-10 ALTER TABLE `share_topic_images` ADD COLUMN `mobile` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否添加手机图' AFTER `basename`; -- 2015-12-17 ALTER TABLE `users` ADD COLUMN `reg_ip` bigint(10) NOT NULL DEFAULT 0 COMMENT '注册ip' AFTER `protected_status`, ADD COLUMN `reg_terminal` tinyint(1) NOT NULL DEFAULT 0 C...
USE unsdg; /* Create a temp_goals_target table based on the goals-targets.csv Since I created mine from scratch and it was "relatively" small, I just used the import wizard on MySQL Workbench */ /* Create Goal Table This uses the temp table created from my custom CSV */ CREATE TABLE goal SELECT DISTIN...
SELECT ROUND(long_w, 4) FROM station WHERE lat_n = ( SELECT MAX(lat_n) FROM station WHERE lat_n < 137.2345);
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Mar 24, 2022 at 06:09 AM -- Server version: 10.4.22-MariaDB -- PHP Version: 7.4.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
create table IF NOT EXISTS messaging ( user_id INTEGER not null primary key autoincrement, username TEXT, firstname TEXT, email TEXT, sender TEXT, recipient int, message TEXT, dateSubmitted DATETIME );
DROP TABLE bms; DROP TABLE inv; DROP TABLE pm; -- Inverter data CREATE TABLE public.inv ( "time" timestamp with time zone, host text COLLATE pg_catalog."default", path text COLLATE pg_catalog."default", ac_temp_filt_10c bigint, avg_temp_filt_10c bigint, date text COLLATE pg_catalog."default", ...
CREATE TABLE IF NOT EXISTS `Roles` ( `id` int auto_increment not null, `name` varchar(100) not null unique, `description` varchar(100) default '', `is_active` TINYINT(1) default 1, `created` timestamp default current_timestamp, `modified` timestamp default current_times...
\set ON_ERROR_STOP on BEGIN; -- demarcation_code | text | not null -- financial_year | integer | not null -- item_code | text | not null -- item_label | text | not null -- amount | bigint | -- id | integer | not null default nextval('badexp_facts_id_seq'::regclas...
/* * @version=1.6RC1-4 * * Stage RC1 for 1.6RC5 upgrade */ UPDATE `%TABLE_PREFIX%config` SET `ostversion`='1.6 RC1-4';
DROP TABLE orgs;
CREATE TABLE /*_*/babel ( -- user id babel_user int UNSIGNED not null, -- language code babel_lang varchar(10) not null, -- level (1-5, N) babel_level VARCHAR(2) NOT NULL, PRIMARY KEY ( babel_user, babel_lang ) ) /*$wgDBTableOptions*/; -- Query all users who know a language at a specific level CREATE INDEX /*i...
CREATE SEQUENCE briana_sequence AS INTEGER START WITH 1000; CREATE TABLE addresses ( id INTEGER GENERATED BY DEFAULT AS SEQUENCE briana_sequence PRIMARY KEY, country VARCHAR(255) NOT NULL, city VARCHAR(255) NOT NULL, postcode VARCHAR(255) NOT NULL ); CREATE TABLE organizations ( id ...
-- Prove that TOP and PERCENT are keywords when babelfishpg_tsql.sql_dialect = tsql SELECT set_config('babelfishpg_tsql.sql_dialect', 'tsql', false); SELECT TOP 5 PERCENT relpages FROM pg_class; CREATE TABLE percent(top int); -- Prove that TOP and PERCENT are not keywords when babelfishpg_tsql.sql_dialect = postgres ...
-- // Copyright 2021. The Tari Project -- // -- // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the -- // following conditions are met: -- // -- // 1. Redistributions of source code must retain the above copyright notice, this list of conditions and ...
CREATE TABLE BPM_CONF_FORM( ID BIGINT NOT NULL, VALUE VARCHAR(200), TYPE INT, ORIGIN_VALUE VARCHAR(200), ORIGIN_TYPE INT, STATUS INT, NODE_ID BIGINT, CONSTRAINT PK_BPM_CONF_FORM PRIMARY KEY(ID), CONSTRAINT FK_BPM_CONF_FORM_NODE FOREIGN KEY(NODE_ID) REFERENCES BPM_CONF_NODE(ID) ); C...
/****** Object: StoredProcedure [dbo].[PostLogEntry] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO create Procedure PostLogEntry /**************************************************** ** ** Desc: Put new entry into the main log table ** ** Return values: 0: success, otherwise, error code * ** Aut...