sql stringlengths 6 1.05M |
|---|
<reponame>vireshtripathi/tutor<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 16, 2017 at 07:57 PM
-- Server version: 5.6.14
-- PHP Version: 5.5.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
<reponame>GeoDienstenCentrum/maven-schemaspy-plugin
ALTER SESSION SET "_ORACLE_SCRIPT"=true;
-- USER SQL
-- CREATE USER "SCHEMASPY" IDENTIFIED BY "schemaspy" DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP";
CREATE USER "SCHEMASPY" IDENTIFIED BY "schemaspy" DEFAULT TABLESPACE "USERTBS" TEMPORARY TABLESPACE "TE... |
<reponame>silenc3502/PHPExamples<gh_stars>0
USE publications;
CREATE TABLE classics (
author VARCHAR(128),
title VARCHAR(128),
type VARCHAR(16),
year CHAR(4)) ENGINE MyISAM;
DESCRIBE classics;
|
CREATE PROCEDURE [dbo].[FindByName]
@name NVARCHAR(255)
AS BEGIN
SET NOCOUNT ON;
SET @name = LTRIM(RTRIM(ISNULL(@name, '')))
SELECT Id, Name, Price, Description, IsDiscontinued
FROM Products
WHERE Name = @name
END
|
<gh_stars>0
/*
SQLyog Ultimate - MySQL GUI v8.2
MySQL - 5.1.40-community : Database - toxqwe66
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SE... |
<filename>examples/sql-migrations/clickhouse/00001_create_events_table.sql
-- +goose Up
CREATE TABLE IF NOT EXISTS events (
EventDate Date,
EventTime DateTime,
OsID UInt8
) Engine=MergeTree(EventDate, (EventDate), 8192);
-- +goose Down
DROP TABLE events; |
<reponame>solomonfrank/PropertyPro-Lite<gh_stars>0
CREATE TABLE IF NOT EXISTS
users(
id SERIAL PRIMARY KEY,
firstName VARCHAR(120) NOT NULL,
lastName VARCHAR(120) NOT NULL,
gender VARCHAR (20) NOT NULL,
email VARCHAR(120) UNIQUE NOT NULL,
password VARCHAR(128) NOT NULL,
phoneNumber VARCHAR(120) NOT ... |
<filename>docs/mongo/init.sql
-- 创建数据库
use moji;
-- 创建用户
db.createUser({
user: 'panda',
pwd: '<PASSWORD>',
roles: [{ role: 'dbOwner', db: 'moji' }]
});
-- 切换用户登录
db.auth('panda', 'bamboo');
-- 创建临时测试表
db.createCollection('demo');
-- 插入一条测试数据
db.demo.insert({name: 'demo', desc: '测试建表'});
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 06, 2018 at 07:30 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- file:join.sql ln:457 expect:true
CREATE TEMP TABLE t1 (a int, b int)
|
--
-- Copyright 2009-2015 the original author or authors.
--
-- 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
--
-- Unles... |
BEGIN;
DROP VIEW IF EXISTS summary_by_gene;
DROP VIEW IF EXISTS integration_gene_summary;
DROP VIEW IF EXISTS integration_summary;
DROP VIEW IF EXISTS integration_genes;
DROP VIEW IF EXISTS sample_fields_metadata;
CREATE VIEW integration_genes AS
SELECT integration.*,
ncbi_gene_id ... |
SELECT (SELECT count(*) as document_count
FROM documents d),
(SELECT count(*) AS has_file
FROM documents d
WHERE exists(SELECT df.document_id from documents_files df WHERE df.document_id = d.id)),
(SELECT count(*) AS has_metadata
FROM documents d
WHERE exists(SELE... |
<filename>datas/createTable.sql
-- create table
drop table tbl_word;
create table tbl_word(
id number primary key,
en varchar2(56) not null unique,
cn varchar2(256) not null,
-- 首字母
first char(1),
-- 类别
category varchar2(100)
);
drop sequence word_id;
create sequence word_id start with 100;
-- create
drop t... |
<reponame>liangry/sqlparser<gh_stars>100-1000
UPDATE t1 SET id = next value for sequence1 where name = 'fred' returning id |
SELECT
a.ca_state state,
count(*) cnt
FROM
customer_address a, customer c, store_sales s, date_dim d, item i
WHERE a.ca_address_sk = c.c_current_addr_sk
AND c.c_customer_sk = s.ss_customer_sk
AND s.ss_sold_date_sk = d.d_date_sk
AND s.ss_item_sk = i.i_item_sk
AND d.d_month_seq =
(SELECT DISTINCT (d_month... |
DECLARE @ModuleDefID int
DECLARE @TAB_ID int;
DECLARE @ModuleID int;
IF NOT EXISTS(SELECT * FROM rb_GeneralModuleDefinitions where GeneralModDefID ='504F5B7F-400D-46D4-887A-B03479441E04')
BEGIN
INSERT INTO [rb_GeneralModuleDefinitions]
([GeneralModDefID],[FriendlyName],[DesktopSrc],[MobileSrc],[AssemblyName],[Cl... |
DROP TABLE arbitrary_partitioning;
|
<gh_stars>0
SELECT t1.avg_growth, t1.state_list
FROM (
SELECT
t2.fed_area,
avg(t2.gdp_growth) as avg_growth,
string_agg(t2.state, ',' ORDER BY state) as state_list
FROM us_state as t2
GROUP BY t2.fed_area
) as t1
;
|
set nocount on
if (not exists(select 1
from [sys].[schemas]
where name = '$SchemaName$'))
begin
print 'Schema not found: ' + '$SchemaName$'
return
end
print 'Dropping tables of schema: ' + '$SchemaName$'
--get the schema id by name
declare @schemaId int
set @sch... |
/*
Warnings:
- Added the required column `age` to the `User` table without a default value. This is not possible if the table is not empty.
- Added the required column `pronoun` to the `User` table without a default value. This is not possible if the table is not empty.
*/
-- CreateEnum
CREATE TYPE "Pronoun" AS... |
<filename>fullDB/recall.sql
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
CREATE... |
insert into `users` values (1,'super','<PASSWORD>b360435259648aff4cecb',NULL,1);
insert into `users` values (2,'i_exist_but_am_not_allowed_anything','<PASSWORD>cd<PASSWORD>b360435259648aff4cecb',NULL,0);
insert into admin_sessions (token, user_id, valid_until) values('admin_token', 1, '2222-01-01 00:00:00');
insert int... |
<gh_stars>0
SELECT UnitsInStock, UnitPrice, UnitsInStock*UnitPrice AS TotalPriceNormal, Ceiling(UnitsInStock*UnitPrice) AS TotalPriceRoundUp, FLOOR(UnitsInStock*UnitPrice) AS TotalPriceRoundDown FROM Products ORDER BY TotalPriceNormal DESC |
-- --------------------------------------------------------
-- Host: localhost
-- Server version: 10.4.11-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 9.5.0.5196
-- ------------------------------------------------... |
<reponame>DaoCasino/platform-back<filename>migrations/0008_affiliates_table.up.sql
CREATE TABLE affiliates
(
account_name VARCHAR(13) REFERENCES users(account_name),
affiliate_id VARCHAR NOT NULL
);
CREATE INDEX affiliates_id_idx ON affiliates (affiliate_id);
|
<reponame>25th-floor/ttrack-server
UPDATE periods SET per_comment = 'Neujahr' WHERE per_comment = 'Neujahr (Feiertag)';
UPDATE periods SET per_comment = 'Hl. Drei Könige' WHERE per_comment = 'Heiligen 3 koenige (Feiertag)';
UPDATE periods SET per_comment = 'Ostermontag' WHERE per_comment = 'Ostermontag (FEIERTAG)';
UPD... |
INSERT INTO online_grocery_db.products (id, deleted, description, image_url, product_name, price) VALUES ('101a6f34-2a66-4cab-bde0-3f3dbba24dfc', false, 'Yoghurt Dessert Vereya with Strawberry pieces 2% 290 g', 'http://res.cloudinary.com/mgpavlov/image/upload/v1555026971/z3hka9miakopy76adxjs.jpg', 'Yoghurt', 1.19);
INS... |
CREATE PROCEDURE [procfwk].[CheckForBlockedPipelines]
(
@StageId INT
)
AS
BEGIN
SET NOCOUNT ON;
IF EXISTS
(
SELECT
*
FROM
[procfwk].[CurrentExecution]
WHERE
[StageId] = @StageId
AND [IsBlocked] = 1
)
BEGIN
RAISERROR('Pipelines are blocked. Stopping processing.',16,1);
RETURN 0... |
CREATE TABLE "comments" (
"id" serial NOT NULL PRIMARY KEY,
"comment" text,
"created" timestamp with time zone DEFAULT now() NOT NULL,
"updated" timestamp with time zone DEFAULT now() NOT NULL,
"user_id" integer,
"bug_id" integer
); |
<filename>SQL/02.12/StoredProcedures.sql
select * from mercury.couch_table;
DELIMITER //
CREATE PROCEDURE UpdateCutFabric(IN couch_id int, IN p1id int, IN p2id int)
BEGIN
insert into mercury.couch_cut_fabric_table values (null, p1id, p2id, now());
update mercury.couch_table set couch_table.cut_fabric_id = last_inser... |
<gh_stars>1-10
CREATE ROLE m_user WITH CREATEDB CREATEROLE LOGIN ENCRYPTED PASSWORD '<PASSWORD>';
CREATE DATABASE medical;
ALTER DATABASE medical OWNER TO m_user;
CREATE TABLE "Patients"
(
"id" SERIAL PRIMARY KEY,
"created_at" TIMESTAMP NOT NULL,
"firstname" VARCHAR NOT... |
-- Script to generate Scopus year slices for discipline COMP
\set ON_ERROR_STOP on
\set ECHO all
\set dataset 'comp_':year
\set dataset_pk :dataset'_pk'
\set dataset_index 'comp_':year'_reference_year_i'
-- DataGrip: start execution from here
SET TIMEZONE = 'US/Eastern';
SET SEARCH_PATH = public;
-- SELECT NOW()... |
<reponame>Shuttl-Tech/antlr_psql
-- file:misc_functions.sql ln:25 expect:true
SELECT num_nonnulls(VARIADIC '{}'::int[])
|
<reponame>ianlancaster/denverseocoach.com
/*!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 utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40... |
/****** Object: Table [dbo].[railmail_deliveries] Script Date: 06/23/2009 19:10:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[railmail_deliveries](
[id] [int] IDENTITY,
[recipients] [varchar](1024) NULL,
[from] [varchar](255) NULL,
[subject] [v... |
<reponame>openschoolmanagement/dockerlocaldevimage
GRANT ALL PRIVILEGES ON *.* to 'dbuser'@'%';
CREATE DATABASE OSM_CALENDAR;
CREATE USER 'dbu_calendar'@'%' IDENTIFIED BY 'school123';
GRANT ALL PRIVILEGES ON OSM_CALENDAR.* TO 'dbu_calendar'@'%';
|
SELECT
/*%expand*/*
FROM
td_receipt_item
WHERE
receipt_id = /* receiptId */''
AND delete_flag = false
ORDER BY
no
|
INSERT INTO EMPLOYEE (id, modificationCounter, employeeid, name, surname, age, email) VALUES (1, 1, 1, 'Stefano','Rossini',40,'<EMAIL>');
INSERT INTO EMPLOYEE (id, modificationCounter, employeeid, name, surname, age, email) VALUES (2, 2, 2, 'Angelo','Muresu',40, '<EMAIL>');
INSERT INTO EMPLOYEE (id, modificationCounter... |
DROP TABLE RAW.NEUSTAR.NEUSTAR_FACT_FUNNEL
DROP TABLE raw.NEUSTAR.etl_files_loaded
DROP SCHEMA RAW.NEUSTAR |
<gh_stars>0
PRINT 'Updating NotificationTemplates'
-- Replace the instances thats shows <NAME>ibert with <NAME>
UPDATE [pims].dbo.[NotificationTemplates]
SET [Body] = REPLACE([Body], '<NAME>, Executive Director of the Strategic Real Estate Services Branch at 250-387-6348', '<NAME> A/Executive Director of the Strategic... |
<filename>files/import-data/post-release/001__coordinate-systems.sql
BEGIN TRANSACTION;
INSERT INTO ensembl_coordinate_systems (
chromosome,
coordinate_system,
assembly_id,
is_reference,
karyotype_rank
) (
SELECT
load.chromosome,
load.coordinate_system,
load.assembly_id,
load.is_reference,
load.kar... |
<filename>septima-js-data/src/test/resources/entities/keys/with-multiple-primary-keys.sql
/**
*
* @name multiple_primary_keys
*/
SELECT
T_MTD_MDCHNGLOG_1.*,
T_MTD_ENTITIES.MDENT_ID
FROM
PUBLIC.MTD_MDCHNGLOG T_MTD_MDCHNGLOG_1,
MTD_ENTITIES T_MTD_ENTITIES
|
Select
*
From #./b1
|
<reponame>thanhnht/amazing-shop<filename>src/api/product-service/sql/runFirstAfterUp/2020-07-01_006_Insert_Product_Smartphones.sql
insert into Products(CategoryId, Name)
select Id, N'Galaxy Z Flip Thom Browne Edition'
from Categories with(nolock) where name = N'Smartphones'
GO
insert into Products(CategoryId, Name)
sel... |
<filename>pkg/datastore/migrations/20190113235000_create_tracks_table.sql
-- UP
CREATE TABLE tracks (
id UUID PRIMARY KEY,
artist VARCHAR (256) NOT NULL,
name VARCHAR (256) NOT NULL,
genre VARCHAR (128) NOT NULL,
bpm DECIMAL NOT NULL,
key VARCHAR (8) NOT NULL,
created ... |
<gh_stars>0
-- Rename the master_seed column to master_key
PRAGMA foreign_keys=off;
ALTER TABLE key_manager_states RENAME TO key_manager_states_old;
CREATE TABLE key_manager_states (
id INTEGER PRIMARY KEY,
master_key BLOB NOT NULL,
... |
DROP TABLE IF EXISTS queries;
CREATE TABLE queries (
id INTEGER PRIMARY KEY AUTOINCREMENT,
text TEXT NOT NULL,
time REAL,
is_interactive INTEGER,
is_suspicious INTEGER,
execution_time REAL,
earliest_event REAL,
latest_event REAL,
range REAL,
is_realtime INTEGER,
search_type T... |
<gh_stars>1-10
drop table acs2015_housing;
create table acs2015_housing(geoid character varying(50), countyfp character varying(50), price double precision)
create or replace view mhp_county as
select a.gid, a.affgeoid, a.name, b.price, a.geom from county_4326_5m as a
join acs2015_housing as b
on a.affgeoid =... |
<gh_stars>0
-- @testpoint: 使用character_length,查询非字符的参数,应该报错
SELECT character_length(123); |
<gh_stars>0
LOAD TABLE "tpcds_sf1000"."web_page" FROM ('tpcds-sf1000/web_page/') EXTERNAL LOCATION "tpcds_sf1000"."sample_tpcds_qa_el";
|
<gh_stars>0
REM ExitWhen.sql
REM Chapter 6, Oracle9i PL/SQL Programming by <NAME>
REM This block illustrates the incorrect location of the
REM EXIT WHEN statement.
DECLARE
-- Declare variables to hold information about the students
-- majoring in History.
v_StudentID students.id%TYPE;
v_FirstName students... |
ALTER TABLE `courses_groups` ADD `deleted` TINYINT UNSIGNED NOT NULL DEFAULT '0' AFTER `ts_end`; |
Drop Index if exists [IX_Observation_StatusID] on Observation;
Drop Index if exists [IX_Observation_ImportBatchID] on Observation;
Drop Index if exists [IX_Observation_SensorID] on Observation;
Drop Index if exists [IX_Observation_SensorID_PhenomenonOfferingID] on Observation;
Drop Index if exists [IX_Observation_Senso... |
ALTER TABLE "public"."users" ALTER COLUMN "fileObjectId" TYPE integer;
COMMENT ON COLUMN "public"."users"."fileObjectId" IS E'null'
alter table "public"."users" rename column "avatarId" to "fileObjectId"; |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.31.10
-- Generation Time: Jun 27, 2020 at 03:43 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.1.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... |
<filename>swasth-hasura/migrations/1619776363316_create_table_public_o2_user/down.sql
DROP TABLE "public"."o2_user";
|
USE ANTERO
GO
ALTER VIEW [dw].[v_amos_rahoituslaskenta] AS
SELECT
Vuosi
,Vaihe
,[Koulutuksen järjestäjä]
,[Koodit Koulutuksen järjestäjä]
,Osa
,AVG([profiilikerroin]) as profiilikerroin
,AVG([painotettu_opiskelijavuosimäärä]) as painotettu_opiskelijavuosimäärä
,AVG([painottamaton_opiskelijavuosimaar... |
<reponame>timshadel/subdivision-list
CREATE TABLE subdivision_GL (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_GL" ("id", "name", "level") VALUES (E'GL-KU', E'Kommune Kujalleq', E'municipality');
INSERT INTO "subdivision_GL" ("id", "name", "level") V... |
<reponame>D3luxee/dim
CREATE TABLE `softhsm_agent` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`uri` varchar(255) NOT NULL,
`api_key` varchar(255) DEFAULT NULL,
`pin` varchar(4) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uri` (`uri`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `zonekey` (
`id` b... |
SELECT COUNT(DISTINCT "CommonGovernment_13"."ag_name") AS "ctd:ag_name:ok", COUNT(DISTINCT "CommonGovernment_13"."bureau_name") AS "ctd:bureau_name:ok", COUNT(DISTINCT "CommonGovernment_13"."co_name") AS "ctd:co_name:ok", COUNT(DISTINCT "CommonGovernment_13"."funding_agency_name") AS "ctd:funding_agency_name:ok",... |
-- intpkey.test
--
-- execsql {
-- CREATE TABLE t3(a INTEGER PRIMARY KEY, b INTEGER, c TEXT);
-- INSERT INTO t3 VALUES(1, 1, 'one');
-- INSERT INTO t3 VALUES(2, 2, '2');
-- INSERT INTO t3 VALUES(3, 3, 3);
-- }
CREATE TABLE t3(a INTEGER PRIMARY KEY, b INTEGER, c TEXT);
INSERT INTO t3 VALUES(1, 1, 'one')... |
<filename>sql/practice/RMASSIGHNMENT1.sql
create table HOTEL(
HNO NUMBER(3) PRIMARY KEY,
NAME VARCHAR2(30),
ADDRESS VARCHAR2(20)
);
insert INTO hotel (HNO, NAME, ADDRESS)
VALUES (1, 'SEA HAWKS', 'MUMBAI');
insert INTO hotel (HNO, NAME, ADDRESS)
VALUES (3, 'GREEN VIEW', 'Kolkata');
insert INTO hotel (HNO, NAME, ... |
<reponame>khanhnguyenj/openid-connect-spring-boot
--
-- Tables for Spring Security's user details service
--
create table IF NOT EXISTS users(
username varchar(50) not null primary key,
password varchar(200) not null,
enabled boolean not null);
create table IF NOT EXISTS authorities (
use... |
<reponame>gerinka/EnhancedDocumentCreator
insert into aspnetuserroles(UserId,RoleId)
SELECT user.id, role.id
FROM urm.aspnetusers user, urm.aspnetroles role
WHERE role.Name = 'Writer'; |
CREATE TABLE IF NOT EXISTS `user_role` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '角色ID,目前应该有:\n\n1. 管理员\n2. 供应商\n3. 需求方',
`user_role_desc` VARCHAR(45) NOT NULL COMMENT '角色描述',
`gmt_created` DATETIME NOT NULL,
`gmt_modified` DATETIME NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
COMMENT = '系统中用户角色,目前包括(I... |
<reponame>connormcd/misc-scripts<gh_stars>10-100
REM
REM Standard disclaimer - anything in here can be used at your own risk.
REM
REM It is very likely you'll need to edit the script for correct usernames/passwords etc.
REM
REM No warranty or liability etc etc etc. See the license file in the git repo root
REM
REM **... |
<filename>common/data/talent.sql<gh_stars>0
#create database if not exists talent default charset utf8;
#use talent;
DROP TABLE IF EXISTS `talentcategory`;
CREATE TABLE `talentcategory` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`talentlevel` varchar(4096) DEFAULT NULL COMMENT '人才级别',
`talentcondition` te... |
<filename>SQL_Backups/ISC_Category.sql<gh_stars>0
-- MariaDB dump 10.19 Distrib 10.6.4-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: wordpress
-- ------------------------------------------------------
-- Server version 10.6.4-MariaDB-1:10.6.4+maria~focal
/*!40101 SET @OLD_CHARACTER_SET_CLI... |
build lubm ~/project/devGstore/data/LUBM_10.n3
unload
load lubm
query ~/project/devGstore/data/LUBM_q0.sql
show
unload
show
quit
|
drop if exists sales;
create table sales(region varchar,product varchar,order_amt int);
insert into sales select 'china','china'||rownum,rownum from db_root connect by level<=10;
insert into sales select 'china','hamberg'||rownum,rownum from db_root connect by level<=10;
insert into sales select 'english','hamberg'||ro... |
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字locator非保留),作为序列名
--关键字不带引号-成功
drop sequence if exists locator;
create sequence locator start 100 cache 50;
drop sequence locator;
--关键字带双引号-成功
drop sequence if exists "locator";
create sequence "locator" start 100 cache 50;
drop sequence "locator";
--关键字带单引... |
select
pattern_matches.pattern_id,
pattern_matches.match_id,
matches.id,
matches.sentence_id,
sentences.document_id,
matches.data "match_data",
sentences.data as "sentence_data"
from
pattern_matches
inner join matches on pattern_matches.match_id = matches.id
inner join sentences ... |
-- Deploy schemas/app_jobs/procedures/fail_job to pg
-- requires: schemas/app_jobs/schema
-- requires: schemas/app_jobs/tables/jobs/table
-- requires: schemas/app_jobs/tables/job_queues/table
BEGIN;
CREATE FUNCTION app_jobs.fail_job(worker_id varchar, job_id int, error_message varchar) RETURNS app_jobs.jobs AS $$
DE... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 20, 2020 at 09:12 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>googoodoll25/api
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 10, 2020 at 04:26 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... |
<reponame>jhernani/giangan_cabahug_juntilla_manacap
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 06, 2015 at 06:51 AM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET... |
/**
SCRIPT DE CONSULTAS
Opción 2: Loxística
Autor: <NAME> (<EMAIL>)
Grupo: 1.4
*/
/*
Consultas SQL
*/
/* Consulta 1*/
select c.idc as "ID", c.nome as "Comunidade", cp.dcompra as "Data", p.cprovedor as "IDP", p.nomeprov as "Provedor"
from compra cp join comunidade c on cp.idc=c.idc join provedor p on ... |
<filename>Database Script/ccaportal_event.sql
CREATE TABLE `event` (
`eventID` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
`description` varchar(450) DEFAULT NULL,
`venue` varchar(45) DEFAULT NULL,
`date` date DEFAULT NULL,
`time` time DEFAULT NULL,
PRIMARY KEY (`eventID`)
) ENGINE=I... |
SELECT "Provider_3"."nppes_provider_street1" AS "nppes_provider_street1" FROM "Provider_3" WHERE (("Provider_3"."nppes_provider_state" = 'WA') AND ("Provider_3"."provider_type" = 'Nephrology')) GROUP BY 1;
|
<filename>modules/module-data-passenger/src/main/resources/sql/migration/passenger/V26__add_brp_collection_info.sql
INSERT INTO visa_rule_lookup (rule) VALUES ('BRP_COLLECTION_INFO'); |
<reponame>anjumrizwi/episerver
--beginvalidatingquery
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_DatabaseVersion]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
begin
declare @ver int
exec @ver=sp_DatabaseVersion
if (@ver >= 7020)
select 0... |
INSERT INTO irCMS_i18nKey (i18nName, active, userId) VALUES ('modules.com.IcedReaper.irPermission.overview.pageTitle', true, 1);
INSERT INTO irCMS_i18nKey (i18nName, active, userId) VALUES ('modules.com.IcedReaper.irPermission.overview.headline', true, 1);
INSERT INTO irCMS_i18nKey (i18nName, active, userId) VALUES ('m... |
INSERT INTO usuario (id, login, senha, nome) VALUES
(1, 'luiz', '123123', '<NAME>'),
(2, 'admin', '123', 'Administrador'),
(3, 'venda', '123', 'Vendedor'),
(4, 'soadmin', '123', 'Apenas Administrador');
INSERT INTO usuario_perfil (id, id_usuario, perfil) VALUES
(1, 1, 'ADMINISTRADOR'),
(2, 1, 'VENDEDOR'),
(3,... |
<reponame>rumenand/Softuni_HomeWork_Tasks
SELECT TOP (10) *
FROM Projects
ORDER BY StartDate,
[Name]; |
CREATE TABLE IF NOT EXISTS commons_deletions (
title VARCHAR(255) BINARY NOT NULL,
deletion_type ENUM('speedy', 'discussion', 'nopermission') NOT NULL,
state ENUM('new', 'notifying', 'failed', 'notified', 'maybe gone', 'gone') NOT NULL DEFAULT 'new',
state_time DATETIME NOT NULL DEFAULT now(),
retri... |
<reponame>revilon1991/tg-parser
alter table Member
drop column bio,
drop column username,
drop column firstName,
drop column lastName,
drop column phoneNumber,
drop column type
;
alter table ChannelHasMember
drop column joinDate
;
|
<gh_stars>10-100
WITH transfers AS (
SELECT
tr."from" AS address,
-tr.value / 1e18 AS amount,
date_trunc('day', evt_block_time) AS evt_block_day,
'transfer' AS type,
evt_tx_hash
FROM erc20."ERC20_evt_Transfer" tr
WHERE contract_address = '\xaa6e8127831c9de45ae56bb1b0d4d4da6e5665bd'
UNION ... |
<reponame>vijayraavi/edX_DAT215x_Microsoft_SQL_Database_Development
-- Module 5 Demonstration 1 File 2
-- Switch this query window to use your copy of the AdventureWorksLT database
-- Query 1
BEGIN TRANSACTION
UPDATE SalesLT.Customer
SET Phone = N'999-555-9999'
WHERE CustomerID = 2;
-- Query 2
ROLLBACK... |
CREATE TABLE table_01(
codigo VARCHAR(2) NOT NULL PRIMARY KEY
,descripcion VARCHAR(225) NOT NULL
);
INSERT INTO table_01(codigo,descripcion) VALUES
('01','Factura')
,('03','Boleta de venta')
,('04','Liquidación de compra')
,('05','Boletos de Transporte Aéreo que emiten las Compañías de Aviación Comercial por... |
<filename>examples/init-scripts/postgres/init-basic.sql<gh_stars>100-1000
CREATE USER basic WITH SUPERUSER;
CREATE DATABASE basic;
GRANT ALL PRIVILEGES ON DATABASE basic TO basic;
|
-- Simple select.
SELECT field_0 FROM table_0;
/* Искомый_текст */
|
-- $Id$
-- Test ALTER TABLE statements which actually modify table structure
-- use Java calc for better error messages
alter system set "calcVirtualMachine" = 'CALCVM_JAVA';
create schema x;
-- start with an analyzed table so that some columns will have stats
-- and some won't
create table x.t(a varchar(5) not null... |
<reponame>DavidBenko/gateway
UPDATE users SET token = ?, updated_at = CURRENT_TIMESTAMP WHERE email = ?;
|
-- Used for caching expensive grouped queries
CREATE TABLE /*$wgDBprefix*/querycache (
-- A key name, generally the base name of of the special page.
qc_type varbinary(32) NOT NULL,
-- Some sort of stored value. Sizes, counts...
qc_value int unsigned NOT NULL default '0',
-- Target namespace+t... |
<reponame>lauracristinaes/aula-java<filename>hibernate-release-5.3.7.Final/project/documentation/src/main/asciidoc/userguide/chapters/domain/extras/basic/mapping-filter-entity-example.sql<gh_stars>1-10
SELECT
a.id as id1_0_0_,
a.active_status as active2_0_0_,
a.amount as amount3_0_0_,
a.client_id as cli... |
<reponame>DOREMUS-ANR/knowledge-base
DB.DBA.VHOST_REMOVE (
lhost=>'*ini*',
vhost=>'*ini*',
lpath=>'/expression'
);
DB.DBA.VHOST_DEFINE (
lhost=>'*ini*',
vhost=>'*ini*',
lpath=>'/expression',
ppath=>'/DAV/',
is_dav=>1,
is_brws=>0,
def_page=>'',
vsp_user=>'dba',
ses_vars=>0,
opts=>vector ('browse_sheet', '', 'cors', '*'... |
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: wedding
-- ------------------------------------------------------
-- Server version 5.7.16-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;... |
<gh_stars>1-10
-- Convert schema '/home/david/dev/EPPlication/script/../lib/EPPlication/../../db_upgrades/_source/deploy/22/001-auto.yml' to '/home/david/dev/EPPlication/script/../lib/EPPlication/../../db_upgrades/_source/deploy/23/001-auto.yml':;
;
BEGIN;
;
ALTER TABLE job ADD COLUMN data character varying;
;
COMM... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 15, 2018 at 05:19 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 5.6.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.