text
stringlengths
1
1.05M
-- randexpr1.test -- -- db eval {SELECT t1.f+coalesce((select t1.b-13-(coalesce((select 17 from t1 where b>a),13)*11)-t1.c from t1 where 11 between t1.a and -13+t1.f*~coalesce((select max(b-f) from t1 where t1.a<=13 or a not in (13,f,17)),b) or (t1.d<19 or b> -t1.c)),b) FROM t1 WHERE 11 not between d and coalesce((se...
SELECT name FROM songs; SELECT name FROM songs ORDER BY(tempo); SELECT name FROM songs ORDER BY(duration_ms) DESC LIMIT 5; SELECT name FROM songs WHERE danceability > 0.75 AND energy > 0.75 AND valence > 0.75; SELECT AVG(energy) FROM songs; SELECT name FROM songs WHERE artist_id = (SELECT id FROM artists...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 09, 2020 at 07:10 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
-- Deploy cd_comment_status BEGIN; CREATE TYPE cd_comment_status AS ENUM('draft', 'published'); COMMIT;
-- -- Copyright (c) 2011-2016 University of Texas at Austin. All rights reserved. -- -- $COPYRIGHT$ -- -- Additional copyrights may follow -- -- This file is part of PerfExpert. -- -- PerfExpert is free software: you can redistribute it and/or modify it under -- the terms of the The University of Texas at Austin Resea...
select type || ' ' || name as resource, case when ((arguments -> 'instance_options' ->> 'are_legacy_imds_endpoints_disabled') is not null and (arguments -> 'instance_options' ->> 'are_legacy_imds_endpoints_disabled')::boolean) then 'ok' else 'alarm' end as status, name || case when ((argum...
-- Version number of the extension release CREATE OR REPLACE FUNCTION cdb_crankshaft_version() RETURNS text AS $$ SELECT '@@VERSION@@'::text; $$ language 'sql' STABLE STRICT; -- Internal identifier of the installed extension instence -- e.g. 'dev' for current development version CREATE OR REPLACE FUNCTION _cdb_crank...
INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003171','apollo-config-service','刘一鸣','liuym@ctrip.com'); INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003172','apollo-admin-service','宋顺','song_s@ctrip.com'); INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('100003173','a...
CREATE TABLE public.author ( id integer NOT NULL, name text NOT NULL ); CREATE SEQUENCE public.author_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER SEQUENCE public.author_id_seq OWNED BY public.author.id; ALTER TABLE ONLY public.author ALTER COLUMN ...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 29-04-2021 a las 22:19:35 -- Versión del servidor: 10.4.13-MariaDB -- Versión de PHP: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
-- -- ER/Studio 8.0 SQL Code Generation -- Company : unam.fi -- Project : modelo-global.DM1 -- Author : rho -- -- Date Created : Sunday, January 17, 2021 23:03:23 -- Target DBMS : Oracle 11g -- -- -- TABLE: AUTO_F3_EFM_S2 -- CREATE TABLE AUTO_F3_EFM_S2( AUTO_ID NUMBER(10, 0) ...
CREATE TABLE hb_workers( hb_worker_id INTEGER PRIMARY KEY, executor_class VARCHAR(255), last_run INTEGER, next_run INTEGER, properties TEXT );
prompt LOAD DATA @data/oehr_countries.sql @data/oehr_customers.sql @data/oehr_departments.sql @data/oehr_employees.sql @data/oehr_inventories.sql @data/oehr_job_history.sql @data/oehr_jobs.sql @data/oehr_locations.sql @data/oehr_order_items.sql @data/oehr_orders.sql @data/oehr_product_descriptions.sql @data/oehr_produ...
CREATE TABLE IF NOT EXISTS `sys_admin` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', `login_mode` INT UNSIGNED NOT NULL COMMENT '登录类型(1:database, 2:ldap)', `sys_role_id` BIGINT UNSIGNED NOT ...
set serveroutput on declare max_sal number; min_sal number; avg_sal number; cursor c is select max(t_salary), min(t_salary), avg(t_salary) from teacher; begin open c; fetch c into max_sal, min_sal, avg_sal; dbms_output.put_line('Maximum Salary: ' || max_sal); dbms_output.put_line('Minimum Salary: ' ...
/* */ @reports/reports_header @reports/db_version set termout off column cols_agg new_value cols_agg SELECT case when to_number('&db_version') < 11 then 'wm_concat(column_name || decode(c.descend, ''DESC'', c.descend))' else 'listagg(column_name || decode(c.descend, ''DESC'', c....
-- pull inquiry_referral data SELECT * FROM ((SELECT id AS source_id, form_data::jsonb -> 6 ->> 'value' AS form_referral_source FROM client_referrals WHERE form_data::jsonb -> 6 ->> 'name' = 'referralSource') UNION (SELECT id, form_data::jsonb -> 7 ->> 'value' AS referral_source FROM client_refe...
ALTER TABLE IDN_OAUTH_CONSUMER_APPS ADD COLUMN APP_STATE VARCHAR(25) DEFAULT 'ACTIVE'; DROP INDEX IF EXISTS IDX_IOAT_AT; CREATE INDEX IDX_AT ON IDN_OAUTH2_ACCESS_TOKEN(ACCESS_TOKEN); ALTER TABLE SP_APP ADD COLUMN ENABLE_AUTHORIZATION CHAR(1) DEFAULT '0'; ALTER TABLE SP_INBOUND_AUTH ADD COLUMN INBOUND_CONFIG_TYPE VARC...
/* Description: Retrieve the staging table of Nautilus SDGs for upntb Target: Oracle Author: Alex Felmeister <felmeistera@email.chop.edu> */ select sdg.sdg_id as "sdg_id", sdg.name as "sample_subject_id", sdg.external_reference as "external_reference", usdg.u_collect...
/* Enter your query here. */ SELECT ROUND(SUM(LAT_N), 2), ROUND(SUM(LONG_W), 2) FROM STATION;
SELECT tab0.v1 AS v1 , tab4.v5 AS v5 , tab3.v4 AS v4 , tab2.v3 AS v3 , tab1.v2 AS v2 FROM (SELECT obj AS v1 FROM wsdbm__follows$$1$$ WHERE sub = 'wsdbm:User4960711' ) tab0 JOIN (SELECT sub AS v1 , obj AS v2 FROM wsdbm__likes$$2$$ ) tab1 ON(tab0.v1=tab1.v1) JOIN (SELECT obj AS v3 , sub AS v2 ...
SELECT tab0.v1 AS v1 , tab4.v5 AS v5 , tab5.v6 AS v6 , tab3.v4 AS v4 , tab2.v3 AS v3 , tab1.v2 AS v2 FROM (SELECT obj AS v1 FROM wsdbm__friendOf$$1$$ WHERE sub = 'wsdbm:User4992' ) tab0 JOIN (SELECT sub AS v1 , obj AS v2 FROM wsdbm__likes$$2$$ ) tab1 ON(tab0.v1=tab1.v1) JOIN (SELECT obj AS v3...
CREATE TABLE memos ( id integer, content text ); INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); SET enable_seqscan = on; SET enable_indexscan = ...
-- 문제12 - EMP 테이블에서 사원명, 입사일 조회 -- 단 입사일은 년도와 월을 분리 추출해서 출력 SELECT ENAME 사원명, EXTRACT(YEAR FROM HIREDATE) AS 입사년도, EXTRACT(MONTH FROM HIREDATE) 입사월 FROM EMP;
INSERT INTO instance(nom) VALUES ('A-n39-k05'); INSERT INTO point(pointtype, x, y, ninstance) VALUES (1, 9, 35, (SELECT id FROM instance WHERE nom = 'A-n39-k05')); INSERT INTO depot(id) VALUES (SELECT id FROM point WHERE x=9 AND y=35 AND ninstance = (SELECT id FROM instance WHERE nom = 'A-n39-k05')); INSERT INTO ...
DELETE FROM BASI_070 rc -- capa de roteiro --SELECT * FROM BASI_070 rc -- capa de roteiro WHERE rc.NIVEL='1' AND rc.GRUPO IN ( SELECT r.REFERENCIA FROM basi_030 r -- referência WHERE r.NIVEL_ESTRUTURA = 1 AND r.RESPONSAVEL IS NOT NULL AND r.REFERENCIA like 'A%' AND r.COLECAO IN (9, 10, 11, 12, 16, 17...
--liquibase formatted sql --changeset gabriel:Payment-loaddata-dml context:test INSERT INTO Payment (customer_order_id, payment_status) VALUES (1, 0); INSERT INTO Payment (customer_order_id, payment_status) VALUES (2, 1);
-- SQL IN Operator SELECT * FROM students WHERE subject IN('Games', 'Animation'); -- SQL NOT IN Operator SELECT * FROM students WHERE subject NOT IN('Games', 'Animation'); -- SQL BETWEEN Operator SELECT * FROM results WHERE mark BETWEEN 50 AND 59; -- CASE statement SELECT id, subject, numbers, CASE WH...
drop materialized view if exists ofec_sched_e_aggregate_candidate_mv_tmp; create materialized view ofec_sched_e_aggregate_candidate_mv_tmp as with records as ( select cmte_id, s_o_cand_id as cand_id, s_o_ind as support_oppose_indicator, rpt_yr, rpt_tp, memo_cd, ...
--CREATION DE TOUTES LES TABLES NECESSAIRES DANS LE MODELE-- CREATE TABLE IF NOT EXISTS timezone( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, timezone VARCHAR(100) NOT NULL, pays INTEGER NOT NULL, code_du_pays_ou_de_la_region VARCHAR(100) NOT NULL, FOREIGN KEY (pays) REFERENCES pays(id) ); CREATE TABLE IF NOT ...
CREATE EXTENSION IF NOT EXISTS pgcrypto; ALTER TABLE "public"."tenant" ADD COLUMN "id" uuid NOT NULL UNIQUE DEFAULT gen_random_uuid();
-- This SQL code was generated by sklearn2sql (development version). -- Copyright 2018 -- Model : CaretRegressor_glmnet -- Dataset : RandomReg_100 -- Database : mssql -- This SQL code can contain one or more statements, to be executed in the order they appear in this file. -- Model deployment code WITH linear_in...
-- Your SQL goes here CREATE TABLE players ( id SERIAL PRIMARY KEY, tournament_id INT NOT NULL REFERENCES tournaments (id) ON DELETE NO ACTION, joueurs_id VARCHAR NOT NULL, first_name VARCHAR NOT NULL, last_name VARCHAR NOT NULL, country VARCHAR NOT NULL, rati...
alter table gx_user_account add oid_namespace integer; alter table gx_user_account add constraint gx_user_account_namespace_fkey foreign key (oid_namespace) references gx_namespace(oid) on delete set null on update cascade;
insert into operation_type values (1, 2, 'COMPRA A VISTA'); insert into operation_type values (2, 1, 'COMPRA PARCELADA'); insert into operation_type values (3, 0, 'SAQUE'); insert into operation_type values (4, 0, 'PAGAMENTO');
CREATE TABLE `outfits` ( `idSteam` varchar(255) NOT NULL, `dad` int(11) NOT NULL DEFAULT '0', `mum` int(11) NOT NULL DEFAULT '0', `dadmumpercent` int(11) NOT NULL DEFAULT '0', `skinton` int(11) NOT NULL DEFAULT '0', `eyecolor` int(11) NOT NULL DEFAULT '0', `acne` int(11) NOT NULL DEFAULT '0', `skinprobl...
-- PUBLIC.SEATA_STATE_INST definition CREATE CACHED TABLE "PUBLIC"."SEATA_STATE_INST"( "ID" VARCHAR NOT NULL COMMENT 'id', "MACHINE_INST_ID" VARCHAR NOT NULL COMMENT 'state machine instance id', "NAME" VARCHAR NOT NULL COMMENT 'state name', "TYPE" VARCHAR COMMENT 'state type', "SERVICE_NAME" VARCHA...
DROP DATABASE IF EXISTS `custom_shirt`; CREATE DATABASE `custom_shirt` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `custom_shirt`; -- -------------------------------------------------------- -- -- Structure de la table `bouton` -- CREATE TABLE `bouton` ( `id_bouton` int(5) NOT NULL, `stock` int(4) NOT NULL...
-- Run "heroku pg:psql < database/heroku-setup.sql" DROP TABLE IF EXISTS test; CREATE TABLE test(name TEXT); INSERT INTO test(name) VALUES ('Alec'),('Shirin'),('Sasha'),('Emily'),('Gabbi'); SELECT * FROM test; DROP TABLE IF EXISTS track; CREATE TABLE track(resource TEXT, behavior TEXT); DROP TABLE IF EXISTS session; ...
CREATE DATABASE IF NOT EXISTS test; USE test; DROP TABLE IF EXISTS test_bind_fetch; CREATE TABLE test_bind_fetch(c1 char(10), c2 text);
 CREATE PROCEDURE [workers].[DumpDataAndWait5] ( @SecondWait TINYINT = 0 ) AS BEGIN SET NOCOUNT ON; DECLARE @Delay VARCHAR(8) SELECT @Delay = '00:00:0' + LEFT(ABS(CAST(CAST(NEWID() AS VARBINARY(192)) AS INT)),1) INSERT INTO [dbo].[DataDump] ( [SomeValue] ) SELECT TOP 1 [stopword] FROM sys.f...
USE AdventureWorks2014 GO SELECT Name FROM Production.ProductSubcategory WHERE ProductCategoryID IN (SELECT ProductCategoryID FROM Production.ProductCategory WHERE Name = 'Bikes') USE AdventureWorks2014 GO SELECT PS.Name FROM Production.ProductSubcategory AS PS INNER JOIN Production.ProductCategory AS P...
-- @testpoint:openGauss关键字character(非保留),同时作为表名和列名带引号,与union结合查询合并两个SELECT 语句查询 --创建表 drop table if exists "character"; create table "character"( c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer, c_real real, c_double real, c_decimal decimal(38), c_number number(38), c_numeric num...
set search_path to raw, stage, working, campaign_finance; show search_path; select * from stage.ethics_report; ------------------------------------------------------------------------------------------------------------------------ -- Inject 2019 contributions... -----------------------------------------------------...
-- boundary3.test -- -- db eval { -- SELECT t1.* FROM t1, t2 WHERE t1.rowid=549755813887 AND t2.a=t1.a -- } SELECT t1.* FROM t1, t2 WHERE t1.rowid=549755813887 AND t2.a=t1.a
prompt prompt ============================== prompt == ANALYZE STD prompt ============================== prompt set echo on timing on exec dbms_stats.gather_table_stats(user, tabname=>'STATSTEST', force=>true, cascade=>true) set echo off
-- 삭제 구문 drop table code; drop sequence code_seq; -- 코드URL 테이블, 시퀀스 create table code( code_no number(19) primary key, code_post_no references post(post_no) unique, code_url varchar2(255) ); create sequence code_seq;
ALTER TABLE `PackageVersions` MODIFY `title` varchar(255) DEFAULT NULL;
update clients set client_month_upload= 0, client_month_download= 0 where server_id=:server_id:;
-- 1. Add new employee to sakila.staff. INSERT INTO sakila.staff (first_name, last_name, address_id, store_id, username) VALUES ('Elon', 'Musk', 5, 2, 'Elon'); -- 2. Insert two new employees to sakila.staff with a single query. INSERT INTO sakila.staff (first_name, last_name, address_id, store_id, username) VALUES ('J...
CREATE TABLE [dbo].[UserRole] ( UserRoleID uniqueidentifier primary key, UserID uniqueidentifier references [User](UserID), RoleID uniqueidentifier references [Role](RoleID) )
# --- !Ups create table "COMPANY" ("ID" BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,"NAME" VARCHAR NOT NULL); create table "COMPUTER" ("ID" BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,"NAME" VARCHAR NOT NULL,"INTRODUCED" BIGINT,"DISCONTINUED" BIGINT,"COMPAN...
select count (*) from ( select t1.l_orderkey, t1.l_linenumber from dfs.`/drill/testdata/partition_pruning/nested/l_3level` t1 where t1.dir0 = 1 and t1.dir1='one' and t1.dir2 = '2015-7-12' and t1.l_orderkey in ( select t2.l_orderkey from dfs.`/drill/testdata/partition_pruning/nested/l_3level` t2 where t2...
{% snapshot orders_snapshot %} {{ config( target_schema='mikew_snapshots', unique_key='promo_id', strategy='timestamp', updated_at='estimated_delivery_at' ) }} SELECT * FROM {{ source('tutorial', 'orders') }} {% endsnapshot %}
-- file:foreign_data.sql ln:780 expect:true ALTER TABLE pt2 ATTACH PARTITION pt2_1 FOR VALUES IN (1)
-- This query demonstrates the use of the RANK function -- Notice the ranks for rows with same key (event_date) are -- ranked equally and the subsequent rank number behaves -- like an identity insert that was rolled back, i.e. gaps -- in the meaningless identifiers that someone (QA) will question ; WITH SQL_SATURDAY (...
CREATE TABLE `productbundleitem` ( `ProductBundleItemID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `ProductBundleID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `ProductID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, PRIMARY KEY (`ProductBundleItemID...
-- CHANGE "NULLABLE" OF "FIELD "tipo_persona_cliente" ---------- ALTER TABLE `cliente_pagador` MODIFY `tipo_persona_cliente` VarChar( 6 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; -- ------------------------------------------------------------- -- CREATE FIELD "giro_mercantil" ------------------------------...
CREATE OR REPLACE VIEW perp.view_amm (symbol, base_symbol, quote_symbol, contract_address, quote_token_decimals, quote_token_address) AS VALUES ('ETH/USDC'::text, 'ppETH'::text, 'USDC'::text, '\x8d22f1a9dce724d8c1b4c688d75f17a2fe2d32df'::bytea, 6::numeric, '\xddafbb505ad214d7b80b1f830fccc89b60fb7a83'::bytea), (...
with user_campaign as ( select * from {{ ref('iterable__user_campaign') }} ), user_event_metrics as ( {%- set user_campaign_columns = adapter.get_columns_in_relation(ref('iterable__user_campaign')) %} select user_email, count(distinct campaign_id) as count_total_campaigns, min(f...
use strixProducts; INSERT INTO products( product_id, product_name, cost ) VALUES ( '0521345', 'web_glance_gander', '50.00' ); INSERT INTO products( product_id, product_name, cost ) VALUES ( '55346', 'web_glance_gaze', '29.99' ); INSERT INTO products( product_id, product_name, cost ) VALUES ( '553163', 'consulting', ...
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 27-02-2019 a las 14:47:21 -- Versión del servidor: 5.6.21 -- Versión de PHP: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
alter table couchdb_progress alter column seq type varchar;
-- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: May 18, 2021 at 08:47 AM -- Server version: 5.7.32 -- PHP Version: 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `gas` -- -- -------------------------------...
-- Copyright 2017 Google Inc. -- -- 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...
select 1 as id union all select * from {{ ref('node_0') }} union all select * from {{ ref('node_3') }} union all select * from {{ ref('node_6') }} union all select * from {{ ref('node_205') }} union all select * from {{ ref('node_251') }} union all select * from {{ ref('node_272') }} union all select * from {{ ref('nod...
--cast TIMESTAMP(L)TZ constant values to collection data types set timezone 'Asia/Seoul'; --test: cast ts constant values to collection types select cast(timestamp'2019-01-02 12:00:01' as set(timestamp)); select cast(timestamp'2019-01-02 12:00:01' as multiset(timestamp with local time zone)); select cast(timestamp'2...
select * from {{ ref('sort_by_calories') }} where type='H'
# Write your MySQL query statement below SELECT SURVEY_LOG FROM ( SELECT   QUESTION_ID AS SURVEY_LOG,    SUM(CASE WHEN ACTION = 'ANSWER' THEN 1 ELSE 0 END)/    SUM(CASE WHEN ACTION = 'SHOW' THEN 1 ELSE 0 END) AS ANSWER_RATIO FROM SURVEY_LOG GROUP BY 1 ORDER BY 2 DESC LIMIT 1    ) AS A
-- Name: Get-SQLOleDbProvider.sql -- Description: Get a list of OLE DB providers along with their properties. -- This query combines the output of sp_MSset_oledb_prop and sp_enum_oledb_providers. -- Requirements: Sysadmin privileges. -- Author: Scott Sutherland, NetSPI 2017 -- Get a list of providers CREATE TABLE #Pr...
CREATE DATABASE oauth2_db WITH ENCODING='utf-8'; GRANT ALL PRIVILEGES ON DATABASE oauth2_db TO postgres;
-- file:jsonb.sql ln:549 expect:true SELECT i FROM jsonb_populate_record(NULL::jsbrec_i_not_null, '{"i": 12345}') q
Use NlsLinks -- Temporarily turn off the autonumber on the primary keys INSERT INTO NlsLinks.Archive.tblRelatedValuesArchive SELECT * FROM [BEE\BASS].NlsLinks.Archive.tblRelatedValuesArchive INSERT INTO NlsLinks.Archive.tblArchiveDescription SELECT * FROM [BEE\BASS].NlsLinks.Archive.tblArchiveDescription
-- 2019-02-27T18:01:31.654 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,Description,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlw...
-- -- Table structure for table `books` -- CREATE TABLE IF NOT EXISTS `books` ( `name` varchar(255) DEFAULT NULL, `author` varchar(255) DEFAULT NULL ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; -- -- Dumping data for table `books` -- INSERT INTO `books` (`name`,`author`) VALUES ('What young India wants...
------------------------------------------------------------------------------- -- expense request ------------------------------------------------------------------------------- CREATE TABLE EXPENSE_REQUEST( ID BIGINT NOT NULL, CODE VARCHAR(100), USER_ID VARCHAR(64), DEPT_CODE VARCHAR(50), ...
/* Navicat MySQL Data Transfer Source Server : wvanheem_core_local Source Server Version : 50509 Source Host : 127.0.0.1 Source Database : core Target Server Version : 50509 File Encoding : utf-8 Date: 06/29/2012 12:43:46 PM */ SET NAMES utf8; SET FOREIGN_KEY_CHECKS = 0; -- ...
create sequence users_id_seq; comment on sequence users_id_seq is '用户 ID 生成序列'; create table users ( id bigint not null constraint users_pk primary key, origin_uid varchar(128), create_time timestamp not null, update_time timestamp not null ); comment on column users....
/*- * ============LICENSE_START======================================================= * feature-state-management * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ==============================================...
-- SGAS PostgreSQL schema -- The schema is not really designed to follow any normal form, though it does -- try to minimize duplicate information by putting out "common" information -- into seperate tables. The schema is a star-schema, which are typically -- fairly good for data mining (but consider using the uraggrega...
if object_id('@vocab_schema.concept', 'U') is not null rename object @vocab_schema.concept to concept_old; if object_id('@vocab_schema.concept_ancestor', 'U') is not null rename object @vocab_schema.concept_ancestor to concept_ancestor_old; if object_id('@vocab_schema.concept_class', 'U') is not null rename object @voc...
-- @testpoint:opengauss关键字comments(非保留),作为字段数据类型(合理报错) --前置条件 drop table if exists comments_test cascade; --关键字不带引号-合理报错 create table comments_test(id int,name comments); --关键字带双引号-合理报错 create table comments_test(id int,name "comments"); --关键字带单引号-合理报错 create table comments_test(id int,name 'comments'); --关键字带反引号...
/* задание 1 выборка единоличных владельцев помещений (доля которых равна 1) с указанием адреса квартиры, которой он владеет*/ SELECT o.fio AS ФИО, a.street AS Улица, a.numbuilding AS Номер_Дома, b.flat AS Кв, b.part AS Часть FROM owners o, adress a, ownership b WHERE a.idbuiding = b.idbuilding AND o.id = b.owner AND b...
INSERT INTO `settings` (`key`, `value`) VALUES ('product_info', '{\"version\":\"8.0.1\", \"code\":\"801\"}'); -- SEPARATOR -- INSERT IGNORE INTO `settings` (`key`, `value`) VALUES ('opengraph', '');
connect alumni create table if not exists users ( user_id int(11) auto_increment, email varchar(100) not null, password varchar(255) not null, full_name varchar(255) not null default '', year_graduated smallint not null, status enum('new', 'active', 'deleted') default 'new', registration_da...
---------------------------------------------------------------------------- -- (c) Copyright IBM Corp. 2007 All rights reserved. -- -- The following sample of source code ("Sample") is owned by International -- Business Machines Corporation or one of its subsidiaries ("IBM") and is -- copyrighted and lice...
/* 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...
-- Fix error consol: Wrong Spell area -- By Mikadmin For ARKania DELETE FROM `spell_area` WHERE `spell` = 58730 AND `area` = 4576; DELETE FROM `spell_area` WHERE `spell` = 58730 AND `area` = 4578; DELETE FROM `spell_area` WHERE `spell` = 58730 AND `area` = 4584; DELETE FROM `spell_area` WHERE `spell` = 58730 AND `area...
-- @testpoint: opengauss关键字remote(非保留),作为同义词对象名,部分测试点合理报错 --前置条件 drop table if exists remote_test; create table remote_test(id int,name varchar(10)); --关键字不带引号-成功 drop synonym if exists remote; create synonym remote for remote_test; insert into remote values (1,'ada'),(2, 'bob'); update remote set remote.name='cici'...
CREATE TABLE entry ( id BIGINT(20) PRIMARY KEY AUTO_INCREMENT, description VARCHAR(50) NOT NULL, due_date DATE, payday DATE, entry_value DECIMAL(10,2) NOT NULL, note VARCHAR(100), type VARCHAR(20) NOT NULL, category_id BIGINT(20) NOT NULL, person_id BIGINT(20) NOT NULL, FOREIGN K...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : lun. 30 mars 2020 à 19:31 -- Version du serveur : 10.4.11-MariaDB -- Version de PHP : 7.2.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
-- -- SELECT -- -- btree index -- awk '{if($1<10){print;}else{next;}}' onek.data | sort +0n -1 -- SELECT * FROM onek WHERE onek.unique1 < 10 ORDER BY onek.unique1; -- -- awk '{if($1<20){print $1,$14;}else{next;}}' onek.data | sort +0nr -1 -- SELECT onek.unique1, onek.stringu1 FROM onek WHERE onek.unique1 < 2...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Tempo de geração: 30-Ago-2021 às 01:48 -- Versão do servidor: 10.4.20-MariaDB -- versão do PHP: 7.3.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
/* MySQL Backup Source Server Version: 5.6.17 Source Database: conforg Date: 12/25/2014 16:21:24 */ USE `conforg_db`; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for `bill_component` -- ---------------------------- ALTER TABLE `bill_component` ADD CONSTRAINT `bill_co...
-- file:regproc.sql ln:38 expect:true SELECT to_regtype('pg_catalog.int4')
DELIMITER $$ CREATE TRIGGER minus_user_counters AFTER DELETE ON school_subjects__users FOR EACH ROW BEGIN DECLARE user_role VARCHAR(255); SET user_role = (SELECT role FROM users WHERE id = OLD.user_id); IF user_role = "TEACHER" THEN UPDATE school_subjects SET teachers_count = teachers_count -...
INSERT INTO userAccount VALUES ( 876543210, 'john@gmail.com', 'password123', TO_DATE('17/12/2015', 'DD/MM/YYYY'), 'M', 1, 4356789044445656 ); INSERT INTO userAccount VALUES ( 483957943, 'adam@gmail.com', 'password123', TO_DATE('02/09/2011', 'DD/MM/YYYY'), 'M', 1, ...
/* Initial database structure. Using PostgreSQL [User Data] accounts players friends towns player_town residences [Neighbour Data] neighbours personalities neighbour_personality [Item ...
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50721 Source Host : localhost:3306 Source Database : guns Target Server Type : MYSQL Target Server Version : 50721 File Encoding : 65001 Date: 2018-06-26 23:10:40 */ DROP DATABASE IF EXISTS guns; CREA...
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 05, 2017 at 07:57 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 7.0.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...