sql
stringlengths
6
1.05M
<reponame>AlNat/todoit_app CREATE schema IF NOT EXISTS todoit; comment on schema todoit is 'Схема для хранения информации по задачам'; ------------------------------------------ -- Таблица-справочник по статусам задач -- ------------------------------------------ create table IF NOT EXISTS todoit.task_status ( ...
CREATE TABLE Agency( AgencyID INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,AgencyNAME VARCHAR(30) NOT NULL,AgencyADDRESS VARCHAR(30) NOT NULL,AgencyCITY VARCHAR(30) NOT NULL,AgencySTATE VARCHAR(30) NOT NULL,AgencyCOUNTRY VARCHAR(30) NOT NULL,AgencyZIPCODE VARCHAR(30) NOT NULL)
<filename>api/src/main/resources/db/migration/V1.0.2__PEN_MATCH_API.sql CREATE OR REPLACE EDITIONABLE SYNONYM MATCH_CODES FOR "MATCH_CODES"@"PENLINK.WORLD"; CREATE OR REPLACE EDITIONABLE SYNONYM FOREIGN_SURNAMES FOR "FOREIGN_SURNAMES"@"PENLINK.WORLD";
INSERT INTO MEMBER ( CREATED_BY , CREATED_DATE , LAST_MODIFIED_BY , LAST_MODIFIED_DATE , ACCOUNT_NON_EXPIRED , ACCOUNT_NON_LOCKED , CREDENTIALS_NON_EXPIRED , ENABLED , NAME , PASSWORD , USER_ID ) VALUES ( 'SYSTEM' , CURRENT_TIMESTAMP , 'SYSTEM', CURRENT_TIMESTAMP , TRUE , TRUE , TRUE , TRUE , 'admin' , '{bcrypt}$<PASSW...
<gh_stars>1-10 {% macro snowflake__create_table_as(temporary, relation, sql) -%} {% if temporary %} use schema {{ adapter.quote_as_configured(schema, 'schema') }}; {% endif %} {{ default__create_table_as(temporary, relation, sql) }} {% endmacro %} {% macro snowflake__create_view_as(relation, sql) -%} crea...
<filename>tests/sql/fixtures/username_for_id.sql -- :name username_for_id :scalar select username from users where user_id = :user_id
<reponame>connormcd/misc-scripts ------------------------------------------------------------------------------- -- -- PLEASE NOTE -- -- No warranty, no liability, no support. -- -- This script is 100% at your own risk to use. -- ------------------------------------------------------------------------------- select 'c...
<reponame>hiteshramani/Postgres-CUDA<gh_stars>0 -- -- COPY -- -- CLASS POPULATION -- (any resemblance to real life is purely coincidental) -- COPY aggtest FROM '/home/hitesh/Desktop/Project/postgresql-8.2c.23/src/test/regress/data/agg.data'; COPY onek FROM '/home/hitesh/Desktop/Project/postgresql-8.2c.23/src/test/reg...
\connect c3s311a CREATE TRIGGER observations_insert_trigger BEFORE INSERT ON __INSERT_SCHEMA__.observations_table FOR EACH ROW EXECUTE PROCEDURE __INSERT_SCHEMA__.observations_insert_trigger();
<reponame>ivanrk/DB-Basics CREATE DATABASE Minions USE Minions CREATE TABLE Minions ( Id INT PRIMARY KEY, [Name] NVARCHAR(50) NOT NULL, Age INT, ) CREATE TABLE Towns ( Id INT PRIMARY KEY, [Name] NVARCHAR(50) NOT NULL ) ALTER TABLE Minions ADD TownId INT FOREIGN KEY REFERENCES Towns(Id) INSERT INTO Towns (Id, N...
SELECT title,year FROM movies WHERE title LIKE "Harry Potter%"
<reponame>chenjy1991/short-url<filename>short_url.sql /* Navicat Premium Data Transfer Source Server : qq_1c2g Source Server Type : MySQL Source Server Version : 50728 Source Host : 192.168.3.11:3306 Source Schema : short_url Target Server Type : MySQL Target Server Version : 5...
<reponame>LostScream/Livraria-TI<filename>SQLs/Tables/CreditCardCompanhies.sql Create Table If Not Exists CreditCardCompanies( CCC_PK_CompanyId Int Not Null Primary Key Auto_Increment, CCC_STR_CompanyName Varchar(255) Not Null, CCC_BOL_Active TinyInt Not Null Default 1, CCC_DTT_CreateDateTime DateTime n...
<reponame>mikerozendo/Sql-HackerRank --https://www.hackerrank.com/challenges/full-score/problem?isFullScreen=true --TODO select tbl_submissions.hacker_id, max(tbl_hackers.name) from submissions tbl_submissions inner join hackers tbl_hackers on tbl_hackers.hacker_id = tbl_submissions.hacker_id ...
<reponame>FlipsideCrypto/ethereum-models {{ config( materialized = 'view', persist_docs ={ "relation": true, "columns": true } ) }} SELECT block_number, block_timestamp, tx_hash, 'sale' AS event_type, platform_address, platform_name, nft_from_address AS seller_address, nft_t...
function LINE__GET_POINT(p_line sdo_geometry, p_idx pls_integer) return sdo_geometry is func_geometry_error exception; pragma exception_init(func_geometry_error, -20001); type vertex_pair is record (x number, y number); type vertex_hashtable is table of vertex_pair index by pls_integer; t_vertices vertex_h...
<gh_stars>0 # ************************************************************ # Sequel Pro SQL dump # Версия 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Адрес: 127.0.0.1 (MySQL 5.5.42) # Схема: laravel # Время создания: 2017-02-10 15:14:11 +0000 # ***************************************...
<filename>leetcode/problem 181/Oracle/solution 1.sql -- Using INNER JOIN SELECT Name AS "Employee" FROM ( SELECT Emp1.Name AS Name, Emp1.Salary AS Salary, Emp2.Salary AS ManagerSalary FROM Employee Emp1 INNER JOIN Employee Emp2 ON Emp1.ManagerId = Emp2.Id ) WHERE Salary > ManagerSalary;
-- Adapted from https://www.fuzzwork.co.uk/dump/latest/industryActivityProducts.sql.bz2 DROP TABLE IF EXISTS `industryactivityproducts`; CREATE TABLE `industryactivityproducts` ( `typeId` int(11) DEFAULT NULL, `activityId` int(11) DEFAULT NULL, `productTypeId` int(11) DEFAULT NULL, `quantity` int(11) DEFAULT N...
-- my comment Create Procedure P1 AS
<reponame>jamesxuhaozhe/LeetCode-Java-Kotlin SELECT player_id, min( event_date ) AS first_login FROM Activity GROUP BY player_id;
<reponame>Ciloe/geoname<filename>sqitch/deploy/0002_domains.sql<gh_stars>1-10 -- Deploy geoname:0002_domains to pg -- requires: 0001_extensions BEGIN; -- -- Camel Case -- CREATE OR REPLACE FUNCTION public.toCamelCase(TEXT) RETURNS TEXT AS $$ SELECT replace(initcap(regexp_replace(unaccent($1), '[^A-Za-z...
DROP TABLE device_txack;
SELECT HEX(999999999999999999999999999999999999) AS `__aliased--value`
<filename>RealArtists.ShipHub.Database/Tables/AccountSyncRepositories.sql<gh_stars>10-100 CREATE TABLE [dbo].[AccountSyncRepositories] ( [AccountId] BIGINT NOT NULL, [RepositoryId] BIGINT NOT NULL, [RepoMetadataJson] NVARCHAR(MAX) NULL, CONSTRAINT [PK_AccountSyncRepositories] PRIMARY K...
<reponame>ASHD27/JMI-MCA --Problem : Write a pl/sql code to print fibonacci series. declare term integer; term1 integer := 0; term2 integer := 1; n integer; begin n:= :Number_Of_Terms_You_Want; dbms_output.put_line('Fibonacii Series of ' || n || ' terms :'); if...
<reponame>frouioui/tagenal<filename>database/users/init/init_users.sql DROP TABLE IF EXISTS users_lookup; DROP TABLE IF EXISTS user_read; DROP TABLE IF EXISTS user; CREATE TABLE users_lookup ( id INT NOT NULL, keyspace_id VARBINARY(128), PRIMARY KEY(id) ); CREATE TABLE user ( id INT NOT NULL, timestamp BI...
<reponame>wrrnlim/PassMan CREATE TABLE passwords ( site text, username text, password text );
ALTER TABLE `quest_template` ADD `DetailsEmote` int(11) NOT NULL default '0', ADD `IncompleteEmote` int(11) NOT NULL default '0', ADD `CompleteEmote` int(11) NOT NULL default '0';
-- Verify <%- projectName %>:database_functions/verify_policy_not_present on pg begin; select pg_get_functiondef('<%- schemaName %>_private.verify_policy_not_present(text,text)'::regprocedure); rollback;
<gh_stars>0 CREATE ROLE authenticator NOINHERIT LOGIN PASSWORD '<PASSWORD>'; CREATE ROLE web_anon NOLOGIN; GRANT USAGE ON SCHEMA public TO web_anon; ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO web_anon; GRANT web_anon TO authenticator; CREATE ROLE rsd_admin NOLOGIN; ALTER DEFAULT PRIVILEGE...
<reponame>aajjbb/contest-files CREATE TABLE value_table (amount INT); INSERT INTO value_table VALUES (4); INSERT INTO value_table VALUES (6); INSERT INTO value_table VALUES (7); INSERT INTO value_table VALUES (1); INSERT INTO value_table VALUES (1); INSERT INTO value_table VALUES (2); INSERT INTO value_table VALUES (3...
<reponame>think-projects/think-generator<filename>generator-app/src/test/resources/schema-h2.sql<gh_stars>10-100 DROP TABLE IF EXISTS TEST; CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR(255)); insert into TEST(id, name) values (1,'1'); insert into TEST(id, name) values (2,'1'); insert into TEST(id, name) values (3...
<gh_stars>1-10 -- Is updated every time the schema changes create sequence if not exists graphql.seq_schema_version as int cycle; -- Tracks the most recently built schema version -- Contains 1 row create table graphql.schema_version(ver int primary key); insert into graphql.schema_version(ver) values (nextval('graphql...
-- -- El contenido de este fichero se cargará al arrancar la aplicación, suponiendo que uses -- application-default ó application-externaldb en modo 'create' -- -- Usuario de ejemplo con username = b y contraseña = aa INSERT INTO user(id,enabled,username,password,roles,first_name,last_name) VALUES ( 1, 1, 'a', ...
<reponame>goldmansachs/obevo-kata CREATE PROCEDURE SP905(OUT MYCOUNT INTEGER) SPECIFIC SP905_130460 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE296;SELECT COUNT(*)INTO MYCOUNT FROM TABLE487;SELECT COUNT(*)INTO MYCOUNT FROM TABLE3...
<reponame>lovelace-edu/lovelace /* This source code file is distributed subject to the terms of the GNU Affero General Public License. A copy of this license can be found in the `licenses` directory at the root of this project. */ create table if not exists users ( id serial primary key, username text not null...
set define off set verify off set feedback off WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK begin wwv_flow.g_import_in_progress := true; end; / -- AAAA PPPPP EEEEEE XX XX -- AA AA PP PP EE XX XX -- AA AA PP PP EE XX XX -- AAAAAAAAAA PPPPP EEEE ...
<reponame>clouserw/olympia<filename>migrations/88-charities.sql CREATE TABLE `charities` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, `created` datetime NOT NULL, `modified` datetime NOT NULL, `name` varchar(255) NOT NULL, `url` varchar(200) NOT NULL, `paypal` varchar(255) NOT NU...
select date_add('2000-01-01 00:00:00.0', INTERVAL 1 MILLISECOND); select date_add('2000-01-01 00:00:00.0', INTERVAL 0 MILLISECOND); select date_add('2000-01-01 00:00:00.0', INTERVAL 3000 MILLISECOND); select date_add('2000-01-01 00:00:00.0', INTERVAL 1000*60*60 MILLISECOND); select date_add('2000-01-01 00:00:00.0', INT...
/* Aula 6 - Date Manipulation Language (DML) - Linuguagem de Manipulação de Dados Link videoaula → https://www.youtube.com/watch?v=9rxD_Tt-DwY */ DROP DATABASE IF EXISTS aula_banco; -- se existir elimine aula_banco CREATE DATABASE aula_banco; -- criar aula_banco USE aula_banco; -- selecionar aula_banco CREATE ...
Insert into ADMI_PROVINCIA values ('2','BOLIVAR','SIERRA','1','ACTIVO'); Insert into ADMI_PROVINCIA values ('3','CAÑAR','SIERRA','1','ACTIVO'); Insert into ADMI_PROVINCIA values ('4','CARCHI','SIERRA','1','ACTIVO'); Insert into ADMI_PROVINCIA values ('5','COTOPAXI','SIERRA','1','ACTIVO'); Insert into ADMI_PROVINCIA val...
DELETE FROM public."User_previous" WHERE user_id=/* userprevious.getUserId() */'01';
-- INSERT INTO USER (ID, USERNAME, PASSWORD, EMAIL, ADDRESS, PROVIDER, ENABLED) -- VALUES (1, 'admin', '$2a$08$lDnHPz7eUkSi6ao14Twuau08mzhWrL4kyZGGU5xfiGALO/Vxd5DOi', '<EMAIL>', 'seoul', 'GENERAL', 1); -- INSERT INTO USER (ID, USERNAME, PASSWORD, EMAIL, ADDRESS, PROVIDER, ENABLED) -- VALUES (2, 'user', <PASSWORD>$08$Uk...
USE [ANTERO] GO /****** Object: StoredProcedure [dw].[p_lataa_varda_koodistot] Script Date: 30.7.2018 14:37:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dw].[p_lataa_varda_koodistot]') AND type in (N'P', N'PC')) BEGIN EXEC db...
--SELECT * --FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS --where INFORMATION_SCHEMA.TABLE_CONSTRAINTS.TABLE_SCHEMA = 'workflow' -- and INFORMATION_SCHEMA.TABLE_CONSTRAINTS.CONSTRAINT_TYPE = 'FOREIGN KEY' begin tran ALTER TABLE [workflow].[ExecutedCommand] DROP CONSTRAINT [FK_ExecutedCommand_taskId_TaskInstance] ALTER ...
/* * Make new scan container parent table for inheritance */ CREATE TABLE scan_container ( container_id BIGINT NOT NULL AUTO_INCREMENT, last_review_date BIGINT DEFAULT NULL, PRIMARY KEY (container_id) ); /* * Move data from pull requests to parent container */ INSERT INTO scan_container (container_id, last_re...
CREATE TABLE IF NOT EXISTS `user_agents` ( `browser_version` TEXT NOT NULL, `browser` TEXT NOT NULL, `os_version` TEXT NOT NULL, `os` TEXT NOT NULL, `ua` TEXT NOT NULL, `browserstack` INTEGER NOT NULL, PRIMARY KEY( `browser_version`, `browser`, `os_version`, `os`, `ua` ) );
<filename>DotNetNote/DotNetNote.SqlServer/dbo/Stored Procedures/LogManager/GetLogsWithPaging.sql<gh_stars>1-10 CREATE PROCEDURE [dbo].[GetLogsWithPaging] @PageIndex int = 0, -- @PageIndex : 페이지 인덱스 : 0, 1, 2, ... @PageSize int = 10 -- @PageSize : 한 페이지에 표시할 레코드 수 AS Select [RowNumbers], [Id], [Note], ...
-- file:numeric_big.sql ln:1259 expect:true WITH t(x, bc_result) AS (VALUES ('9.0e-1', -1.0000000000000000), ('6.0e-1', -.3979400086720376), ('3.0e-1', -.1549019599857432), ('9.0e-8', -.000000039086505130185422), ('6.0e-8', -.000000026057669695925208), ('3.0e-8', -.000000013028834652530076), ('9.0e-15', -.0000000000000...
-- STUDIO PAGE & WIDGET UPDATE `sys_std_widgets` SET `cnt_notices`='a:4:{s:6:"module";s:11:"bx_channels";s:6:"method";s:18:"get_widget_notices";s:6:"params";a:0:{}s:5:"class";s:6:"Module";}' WHERE `module`='bx_channels';
<gh_stars>100-1000 /* 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 à vonta...
create table if not exists address ( Address_ID int not null primary key, Zip_code int not null, City varchar(80) not null, Region ...
<reponame>Chobischtroumpf/ft_server CREATE DATABASE wordpress; CREATE USER 'wp-user'@'localhost' IDENTIFIED BY 'server'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wp-user'@'localhost'; FLUSH PRIVILEGES;
-- Exported from QuickDBD: https://www.quickdatabasediagrams.com/ -- Link to schema: https://app.quickdatabasediagrams.com/#/d/OYXwQY -- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here. CREATE TABLE `weather` ( `id` SERIAL NOT NULL , `lat` INT NOT NULL , `lon...
<reponame>kefaming/redissiondemo CREATE TABLE `t_serial` ( `serial_id` varchar(16) NOT NULL COMMENT '序列标识', `min_val` bigint(20) DEFAULT '0' COMMENT '最小数值', `max_val` bigint(20) DEFAULT '0' COMMENT '最大数值', `last_val` bigint(20) DEFAULT '0' COMMENT '上次数值', `physical_date` int(11) DEFAULT '0' COMMENT '物理日期', ...
<gh_stars>0 create or alter view chk.vSurebetMirrored as select AMarketId, BMarketId from ( select AMarketId, BMarketId from Surebet union all select BMarketId, AMarketId from Surebet) t
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 04, 2020 at 12:41 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
SELECT /*%expand*/* FROM roles WHERE deleted_at IS NULL /*%if criteria.id != null */ AND role_id = /* criteria.id */1 /*%end*/ /*%if criteria.roleKey != null */ AND role_key = /* criteria.roleKey */'user.editUser' /*%end*/ LIMIT 1
-- complain if script is sourced in psql, rather than via ALTER EXTENSION \echo Use "ALTER EXTENSION ""babelfishpg_common"" UPDATE TO '1.3.0'" to load this file. \quit SELECT set_config('search_path', 'sys, '||current_setting('search_path'), false); CREATE CAST (sys.VARCHAR as pg_catalog.xml) WITHOUT FUNCTION AS IMPL...
-- This SQL code was generated by sklearn2sql (development version). -- Copyright 2018 -- Model : CaretClassifier_svmRadial_pca -- Dataset : BinaryClass_10 -- Database : teradata -- This SQL code can contain one or more statements, to be executed in the order they appear in this file. -- Model deployment code WI...
-- @testpoint: opengauss关键字fortran(非保留),作为同义词对象名,部分测试点合理报错 --前置条件 drop table if exists explain_test; create table explain_test(id int,name varchar(10)); --关键字不带引号-成功 drop synonym if exists fortran; create synonym fortran for explain_test; insert into fortran values (1,'ada'),(2, 'bob'); update fortran set fortran.nam...
-- @testpoint: opengauss关键字cache非保留),作为索引名,部分测试点合理报错 --前置条件,创建一个表 drop table if exists cache_test; create table cache_test(id int,name varchar(10)); --关键字不带引号-成功 drop index if exists cache; create index cache on cache_test(id); --清理环境 drop index cache; --关键字带双引号-成功 drop index if exists "cache"; create index "cache" ...
-- start query 1 in stream 0 using template query1.tpl WITH customer_total_return AS (SELECT sr_customer_sk AS ctr_customer_sk, sr_store_sk AS ctr_store_sk, Sum(sr_return_amt) AS ctr_total_return FROM store_returns, date_dim WHER...
<filename>sql/list_tables.sql SELECT * FROM SYSOBJECTS WHERE XTYPE = 'U' go
<reponame>rochaandre/scripts-oracle-named -- verificar menor data de auditoria: -- SELECT MIN(TIMESTAMP) FROM DBA_AUDIT_TRAIL; declare curdate date; last_archtime date; BEGIN curdate := SYSTIMESTAMP; last_archtime := add_months(curdate, -2); -- limpa registros mais velhos que 2 meses -- set last arc...
<gh_stars>0 ALTER TABLE datapoint ALTER COLUMN observation DROP NOT NULL;
-- MySQL dump 10.13 Distrib 5.5.46, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: donate -- ------------------------------------------------------ -- Server version 5.5.46-0ubuntu0.14.04.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CH...
/* -------------------------------------------------------- -- MemberShip Stored Procedure for MySQL -------------------------------------------------------- */ CREATE DATABASE IF NOT EXISTS ms; USE ms; DELIMITER ;; /* -------------------------------------------------------- -- create_app ------------------------...
<reponame>JM-command/CIE-106 -- A -- SELECT ENom, DNom FROM tblEmployes E INNER JOIN tblDepartements D ON D.DNo = E.DNo WHERE D.DNom = 'Vente' ORDER BY ENom; -- B -- SELECT ENom, DNom FROM tblEmployes E INNER JOIN tblDepartements D ON D.DNo = E.DNo WHERE EJob = 'Vendeur' ...
-- Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; version 2 of the License. -- -- This program is distributed ...
<filename>Exam_17.02.02019/Exam_17.02.02019/12_Top Students.sql SELECT TOP 10 s.FirstName, s.LastName, CONVERT(DECIMAL(15,2),AVG(se.Grade)) AS [Grade] FROM Students AS s INNER JOIN StudentsExams AS se ON se.StudentId = s.Id GROUP BY s.FirstName, s.LastName ORDER BY AVG(se.Grade) DESC, FirstN...
<reponame>navikt/lydia-api alter table virksomhet add column navn varchar not null default '';
<gh_stars>0 create table datasets ( id uuid primary key default gen_random_uuid() , category_id uuid references categories (id) not null , geography_id uuid references geographies (id) not null , name epiphet default null , name_long text default null , unique(geography_id, name) , unique(geography_id, name_lo...
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.1.19-MariaDB - mariadb.org binary distribution -- Server OS: Win32 -- HeidiSQL Version: 9.4.0.5125 -- ------------------------------------------------...
SELECT COUNT(*) FROM (SELECT term FROM frequency WHERE docid = '10398_txt_earn' and count = 1 UNION SELECT term FROM frequency WHERE docid ='925_txt_trade' and count = 1);
<reponame>AlexRogalskiy/DevArtifacts<gh_stars>1-10 CREATE TABLE tbl ( id INT(11) NOT NULL AUTO_INCREMENT, name TINYTEXT NOT NULL, PRIMARY KEY (id) ); INSERT INTO tbl VALUES (NULL, 'Процессоры'); INSERT INTO tbl VALUES (NULL, 'Материнские платы'); INSERT INTO tbl VALUES (NULL, 'Видеоадаптеры'); SELECT * FROM tbl;
drop table if exists MB_EXCHANGE_TRAN_TYPE; /*==============================================================*/ /* Table: MB_EXCHANGE_TRAN_TYPE */ /*==============================================================*/ create table MB_EXCHANGE_TRAN_TYPE ( TRAN_TYPE varchar(10) no...
create table admin_type ( admin_type_id UNIQUEIDENTIFIER NOT NULL CONSTRAINT admin_type_pk PRIMARY KEY, admin_type_name VARCHAR(100) NOT NULL, create_datetime DATETIME2 NOT NULL DEFAULT CURRENT_TIMESTAMP ); create table role_admin_type ( role_id UNIQUEIDENTIFIER NOT...
<gh_stars>1-10 CREATE TABLE BackOrderAllocation ( -- Back Order Allocation involves Purchase Order Item that is part of Purchase Order that has Purchase Order ID PurchaseOrderItemPurchaseOrderID BIGINT NOT NULL, -- Back Order Allocation involves Purchase Order Item that is for Product that has Product ID Pur...
\t on select * from pa_values; select i.symbol, s.series_date, s.updated_at from series s, instruments i where s.updated_at > '2020-12-05 00:00:00' and i.id = s.instrument_id order by s.updated_at desc limit 1; select count(*) series from series; select i.symbol, s.trade_date, s.updated_at from trades s, instruments i ...
-- file:plpgsql.sql ln:2495 expect:true create function for_vect() returns void as $proc$ <<lbl>>declare a integer
<gh_stars>10-100 USE lahmansbaseballdb; DELIMITER $$ CREATE PROCEDURE insertallstarfull( IN inplayerid varchar(9), IN inyearid smallint, IN ingamenum smallint ) BEGIN DECLARE EXIT HANDLER FOR 1062 BEGIN SELECT CONCAT('Duplicate key (',inplayerid,',',inyearid,',',ingamenum,') occurred') AS message; END; IN...
create or replace view CardActivatedAbilityJoin as select concat(cwp.cardName, ' ', aa.activatedabilityid) as abilityKey, cwp.*, aa.*, ability_cmc + card_cmc as combined_cmc, ability_hasx | card_hasx as combined_hasx, ability_isblack | card_isblack as combined_isblack, ability_isblue | card_isblue as ...
<gh_stars>1-10 -- MySQL dump 10.13 Distrib 5.5.43, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: speedment_stat -- ------------------------------------------------------ -- Server version 5.5.43-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHA...
drop procedure read_result_set();
CREATE TABLE Student ( ID integer, Name varchar(50), Sport varchar (50), PRIMARY KEY (ID,Name) ); INSERT INTO Student (ID, Name,Sport) VALUES(10,'<NAME>','Tennis');
<reponame>Traffika/fractribution # Copyright 2021 Google LLC.. # # 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 applic...
<reponame>pdv-ru/ClickHouse<filename>tests/queries/0_stateless/01213_point_in_Myanmar.sql SELECT pointInPolygon((97.66905, 16.5026053), [(97.66905, 16.5026053), (97.667878, 16.4979175), (97.661433, 16.4917645), (97.656745, 16.4859047), (97.656745, 16.4818029), (97.658796, 16.4785801), (97.665535, 16.4753572), (97.6708...
<filename>migrations/2018-12-07-133026_modify_code_check/up.sql ALTER TABLE series DROP CONSTRAINT series_code_check, ADD CONSTRAINT series_code_check CHECK (code ~* '^[a-z0-9]+(-[a-z0-9]+)*$');
DROP TABLE IF EXISTS `salary_employer`; CREATE TABLE `salary_employer` ( `id` bigint unsigned AUTO_INCREMENT NOT NULL COMMENT 'id', `name` char(255) NOT NULL COMMENT '单位名称', `create_time` datetime NOT NULL COMMENT '创建时间', `update_time` datetime COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE (`name`) ...
-- @testpoint: opengauss关键字Collation(保留),作为索引名,部分测试点合理报错 --前置条件,创建一个表 drop table if exists Collation_test; create table Collation_test(id int,name varchar(10)); --关键字不带引号-合理报错 drop index if exists Collation; create index Collation on Collation_test(id); --关键字带双引号-成功 drop index if exists "Collation"; create index "C...
CREATE TABLE produto ( idproduto INTEGER NOT NULL IDENTITY , nome VARCHAR NOT NULL , unidade VARCHAR NOT NULL DEFAULT un , valor DOUBLE NOT NULL , saldo INTEGER NOT NULL DEFAULT 0 , PRIMARY KEY(idproduto)); GO CREATE TABLE pais ( idpais INTEGER NOT NULL IDENTITY , nome VARCHAR NOT NULL...
SELECT DEPT, COUNT(NOME) AS "Quantidade Funcionário" FROM empr GROUP BY DEPT ORDER BY COUNT(NOME) DESC;
ALTER TABLE posts ALTER COLUMN user_id DROP NOT NULL;
<reponame>anbya/contohUploadKeGit<filename>backoffice/file/IBIP0706190943.sql<gh_stars>0 INSERT INTO pos_itemtemp VALUES("IBIPT190000077","193028","191001","192003","43000","1","43000","0","43000","1","1","1","IBIP0706190943","NHO2018000009","PAID","","193028"), ("IBIPT190000078","193027","191001","192003","43000","1",...
CREATE TABLE [dbo].[AcademicYear] ( [Id] INT IDENTITY(1,1) NOT NULL, [Name] NVARCHAR(50) NOT NULL, [Year] INT NOT NULL, [StartDate] DATETIME NOT NULL, [EndDate] DATETIME NOT NULL, [CreatedOn] DATETIME2 NOT NULL DEFAULT getutcdate(), [CreatedBy] NVARCHAR(50) NULL, [ModifiedOn] DATETIME2 NULL, [Mod...
<reponame>bluengreen/nextjs-opinionated-hasura alter table "public"."users" drop column "oauth_id" cascade;
CREATE VIEW dbo.V_Customer AS SELECT C.CustomerKey, DATEDIFF(year, C.BirthDate, GETDATE()) AS Age, C.MaritalStatus, C.Gender, C.YearlyIncome, C.TotalChildren, C.NumberChildrenAtHome, C.Education, C.HouseOwnerFlag, C.NumberCarsOwned, S.Consumption FROM dbo.DimCustomer AS C INNER JOIN ...
<gh_stars>1-10 INSERT INTO product VALUES('P1234', 'iPhone 6s', 800000, '1334X750 Renina HD display, 8-megapixel iSight Camera','Smart Phone', 'Apple', 1000, 'new', 'P1234.png'); INSERT INTO product VALUES('P1235', 'LG PC gram', 1500000, '3.3-inch,IPS LED display, 5rd Generation Intel Core processors', 'Notebook', 'LG'...