sql
stringlengths
6
1.05M
INSERT INTO ${ohdsiSchema}.sec_permission (id, value, description) SELECT ${ohdsiSchema}.sec_permission_id_seq.nextval, 'source:priorityVocabulary:get', 'Get source with highest priority vocabulary daimon' FROM DUAL ; INSERT INTO ${ohdsiSchema}.sec_permission (id, value, description) SELECT ${ohdsiSchema}.sec_permissi...
<reponame>arnouthoebreckx/camel-karavan CREATE TABLE IF NOT EXISTS table1 ( id INT NOT NULL, name varchar(250) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS table2 ( id varchar(250) NOT NULL, name varchar(250) NOT NULL, PRIMARY KEY (id) );
CREATE SERVER test_server_0 FOREIGN DATA WRAPPER fdw1;
SELECT fn_db_change_column_type('vm_dynamic', 'guest_cur_user_name', 'VARCHAR', 'TEXT');
ALTER TABLE `ghost_etl`.`factor_metadata` ADD COLUMN `interval` varchar(10) NOT NULL DEFAULT '1day' COMMENT 'The factor interval' AFTER `trade_type`; ALTER TABLE `ghost_etl`.`factor_metadata` DROP INDEX `symbol`, ADD UNIQUE INDEX `symbol`(`symbol`, `trade_type`, `interval`, `factor_name`) USING BTREE;
CREATE TABLE IF NOT EXISTS `{prefix}newsletter_subscribers` ( `id` int(11) NOT NULL AUTO_INCREMENT, `email` varchar(255) NOT NULL, `confirmed` tinyint NOT NULL Default 0, `subscribe_date` bigint(20) NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1;
<gh_stars>0 drop database if exists bamazon; create database bamazon; use bamazon; create table products ( id integer(10) not null auto_increment, name varchar(100), department varchar(100), price decimal(10, 2), stock integer(10), primary key (id) ); insert into products (name, department, price, stock) values ("Beat...
UPDATE balances SET is_member = 1 WHERE account = '1115podongss'; UPDATE balances SET is_member = 1 WHERE account = '111chaka1111'; UPDATE balances SET is_member = 1 WHERE account = '12354bopfeos'; UPDATE balances SET is_member = 1 WHERE account = '13r3ec5eosda'; UPDATE balances SET is_member = 1 WHERE account = '13tkc...
<reponame>T-R0D/Past-Courses<filename>IS675/In Class Examples/2015_02_10/create-emp1-s15.sql DROP TABLE emp1; CREATE TABLE emp1 ( EmpNo INT NOT NULL, Ename VARCHAR(20), Job VARCHAR(10), Manager INT, HireDate DATETIME, Phone CHA...
USE [VipunenTK_DW] GO /****** Object: View [dbo].[v_f_4_9_Vaestorakenne_kunnittain2] Script Date: 15.4.2020 16:53:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER VIEW [dbo].[v_f_4_9_Vaestorakenne_kunnittain2] AS -- truncate table f_4_9_Vaestorakenne_kunnittain -- insert into f_4_9_Vaestorake...
CREATE TABLE subdivision_EG (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "subdivision_EG" ("id", "name", "level") VALUES (E'EG-DK', E'Dakahlia Governorate', E'governorate'); INSERT INTO "subdivision_EG" ("id", "name", "level") VALUES (E'EG-BA', E'Bahr', E'govern...
-- file:domain.sql ln:334 expect:true create domain dom as integer
-- file:numeric_big.sql ln:434 expect:true INSERT INTO num_exp_mul VALUES (9,9,'3010001475769225.8286280957637941018500905354415197182850820227163907782811814730309044010416886791014702373809932926301368137684091094408663914110947072451332976891128659038142954192986392936981664792370678656287232795203974766040821110221...
TRUNCATE TABLE PROTOCOL_MODULES DROP STORAGE / INSERT INTO PROTOCOL_MODULES (PROTOCOL_MODULE_CODE,DESCRIPTION,UPDATE_USER,UPDATE_TIMESTAMP,OBJ_ID,VER_NBR) VALUES ('001','General Info','admin',SYSDATE,SYS_GUID(),1) / INSERT INTO PROTOCOL_MODULES (PROTOCOL_MODULE_CODE,DESCRIPTION,UPDATE_USER,UPDATE_TIMESTAMP,OBJ_ID,...
<gh_stars>0 START TRANSACTION; INSERT INTO `plugin_base_fields` VALUES (NULL, 'service_service_length', 'backend', 'Services / Service length', 'script', '2018-09-18 09:30:32'); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Service...
USE [mdw] GO IF EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[ssas].[FK_SSASAggregation_SSASPartition]') AND parent_object_id = OBJECT_ID(N'[ssas].[SSASAggregation]')) ALTER TABLE [ssas].[SSASAggregation] DROP CONSTRAINT [FK_SSASAggregation_SSASPartition] GO IF EXISTS (SELECT * FROM d...
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 2017-01-17 09:28:56 -- 服务器版本: 5.7.14 -- PHP Version: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET...
-- Dumping structure for table securitydb.acl_class DROP TABLE IF EXISTS `acl_class`; CREATE TABLE IF NOT EXISTS `acl_class` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `class` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `unique_uk_2` (`class`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=la...
<filename>src/main/resources/Solution_627.sql<gh_stars>1-10 # Write your MySQL query statement below update salary set sex = case sex when 'm' then 'f' else 'm' end /*todo case when 语法可以多看看*/
<reponame>oscarevillagrana/PostgreSQL-Database-Toolbox<gh_stars>1-10 /* Assignment 8 <NAME> CS 150A, Spring 2020 */ /* Query 0 */ USE bookstore; /* Query 1 */ -- Write a SELECT statement that returns these columns: -- The count of the number of orders in the ORDERS table -- The sum of the tax_amount column ...
<reponame>bcgov/cas-ciip-portal -- Revert ggircs-portal:computed_columns/application_application_revision_by_string_version_number from pg begin; drop function ggircs_portal.application_application_revision_by_string_version_number(ggircs_portal.application, text); commit;
CREATE FUNCTION func373() RETURNS integer LANGUAGE plpgsql AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE106);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE340);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE98);val:=(SELECT COUNT(*)INTO MYCOUN...
{{ config(enabled=(target.type == 'bigquery' | as_bool()) )}} {% set tests = [ {'field': 'a.b', 'expected': ('a.b', 'a_b')}, {'field': ('a', 'A'), 'expected': ('a', 'A')} ] %} with prep as ( {% for test in tests %} {%- set actual = snowplow_utils.get_field_alias(field=test.field)-%} {%- set expected = test.e...
{% macro get_accounts_columns() %} {% set columns = [ {"name": "_fivetran_deleted", "datatype": "boolean"}, {"name": "account_id", "datatype": dbt_utils.type_float()}, {"name": "accountnumber", "datatype": dbt_utils.type_string()}, {"name": "general_rate_type", "datatype": dbt_utils.type_string()}, ...
-- New configuration option to allow serial partitioning to use run_maintenance() instead of creating next partition via trigger. -- Use "p_use_run_maintenance" argument to create_parent() to set this during partition creation. -- part_config table has new boolean column "use_run_maintenance" -- Serial/ID b...
use olas; ALTER TABLE `announcement` CHANGE `anou_name` `anou_title` VARCHAR(255) NOT NULL; ALTER TABLE `announcement` ADD `anou_type` VARCHAR(100) NOT NULL AFTER `anou_cname`; ALTER TABLE `announcement` CHANGE `anou_cname` `anou_cname` VARCHAR(100) NOT NULL; CREATE TABLE `Department_archive` ( `depta_id` int(11) NO...
PG_FUNCTION_INFO_V1(funcname);
<gh_stars>0 ------------------------------ -- Archivo de base de datos -- ------------------------------ INSERT INTO productos ("denominacion", "categoria_id", "precio") VALUES ('Tornillo', 1, 1.20), ('Chapa', 2, 1.30); INSERT INTO fabricados ("id", "ancho", "alto") VALUES (2, 1, 3); CREATE EXTENSION pgcrypt...
--+ holdcas on; --Test print_authorizations() methods on db_authorizations call login('dba') on class db_user; call add_user('test_user') on class db_user; create class t1(a int); grant select on t1 to test_user; grant update on t1 to test_user; grant delete on t1 to test_user; grant alter on t1 to test_user; call cha...
<reponame>Zhaojia2019/cubrid-testcases --SERVER create class t(i int, multiset_col multiset(int)); insert into t values (1, {0, 1}); insert into t values (2, {0, 2}); delete t1 from t, table(multiset_col) as t1(a); delete t from t, table(multiset_col) as t1(a); select * from t order by 1; drop class t;
create database ci_database; use ci_database; create table estudiantes( id int(10) not null auto_increment primary key, nombre varchar(100) not null, apellidos varchar(100) not null, curp varchar(100) not null, genero varchar(20), direccion varchar(100), numerointerno int(10), numeroexterno int(10), telefono...
<filename>Assets/schema.sql DROP DATABASE IF EXISTS ems_db; CREATE DATABASE ems_db; USE ems_db; CREATE TABLE department( d_id INT AUTO_INCREMENT PRIMARY KEY, departmentName VARCHAR(30) ); CREATE TABLE roles( r_id INT AUTO_INCREMENT PRIMARY KEY, role_title VARCHAR(30) NOT NULL, salary DECIMAL (...
 CREATE PROC [dbo].[uspIssueTypeDelete] @IssueTypeID uniqueidentifier AS SET NOCOUNT ON SET XACT_ABORT ON BEGIN TRAN DELETE FROM [dbo].[IssueType] WHERE [IssueTypeID] = @IssueTypeID COMMIT
<reponame>TodorChapkanov/CSharp-Databases-Basics---MS-SQL<gh_stars>0 CREATE FUNCTION ufn_GetSalaryLevel(@Salary DECIMAL(18,4)) RETURNS VARCHAR(10) AS BEGIN DECLARE @SalaryLevel VARCHAR(10); SET @SalaryLevel = CASE WHEN @Salary < 30000 THEN 'Low' ...
<reponame>qiwi/seal_replication_node_server<gh_stars>0 INSERT INTO sys_replication_log ( replication_code, replication_start_date, replication_end_date, replication_max_date, replication_days_interval ) ( SELECT {{replicationTypeQuoted}}, replication_start_date, now(), ...
<gh_stars>0 -- Enable pgcrypto for passwords CREATE EXTENSION IF NOT EXISTS pgcrypto;
<gh_stars>0 - -- Database: `project_task_manager` -- -- -------------------------------------------------------- -- -- Table structure for table `pt_projects` -- CREATE TABLE `pt_projects` ( `id_project` int(11) NOT NULL, `project_name` varchar(158) NOT NULL, `project_status` tinyint(4) NOT NULL DEFAULT '1' CO...
DROP TABLE IF EXISTS locations; CREATE TABLE locations ( search_query VARCHAR(255), formatted_query VARCHAR(255), latitude NUMERIC(20, 14), longitude NUMERIC(20, 14) ); INSERT INTO locations(search_query, formatted_query, latitude, longitude) VALUES('Amman', 'Jordan', 35521, 2253);
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...
insert into department (name) values ("Operations"), ("Human Resources"), ("Finance"), ("Technology"), ("Marketing") ; insert into role (title, salary, department_id) values ("CEO", 500000, 1), ("CPO", 250000, 2), ("CFO", 250000, 3), ("CTO", 250000, 4), ("CMO", 250000, 5), (...
<gh_stars>1-10 ALTER TABLE recall ADD COLUMN dossier_target_date DATE;
<gh_stars>10-100 -- file:alter_table.sql ln:946 expect:true alter table atacc1 drop d
<filename>misc/db_update_20220215.sql CREATE TABLE IF NOT EXISTS `cc_repository_webhooks` ( `rw_key` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, `r_key` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, `u_key` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, `rw_url` varchar(255) COLLATE utf8mb4_unicode_ci...
<reponame>sy3kic/nZEDb ALTER TABLE release_naming_regexes MODIFY COLUMN group_regex VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'This is a regex to match against usenet groups'; ALTER TABLE release_naming_regexes MODIFY COLUMN regex VARCHAR(5000) NOT NULL DEFAULT '' COMMENT 'Regex used for extracting name from subject'; A...
<reponame>hhudson/code_standard_tracking create or replace trigger eba_stds_users_bd before delete on eba_stds_users for each row declare pragma autonomous_transaction; begin -- Disallow deletes to a user's own record unless last one. if v('APP_USER') = upper(:old.username) then for c1 in ( ...
<reponame>forgottenlands/ForgottenCore406 INSERT INTO `instance_encounters` (`entry`, `creditEntry`, `lastEncounterDungeon`, `comment`) VALUES (1056, 43438, 0, 'Corborus'), -- The Stonecore (1057, 42333, 320, '<NAME> '), (1059, 43214, 0, 'Slabhide'), (1058, 42188, 0, 'Ozruk'), (1051, 39625, 0, 'General Umbris'), -- Gr...
ALTER TABLE rpt.payout_state ALTER COLUMN ext_payout_id TYPE BIGINT USING ext_payout_id::bigint; ALTER TABLE rpt.invoice ALTER COLUMN party_id DROP NOT NULL; ALTER TABLE rpt.payment ALTER COLUMN party_id DROP NOT NULL; ALTER TABLE rpt.refund ALTER COLUMN party_id DROP NOT NULL;
<gh_stars>1-10 ## 题目标签对应关系 #macro($getByQuestionId(questionId)) SELECT * FROM question_2_tag WHERE question_id = :questionId #end ## 题目标签对应关系 #macro($mgetByQuestionIds(questionIds)) SELECT * FROM question_2_tag WHERE question_id in (:questionIds) #end
<reponame>MCZbase/DDL CREATE UNIQUE INDEX "DEACCESSION_INDEX1" ON "DEACCESSION" ("DEACC_NUMBER")
<reponame>wangyeweikuer/spark<gh_stars>1-10 --IMPORT try_arithmetic.sql
-- migrations/1614027664-transfer_validator_v1.sql -- :up ALTER TYPE transaction_type ADD VALUE IF NOT EXISTS 'transfer_validator_stake_v1';
insert into plugin values ('11111111', 'piflowexternal.jar', 'ON','','');
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; SELECT uuid_generate_v4(); create table post ( id uuid DEFAULT uuid_generate_v4 () , message text not null, timestamp timestamp not null, CONSTRAINT post_pkey PRIMARY KEY (id) )
<gh_stars>1-10 create or replace function live.upsert_account( p_external_provider_id live.account.external_provider_id%TYPE , p_remote_service_name live.account.remote_service_name%TYPE , p_remote_service_account_name live.acc...
CREATE DATABASE todo; CREATE TABLE todo_list( todo_id SERIAL PRIMARY KEY, description VARCHAR(255) );
<filename>database/seeds/sql_dump/countries-old.sql INSERT INTO `countries` (`id`, `sortname`, `name`, `phonecode`, `sort_order`, `created_at`, `updated_at`) VALUES (1, 'AF', 'Afghanistan', '93', 6, NULL, NULL), (2, 'AL', 'Albania', '355', 6, NULL, NULL), (3, 'DZ', 'Algeria', '213', 6, NULL, NULL), (4, 'AS', 'American...
<reponame>AbeEveland/Smash_Combos<gh_stars>0 TRUNCATE TABLE "Characters" , "Combos", "Comments", "ComboVotes", "CommentVotes", "Users" RESTART IDENTITY; INSERT INTO "Users" ("DisplayName", "Email", "HashedPassword", "Admin") VALUES ('Kento', '<EMAIL>', "AQAAAAEAACcQAAAAELnyllU/dSbBi8scfIUQXNJO/FI3DlnFtGoXYU34FakP8...
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versi server: 10.4.17-MariaDB - mariadb.org binary distribution -- OS Server: Win64 -- HeidiSQL Versi: 11.2.0.6213 -- -----------------------------------------------...
<reponame>Daniel-Tilley/College<gh_stars>0 create or replace function scoreless (sno TAKES_MODULE.STUDENTNO%type, mcode TAKES_MODULE.MODULE_CODE%type) return boolean is cur_no TAKES_MODULE.STUDENTNO%type; cur_score TAKES_MODULE.SCORE%type; begin select STUDENTNO into cur_no from TAKES_MODULE where MODULE_CODE ...
CREATE TABLE `users` ( `id` bigint(20) UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, `login` varchar(60) NOT NULL DEFAULT '', `password` varchar(255) NOT NULL DEFAULT '', `display_name` varchar(250) NOT NULL DEFAULT '', `email` varchar(100) NOT NULL DEFAULT '', `activation_key` varchar(255) NOT NULL DEFAULT...
<filename>application/baseMihaja/view.sql /*dose_rquests; +----+------------+---------+------------+----------+ | id | date | user_id | vaccine_id | quantity | vaccines; +----+--------------+ | id | nom | users; +----+------------------+----------+---------+-----------+ | id | email | pas...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:3306 -- Tiempo de generación: 05-07-2020 a las 00:21:23 -- Versión del servidor: 8.0.13 -- Versión de PHP: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
SELECT --col.TABLE_CATALOG AS [Database], --col.TABLE_SCHEMA AS Owner, --col.TABLE_NAME AS [Object], [col].[COLUMN_NAME] AS [Column], [col].[ORDINAL_POSITION] AS [Position], [col].[DATA_TYPE] AS [Data Type], CASE [col].[CHARACTER_MAXIMUM_LENGTH] WHEN ISNULL([col].[CHARACTER_MAXIMUM_LENGTH],...
CREATE DATABASE IF NOT EXISTS BooleanAvengers; USE BooleanAvengers; CREATE TABLE IF NOT EXISTS User ( github_id varchar(100) NOT NULL, is_admin BOOLEAN NOT NULL, PRIMARY KEY (github_id) ); CREATE TABLE IF NOT EXISTS Quiz ( id int(11) NOT NULL auto_increment, category varchar(100) NOT NULL, le...
<gh_stars>1-10 INSERT INTO batch (id, kjoredato) VALUES (nextval('batch_seq'), TO_TIMESTAMP('06-01-2021', 'DD-MM-YYYY SS:MS')), (nextval('batch_seq'), TO_TIMESTAMP('29-01-2021', 'DD-MM-YYYY SS:MS')), (nextval('batch_seq'), TO_TIMESTAMP('26-02-2021', 'DD-MM-YYYY SS:MS')), (nextval('batch_seq'), TO_T...
-- file:rules.sql ln:332 expect:true insert into rtest_t4 select * from rtest_t9 where a < 20
-- original: lock7.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test CREATE TABLE t1(a, b) ;BEGIN ;BEGIN ;PRAGMA lock_status ;PRAGMA lock_status ;PRAGMA lock_status ;PRAGMA lock_status ;COMMIT;
-- 2020-03-09T16:37:37.910Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Trl SET Name='Stammdaten Mutationsprotokoll',Updated=TO_TIMESTAMP('2020-03-09 18:37:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='de_CH' AND AD_Process_ID=540627 ; -- 2020-03-09T16:37:40.123Z...
-------------------------------------------------------- -- DDL for Index SYS_C007175 -------------------------------------------------------- CREATE UNIQUE INDEX "PRMSADMIN"."SYS_C007175" ON "PRMSADMIN"."RESOURCES" ("RESID") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 104...
create table IF NOT EXISTS author ( author_id int8 generated by default as identity, name varchar(255) not null , birthday date not null, date_of_death date, primary key (author_id) ); create table IF...
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table t_competitions ( id bigint not null, name varchar(255), number_of_questions integer, number_of_players integer, current_...
CREATE FUNCTION dblink_slot_create_or_drop( arg_connection_string TEXT, arg_slot_name TEXT, arg_action TEXT ) RETURNS VOID LANGUAGE plpgsql AS $$ DECLARE l_slot_existence_query TEXT := format('SELECT TRUE FROM pg_catalog.pg_replication_slots WHERE slot_name = %L', arg_slot_name); l_slot_action_query...
<reponame>ueshin/dbt-databricks {% macro current_catalog() -%} {{ return(adapter.dispatch('current_catalog', 'dbt')()) }} {% endmacro %} {% macro databricks__current_catalog() -%} {% call statement('current_catalog', fetch_result=True) %} select current_catalog() {% endcall %} {% do return(load_result('c...
<gh_stars>1-10 -- 创建mysql库 create database `jeecg-boot` default character set utf8mb4 collate utf8mb4_general_ci;
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Хост: localhost -- Время создания: Ноя 04 2018 г., 14:06 -- Версия сервера: 10.1.35-MariaDB -- Версия PHP: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
<gh_stars>0 /* This file creates the views needed by the news database log generator. */ CREATE OR REPLACE VIEW failed_requests_by_date_view AS SELECT DATE(time) AS error_date, COUNT(time) AS num_errors FROM log WHERE status LIKE '4%' OR status LIKE '5%' GROUP BY error_date ORDER BY error...
<gh_stars>0 -- MySQL dump 10.11 -- -- Host: localhost Database: irm -- ------------------------------------------------------ -- Server version 5.0.95 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CON...
<filename>scripturi/make_col_capital_case.sql CREATE OR REPLACE PROCEDURE make_col_capital_case ( table_name VARCHAR2, col_name VARCHAR2 ) IS dml_str VARCHAR2(32767); BEGIN dml_str := 'UPDATE ' || table_name || ' SET ' || col_name || ' = initca...
-- +migrate Up CREATE TABLE IF NOT EXISTS `user_book_items` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `user_id` bigint(20) NOT NULL, `book_id` bigint(20) NOT NULL, `status` varchar(255) NOT NULL, `progress_rate` float NOT NULL, `urgency` int(11) NOT NULL, `priority` int(11) NOT NULL, `...
USE sql_hr; SELECT e.employee_id, e.first_name, m.first_name AS manager FROM employees e JOIN employees m ON e.reports_to = m.employee_id; SELECT e.employee_id, e.first_name, m.first_name AS manager FROM employees e LEFT JOIN employees m ON e.reports_to = m.employee_id;
-- Show current board state EXEC Life.ShowGame 1 -- Iterate EXEC Life.IterateGame 1 -- Uncomment bellow line if you want to run above code 50 times in a row -- Each iteration will be a separate resultset --GO 50
/* SQLyog Ultimate v11.11 (32 bit) MySQL - 5.6.16 : Database - my_api ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KE...
SELECT ISNULL(SUM(p.Price * op.Quantity), 0 ) AS [Parts Total] FROM Parts AS p full JOIN OrderParts AS op ON op.PartId = p.PartId full JOIN Orders AS o ON op.OrderId = o.OrderId WHERE DATEDIFF(WEEK, o.IssueDate, '2017-04-24') <= 3
<gh_stars>0 insert into osm_base_timestamp (id, ts) values (?, ?) ON CONFLICT (id) DO UPDATE SET ts = excluded.ts
<reponame>fauzipurwanto/laravel -- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 20, 2021 at 02:42 PM -- Server version: 10.4.18-MariaDB -- PHP Version: 8.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40...
<filename>hasura/migrations/default/1617904332300_alter_table_public_socle_competency_add_column_alpha_full_rank/up.sql<gh_stars>0 alter table "public"."socle_competency" add column "alpha_full_rank" text not null;
<filename>pgsql/init/init.sql /* create table */ create table country_groups_ja ( id serial primary key, label varchar(2) not null unique, created_at timestamp not null default current_timestamp, updated_at timestamp not null default current_timestamp ); create table countries_ja ( id serial prima...
<reponame>CommerceRack/backend alter table WHOLESALE_SCHEDULES change CODE CODE varchar(4) default '' not null;
INSERT INTO `tableA` ( cola, colb, created_at, updated_at, lock_version ) VALUES (/*cola*/0, /*colb*/'', /*created_at*/current_timestamp, /*updated_at*/current_timestamp, 0 ) ON DUPLICATE KEY UPDATE colb=VALUES( colb ), updated_at=current_timestamp, lock_version=COALESCE( lock_version , 0 ) + 1
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 11, 2016 at 01:10 AM -- Server version: 5.5.52-0ubuntu0.14.04.1 -- PHP Version: 5.6.23-1+deprecated+dontuse+deb.sury.org~trusty+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /...
--- Database: Redshift --- SQL Script to filter out customers for the analysis --- We create a new table called excluded customers which has all the customer ids --- of the customers to be ignored for the analysis. --- creating the table create table tuscany.excluded_customers( customer_id text ); --- Step 1: St...
create view "postgres"._airbyte_test_normalization."pos_dedup_cdcx_ab1__dbt_tmp" as ( -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select jsonb_extract_path_text(_airbyte_data, 'id') as "id", jsonb_extract_path_text(_a...
DROP PROCEDURE [dbo].[BugNet_Bug_GetBugsByVersion] GO DROP PROCEDURE [dbo].[BugNet_Bug_GetBugsAssignedTo] GO DROP PROCEDURE [dbo].[BugNet_Bug_GetBugsByPriority] GO DROP PROCEDURE [dbo].[BugNet_Bug_GetBugsByComponent] GO DROP PROCEDURE [dbo].[BugNet_Bug_GetBugsByType] GO DROP PROCEDURE [dbo].[BugNe...
<reponame>dram/metasfresh<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5575960_sys_gh10446_AD_Column_IsRangeFilter_drop_DDL.sql SELECT '5575960_sys_gh10446_AD_Column_IsRangeFilter_drop_DDL.sql - Not dropping the column yet, because it is still present in ...
CONCEPT_ID CONCEPT_NAME CONCEPT_LEVEL CONCEPT_CLASS VOCABULARY_ID CONCEPT_CODE VALID_START_DATE VALID_END_DATE INVALID_REASON CONCEPT_ID_1 DOMAIN_NAME 40664728 Documentation of diagnosis of chronic kidney disease 1 HCPCS 5 G8771 30-OCT-11 31-DEC-99 40664728 Condition 2617866 Documentation of new diagnosis of initial o...
-- ************************************************** -- *** Update station / monitored entity details -- ************************************************** USE [EPACentral_Aquarius] USE [EPACentral_Aquarius] SELECT DISTINCT STA.Station_Name , STA.EdenNationalCode , MON.MonEnt_Code , BOD.River_Code...
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for t_deptment_0 -- ---------------------------- DROP TABLE IF EXISTS `t_deptment_0`; CREATE TABLE `t_deptment_0` ( `id` bigint(20) NOT NULL COMMENT '主键(采用雪花算法)', ...
\c stock_db CREATE OR REPLACE FUNCTION FN_GET_SWAPS(detail_part_name text) RETURNS TABLE (part_name text) AS $$ BEGIN RETURN QUERY SELECT s.destination_detail FROM t_swaps s WHERE s.source_detail = detail_part_name; END $$ LANGUAGE PLPGSQL; GRANT EXECUTE ON FUNCTION FN_GET_SWAPS(text) TO d...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Dec 02, 2018 at 11:22 PM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40...
drop procedure if exists ui_get_subsystems_list; delimiter $$ create procedure ui_get_subsystems_list() main_sql: begin select ssys_id, subsystem_name, callback_information, send_callbacks, fixed, allow_list_users from subsystems; end $$...