sql stringlengths 6 1.05M |
|---|
-- phpMyAdmin SQL Dump
-- version 4.5.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 13, 2017 at 02:49 PM
-- Server version: 5.7.11
-- PHP Version: 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
CREATE PROC [dbo].[uspMessageOptionIssueSelect]
@MessageOptionIssueID UNIQUEIDENTIFIER
AS
SET NOCOUNT ON
SET XACT_ABORT ON
BEGIN TRAN
SELECT [MessageOptionIssueID], [MessageIssueID], [OptionIssueID], [Deleted], [DeletedBy], [DeletedOn]
FROM [dbo].[MessageOptionIssue]
WHERE ([MessageOptionIssueID]... |
<filename>target/classes/schema-test.sql
drop table if exists list_domain CASCADE;
drop table if exists to_do_domain CASCADE;
create table list_domain (id bigint generated by default as identity, name varchar(255), primary key (id));
create table to_do_domain (id bigint generated by default as identity, completion va... |
SET QUOTED_IDENTIFIER ON
GO
ALTER TABLE [FF].[DraftPickIndex] NOCHECK CONSTRAINT ALL
GO
SET IDENTITY_INSERT [FF].[DraftPickIndex] ON
GO
INSERT INTO [FF].[DraftPickIndex] ([DraftPickIndexId], [MaxTeams], [MaxRounds], [Pick], [Team], [Round]) VALUES (1, 10, 14, 1, 1, 1)
INSERT INTO [FF].[DraftPickIndex] ([DraftPickIndexI... |
<reponame>nick-ramsay/project2
CREATE SCHEMA Automendo;
TRUNCATE TABLE Services;
TRUNCATE TABLE MechanicCentres;
TRUNCATE TABLE MechanicCentreCredentials;
TRUNCATE TABLE MechanicCentreServices;
TRUNCATE TABLE MechanicCentreOrdinaryHours;
TRUNCATE TABLE Appointments;
DROP TABLE IF EXISTS MechanicCentreServices;
DROP... |
<reponame>marcopeg/amazing-postgres
CREATE TABLE "public"."people_v1" (
"id" TIMESTAMP DEFAULT now(),
"name" TEXT,
"surname" TEXT,
PRIMARY KEY ("id")
); |
<reponame>artyerokhin/sqlpad_answers<filename>Chapter 2 Single Table Operation/Top 3 movie categories by sales.sql
SELECT category
FROM sales_by_film_category
ORDER BY total_sales DESC
LIMIT 3; |
<reponame>rahulbelokar/SSIO2017Samples
--##############################################################################
--
-- SAMPLE SCRIPTS TO ACCOMPANY "SQL SERVER 2017 ADMINISTRATION INSIDE OUT"
--
-- © 2018 <NAME>
--
--##############################################################################
--
-- CHAP... |
select [root] = volume_mount_point, [Used(GB)] = used_gb, [Available(GB)] = available_gb from qpi.volumes; |
CREATE TABLE access_tokens (
id varchar(36) PRIMARY KEY,
created_at date NOT NULL DEFAULT CURRENT_TIMESTAMP,
user_id integer NOT NULL REFERENCES users (id) UNIQUE
);
|
-- ----------------------------
-- 2021-07-15 10:47:05 backup table start
-- ----------------------------
-- ----------------------------
-- Table structure for os_api_doc
-- ----------------------------
DROP TABLE IF EXISTS `os_api_doc`;
CREATE TABLE `os_api_doc`
(
`id` int(10) unsigned NOT NU... |
version https://git-lfs.github.com/spec/v1
oid sha256:a9cb51cdcc28e3d31ae35173c45275569968e668667cb23cb28f8c988d893664
size 13742
|
<reponame>MikeBishop/almanac.httparchive.org
#standardSQL
# Distribution of third parties by number of websites
WITH requests AS (
SELECT
_TABLE_SUFFIX AS client,
pageid AS page,
req_host AS host
FROM
`httparchive.summary_requests.2020_08_01_*`
),
third_party AS (
SELECT
domain,
canonical... |
<gh_stars>10-100
CREATE INDEX IF NOT EXISTS "latency_log_latency_idx" ON "latency_log" USING btree ("latency");
CREATE INDEX IF NOT EXISTS "latency_log_latency_monitor_idx" ON "latency_log" USING btree ("monitor_id", "latency");
|
CREATE TABLE jiveSASLAuthorized (
username VARCHAR(64) NOT NULL,
principal TEXT NOT NULL,
PRIMARY KEY (username, principal(200))
);
UPDATE jiveVersion set version=10 where name = 'openfire';
|
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: localhost Database: inqueetesdb
-- ------------------------------------------------------
-- Server version 8.0.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;... |
/*
Warnings:
- You are about to drop the column `email` on the `User` table. All the data in the column will be lost.
- You are about to drop the column `name` on the `User` table. All the data in the column will be lost.
- You are about to drop the `Post` table. If the table is not empty, all the data it cont... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS ExamParts (
id SERIAL NOT NULL PRIMARY KEY,
for_exam INTEGER NOT NULL,
part_order INTEGER NOT NULL,
with_problem INTEGER NOT NULL,
point INTEGER NOT NULL,
created TIMESTAMP ... |
<gh_stars>0
USE 'go-note'
CREATE TABLE `account` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(32) NOT NULL UNIQUE,
`password` varchar(64) NOT NULL,
`create_time` bigint(20) NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `note` (
`... |
SELECT
BIO_COUNT = (SELECT COUNT(*) FROM BinaryObject),
APK_TODECODE = (SELECT COUNT(*) FROM BinaryObject WHERE bioIsRoot = 1 AND bioProcessingStage IN (0)),
APK_PROCESSING = (SELECT COUNT(*) FROM BinaryObject WHERE bioIsRoot = 1 AND bioProcessingStage IN (1)),
APK_DECODED = (SELECT COUNT(*) FROM BinaryObject ... |
DROP TABLE IF EXISTS `committee_members`;
CREATE TABLE `committee_members` (
`id` bigint(20) NOT NULL,
`submission_id` bigint(20) DEFAULT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_required` tinyint(1) DEFAULT NULL,
`c... |
<gh_stars>1-10
/**
* @author: <NAME>
* date: 22.05.2020
* problem: https://www.hackerrank.com/challenges/earnings-of-employees/problem
*/
SELECT months*salary as earnings, count(*) FROM Employee group by earnings order by earnings desc limit 1; |
INSERT INTO [dbo].[ObservationDynProp]
([Name]
,[TypeProp])
VALUES
('Code_Piege'
,'String')
INSERT INTO [dbo].[ObservationDynProp]
([Name]
,[TypeProp])
VALUES
('Habitat_Entomo'
,'String')
... |
<reponame>wonwooddo/vim_setup
CREATE TRIGGER [tr_d_cash_trade_comment] ON dbo.cash_trade_comment
FOR DELETE
AS
BEGIN
END
GO
|
<filename>src/sql/functions/clear_functions.sql
-- NAMESPACE: clear
DO $$
DECLARE
_sql text;
BEGIN
SELECT INTO _sql
string_agg(format('DROP FUNCTION %s CASCADE;', oid::regprocedure), E'\n')
FROM pg_proc
WHERE (proowner = 'ceo'::regrole)
AND prokind = 'f';
IF _sql IS NOT NULL THEN
... |
<gh_stars>10-100
CREATE TABLE flights (
YEAR_DATE integer,
UNIQUE_CARRIER varchar(100),
ORIGIN varchar(100),
ORIGIN_STATE_ABR varchar(2),
DEST varchar(100),
DEST_STATE_ABR varchar(2),
DEP_DELAY decimal,
TAXI_OUT decimal,
TAXI_IN decimal,
ARR_DELAY decimal,
AIR_TIME... |
<reponame>seff0/DUFullStackProject2
DROP DATABASE IF EXISTS destinations_db;
CREATE DATABASE destinations_db;
|
<reponame>dram/metasfresh<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5595870_sys_gh11417_RequestWindowChanges.sql
-- Create Direction Reference List
-- 2021-06-30T10:10:52.654Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO... |
-- +migrate Up
ALTER TABLE account_limits RENAME COLUMN max_operation TO max_operation_out;
ALTER TABLE account_limits RENAME COLUMN daily_turnover TO daily_max_out;
ALTER TABLE account_limits RENAME COLUMN monthly_turnover TO monthly_max_out;
ALTER TABLE account_limits
ADD COLUMN max_operation_in bigint NOT NULL DE... |
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 100422
Source Host : localhost:3306
Source Schema : perpus
Target Server Type : MySQL
Target Server Version : 100422
File Encoding : 65001
Date: 17/03/2022 1... |
<reponame>delucca-workspaces/data<gh_stars>0
with
user_accesses_per_week as (
select * from {{ ref('fct__user_accesses_per_week') }}
),
user_average_accesses_per_week as (
select
user_id,
avg(accesses) as average
from user_accesses_per_week
group by user_id
),
final as (
sele... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table json_schema (
id varchar(255) not null,
title varchar(255),
string TEXT,
version ... |
<gh_stars>1-10
drop table if exists sys_menu;
create table sys_menu
(
menu_flow varchar(32) not null comment '菜单流水号',
parent_menu_flow varchar(32) comment '父级菜单流水号',
menu_level int comment '菜单层级',
menu_code varchar(50) comment '菜单代码',
menu_name varchar(50) comment '菜单名称',... |
-- This file and its contents are licensed under the Timescale License.
-- Please see the included NOTICE for copyright information and
-- LICENSE-TIMESCALE for a copy of the license.
\ir debugsupport.sql
-- Cleanup from other tests that might have created these databases
SET client_min_messages TO ERROR;
SET ROLE :R... |
<reponame>caiqing0204/archery
-- 增加权限
set @content_type_id=(select id from django_content_type where app_label='sql' and model='permission');
INSERT INTO auth_permission (name, content_type_id, codename) VALUES ('菜单 SQL审核', @content_type_id, 'menu_sqlcheck');
INSERT INTO auth_permission (name, content_type_id, codename... |
<reponame>yangqiufei/financial_data_pools<filename>sql_create_tables/trade_detail.sql
CREATE TABLE `s_trade_detail` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`trade_date` int(10) unsigned NOT NULL COMMENT '日期',
`item_code` char(6) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '000000' COMMENT '代码:f12',
... |
ALTER TABLE system_intake
DROP CONSTRAINT eua_id_check,
ADD CONSTRAINT eua_id_check CHECK (public.system_intake.eua_user_id ~ '^[A-Z0-9]{4}$');
ALTER TABLE business_case
DROP CONSTRAINT eua_id_check,
ADD CONSTRAINT eua_id_check CHECK (public.business_case.eua_user_id ~ '^[A-Z0-9]{4}$');
|
CREATE PROCEDURE [dbo].[User_UpdateLastBoard]
@userId int = 0,
@boardId int
AS
UPDATE Users SET lastboard=@boardId WHERE userId=@userId
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: kevin
* Created: 16/07/2020
*/
Create database if not exists enfoque365;
use enfoque365;
Create table users(
id i... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 02, 2020 at 06:56 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
-- CREATE TABLE "front_category" ---------------------------
CREATE TABLE `front_category` (
`id` Int( 11 ) AUTO_INCREMENT NOT NULL,
`name` VarChar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`some_field` VarChar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`type` ENUM( 'simple', 'co... |
<filename>src/Test3.sql
SELECT DISTINCT C.ITEM_ID, C.ORIGEN_ID
FROM VENTASDB.VTA_FACT_ITEMS A
INNER JOIN INVDB.INV_ITEMS B ON B.ITEM_ID = A.ITEM_ID
INNER JOIN SYNC.INV_ITEMS C ON C.ITEM_ID = B.ITEM_ID
WHERE FACT_ID = :FACT_ID AND EMP_ID = :EMP_ID |
<reponame>tommarto/glapsi-website<filename>glapsi.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 12, 2021 at 10:34 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_z... |
USE [CustomerService]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Currency](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[Code] [nvarchar](3) NOT NULL,
[Name] [nvarchar](50) NULL,
CONSTRAINT [PK_Currency] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OF... |
<reponame>guricerin/grumbler<gh_stars>0
drop database if exists `grumbler_db`;
create database `grumbler_db`;
drop user if exists `grumbler`@`%`;
create user `grumbler`@`%` identified by 'grumbler1234';
grant all on `grumbler_db`.* to `grumbler`@`%`;
flush privileges;
use `grumbler_db`;
drop table if exists `users`;... |
delimiter //
CREATE PROCEDURE AllTables ()
BEGIN
SELECT TABLE_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA = 'nba';
END//
CREATE PROCEDURE TableByName (tableName CHAR(32))
BEGIN
SELECT TABLE_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = tableN... |
<reponame>sofire/crocodile<gh_stars>0
CREATE TABLE IF NOT EXISTS crocodile_hostgroup (
id VARCHAR(50) PRIMARY KEY NOT NULL,-- "ID",
name VARCHAR(50) NOT NULL DEFAULT "",-- "名称",
remark VARCHAR(50) NOT NULL DEFAULT "" ,-- "备... |
<reponame>matbocz/kurs-oracle-pwsz-elblag<gh_stars>0
-- 18560 <NAME>
-- Ponizej wklej poprawiony skrypt SQL dla systemu Oracle generujacy strukture bazy danych "bokser":
CREATE TABLE bokser (
id INTEGER NOT NULL,
imie VARCHAR2(20) NOT NULL,
nazwisko VARCHAR2(20) NOT NULL,
data_ur DAT... |
INSERT INTO investments (user, given_apples) VALUES (?, ?); |
<reponame>jerfowler/conferences<gh_stars>0
USE [AFD]
GO
SELECT DISTINCT o.name AS Object_Name, o.type_desc
FROM sys.sql_modules m
INNER JOIN sys.objects o
ON m.object_id=o.object_id
WHERE m.definition Like '%Error 01 - Could Not Create AP records for payment transactions%'
|
SELECT cu.CurrencyCode AS [CurrencyCode],
cu.Description AS [Currency],
COUNT(c.CountryCode) AS [NumberOfCountries]
FROM Currencies AS cu
LEFT JOIN Countries AS c ON cu.CurrencyCode = c.CurrencyCode
GROUP BY cu.CurrencyCode, cu.Description
ORDER BY COUNT(c.CountryCode) DESC, cu.Description |
-- Verify database-message-store:roles/owner on pg
BEGIN;
SELECT 1/COUNT(*) FROM pg_roles WHERE rolname = 'message_store_owner';
ROLLBACK;
|
SELECT
'Bees?' AS {out:VARCHAR:firstOutput},
'Here be dragons!' AS {out:VARCHAR:secondOutput}; |
<reponame>isabella232/tegola-openseamap
CREATE TABLE osm_beacon AS
SELECT osm_id, type, name, category, colour, colour_pattern, construction, elevation, height, reflectivity, shape, system, daymark_category, daymark_colour, daymark_colour_pattern, daymark_shape, topmark_category, topmark_colour, topmark_colour_pattern,... |
<gh_stars>1-10
CREATE DATABASE MINSA;
use MINSA;
CREATE TABLE SECCIONES (
ID_SECCION int NOT NULL AUTO_INCREMENT PRIMARY KEY,
SECCION varchar(40) NOT NULL,
FECHA_CREACION DATE
);
CREATE TABLE ROLES (
ID_ROL int NOT NULL AUTO_INCREMENT PRIMARY KEY,
ID_SECCION int NOT NULL,
ROL varchar(25) NOT N... |
-- 1. show the matchid and player name for all goals scored by Germany.
-- To identify German players, check for: teamid = 'GER'
SELECT matchid, player FROM goal
WHERE teamid = 'GER';
-- 2. Show id, stadium, team1, team2 for just game 1012
SELECT id,stadium,team1,team2
FROM game WHERE id = 1012;
-- 3. show the... |
CREATE OR REPLACE TEMPORARY TABLE tmp_mountdb AS
SELECT
itemid,
spellid,
groundspeed,
flightspeed
FROM
((SELECT
CAST(parentitemid AS INT64) AS itemid,
CAST(spellid AS INT64) AS spellid
FROM
itemeffect
WHERE
spellcategoryid = "330"
UNION ALL
SELECT
NULL AS itemid,
CAST(spell AS ... |
<reponame>CityofToronto/bdit_flashcrow<gh_stars>1-10
BEGIN;
ALTER TABLE "study_requests"
ALTER COLUMN "createdAt" DROP NOT NULL,
ALTER COLUMN "createdAt" SET DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE "studies"
ALTER COLUMN "createdAt" DROP NOT NULL,
ALTER COLUMN "createdAt" SET DEFAULT CURRENT_TIMESTAMP;
UPDATE... |
<filename>Johnny.CodeGenerator.DBEngine/SQL2005/ViewQuery.sql
SELECT
TABLE_CATALOG,
TABLE_SCHEMA,
TABLE_NAME AS VIEW_NAME
FROM
INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME != 'sysconstraints'
AND TABLE_NAME !='syssegments'
ORDER BY TABLE_NAME |
-- attach3.test
--
-- execsql {
-- PRAGMA database_list;
-- }
PRAGMA database_list; |
<reponame>Shuttl-Tech/antlr_psql
-- file:sequence.sql ln:11 expect:true
CREATE SEQUENCE sequence_testx INCREMENT BY 1 START -10
|
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- 主机: localhost
-- 生成日期: 2022-01-25 14:41:27
-- 服务器版本: 5.6.50-log
-- PHP 版本: 7.4.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4010... |
<filename>_db/changes_20140627.sql
CREATE TABLE IF NOT EXISTS `services` (
`id` int(5) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(256) NOT NULL,
`discount_disabled` bit(1) NOT NULL DEFAULT 0,
`amount` int(5) NOT NULL, /*ct*/
`description` varchar(256) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEF... |
<reponame>wmedvede/jbpm
ALTER TABLE TimerMappingInfo ADD COLUMN info varbinary(MAX); |
CREATE TABLE [Core].[BenchmarkResult]
(
[Id] INT NOT NULL PRIMARY KEY,
[BenchmarkName] NVARCHAR(150) not null,
DeclaringType nvarchar(250) not null,
OpCount int not null,
[MachineName] NCHAR(50) not null,
[StartTime] DATETIME2 not null,
[EndTime] DATETIME2 not null,
[Duration] INT ... |
/****** Object: StoredProcedure [dbo].[MoveHistoricLogEntries] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Procedure dbo.MoveHistoricLogEntries
/****************************************************
**
** Desc: Move log entries from main log into the
** historic log (insert and th... |
DROP TABLE IF EXISTS public.curr_course_view CASCADE;
DROP TABLE IF EXISTS public.curr_currency_view CASCADE;
DROP TABLE IF EXISTS public.dict_global_view CASCADE;
DROP TABLE IF EXISTS public.doc_documents_view CASCADE;
DROP TABLE IF EXISTS public.group_global_view CASCADE;
DROP TABLE IF EXISTS public.history_serv_hote... |
insert into user (id, username, age) values (1,'Tom',12);
insert into user (id, username, age) values (2,'Jerry', 23);
insert into user (id, username, age) values (3,'Reno', 44);
insert into user (id, username, age) values (4,'Josh', 55);
|
-- Test file: output.sql
SELECT * FROM {{.test_schema}}.table1;
|
<filename>src/main/resources/sqlScripts/TRIGGERS.sql
CREATE OR REPLACE FUNCTION trigger_same_company_insert()
RETURNS trigger AS
$func$
BEGIN
IF new.buyer_id=new.seller_id then
RAISE EXCEPTION 'Error you cannot insert with the same id for seller and buyer';
end if;
RETURN new;
END
$func$ LANGUA... |
<filename>src/test/regress/bugbuster/sql/indexscan.sql
-- start_ignore
-- LAST MODIFIED:
-- 2009-07-17 mgilkey
-- Added "order" directive. Because this specifies columns by
-- position, not name, it requires that the columns come out in a
-- known order, so I changed the "SELECT" clauses to... |
<reponame>decibel/pg_ndarray<gh_stars>1-10
\set ECHO none
\i test/pgxntool/setup.sql
SELECT plan(
2 -- ediff1d
+ 2 -- intersect1d
+ 1 -- setxor1d
+ 1 -- union1d
+ 1 -- setdiff1d
+ 2 -- in1d
);
-- ediff1d
SELECT is(
ediff1d(pg_temp.test_value())::int[]
, array[1,1,441]
, 'ediff1d(test value)'
... |
-- @testpoint: opengauss关键字path非保留),作为索引名,部分测试点合理报错
--前置条件,创建一个表
drop table if exists path_test;
create table path_test(id int,name varchar(10));
--关键字不带引号-成功
drop index if exists path;
create index path on path_test(id);
drop index path;
--关键字带双引号-成功
drop index if exists "path";
create index "path" on path_test(id)... |
<gh_stars>0
-- @testpoint:opengauss关键字without(非保留),作为外部数据源名
--关键字不带引号-成功
drop data source if exists without;
create data source without;
drop data source without;
--关键字带双引号-成功
drop data source if exists "without";
create data source "without";
drop data source "without";
--关键字带单引号-合理报错
drop data source if exists 'w... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Feb 15, 2022 at 11:25 PM
-- Server version: 5.7.24
-- PHP Version: 7.4.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... |
USE dbHospital
select * from tbAmbulatorio
UPDTE tbAmbulatorio SET andar = '10°' where codAmbulatorio = 3
select * from tbEspecialidades
UPDTE tbEspecialidades SET descricao = 'Ortopedista' where codEspecialidades = 20
select * from tbMedico
UPDTE tbMedico SET nome = 'Dr. <NAME>' where codMedico = 201
UPD... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 12, 2020 at 11:52 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
<filename>paymentmanager.sql
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Εξυπηρετητής: localhost:3306
-- Χρόνος δημιουργίας: 03 Σεπ 2021 στις 19:14:45
-- Έκδοση διακομιστή: 5.7.24
-- Έκδοση PHP: 7.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";... |
<filename>demo/add_author_country.sql<gh_stars>1-10
ALTER TABLE authors
ADD COLUMN country varchar(50) NULL; |
<gh_stars>1-10
-- script to connect Affymetrix DMET and Amplichip Data with garfield's h_graph
DROP TABLE IF EXISTS garfield_hgraph;
CREATE TABLE garfield_hgraph(pmid int, wos_id varchar(30));
\COPY garfield_hgraph FROM '~/garfield_hgraph.csv' CSV HEADER DELIMITER ',';
DROP TABLE IF EXISTS garfield_hgraph2;
CREATE TA... |
<reponame>yasir2000/brown-bear
DELETE FROM service WHERE short_name='plugin_proftpd';
DROP TABLE IF EXISTS plugin_proftpd_xferlog;
DROP VIEW IF EXISTS ftpgroups;
DROP VIEW IF EXISTS ftpusers;
|
-- file:tsearch.sql ln:527 expect:true
select * from pendtest where 'ipt:*'::tsquery @@ ts
|
<filename>SQL/Data/Product.sql
USE dqlab;
CREATE TABLE IF NOT EXISTS product (
`ID` INT,
`product_name` VARCHAR(18) CHARACTER SET utf8,
`price` INT,
`speed_limit` INT,
`date_active` DATETIME,
`end_active` DATETIME,
`active` INT
);
INSERT INTO
product
VALUES
(
10001,
... |
-- increase agent job history to 10,000 rows, 500 max per job
USE [msdb]
GO
EXEC msdb.dbo.sp_set_sqlagent_properties @jobhistory_max_rows=10000,
@jobhistory_max_rows_per_job=500
GO
|
USE [perpetuumsa]
GO
------------------------------------------------------------------
--Stronghold teleporter item definitions
--Adds or updates entitydefaults
--Date modified: 2020/04/03
------------------------------------------------------------------
DECLARE @capsuleName VARCHAR(128);
DECLARE @fieldDevName VAR... |
<filename>test/support/schema1.sql
DROP SCHEMA IF EXISTS public CASCADE;
DROP SCHEMA IF EXISTS other CASCADE;
CREATE SCHEMA public;
CREATE SCHEMA other;
DROP TYPE IF EXISTS mood;
CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy');
CREATE TABLE "Users" (
"Id" SERIAL PRIMARY KEY,
zip_code TEXT,
email TEXT,
phone T... |
<gh_stars>0
................................................Mardi.................................................................
Exercices (requétes SQL)
1. affichage du nom de la ville, le code postale et la commune de chaque ville:
SELECT ville_nom, ville_commune,ville_code_postal FROM `villes_france_free` WHE... |
<reponame>AdailSilva/LoRaWAN_IoTEnergyMeterAPI
-- MySQL
-- -----------------------------------------------------
-- Schema iotenergymeterapi
-- -----------------------------------------------------
--CREATE SCHEMA IF NOT EXISTS `iotenergymeterapi` ;
--USE `iotenergymeterapi` ;
CREATE TABLE system_categories (
id B... |
<filename>DarkstarCrm/DarkstarCrm/dbo/Contact.sql
CREATE TABLE [dbo].[Contact]
(
[ContactId] INT NOT NULL PRIMARY KEY IDENTITY,
[Email] NVARCHAR(200) NOT NULL,
[Address] NVARCHAR(100) NULL,
[Phone] NVARCHAR(50) NULL,
[ClientId] INT NULL,
[AccountId] INT NULL,
[IsDefault] BIT NOT NULL DEFAULT 0,
[Country... |
select credential_name,
username,
enabled
from user_credentials
order by credential_name;
create table emp (
empno number(4,0),
ename varchar2(10 byte),
job varchar2(9 byte),
mgr number(4,0),
hiredate date,
sal number(7,2),
comm number(7,2),
deptno numb... |
<reponame>guhanjie/weixin-boot<filename>src/main/resources/sql/alter_02.sql
use zhmv;
-- ----------------------------
-- Alter Table structure for order
-- ----------------------------
ALTER TABLE `order`
ADD COLUMN `source` varchar(100) NULL COMMENT '推广源' AFTER `remark`; |
-- =============================================
-- 使用刚创建的数据库
-- =============================================
use noveltysearch
go
--======================================================================
--以下是按照国家知识库结构来重新做知识库的表
--======================================================================
-- ===... |
<filename>DMS_Pipeline/UnholdCandidateMSGFJobSteps.sql
/****** Object: StoredProcedure [dbo].[UnholdCandidateMSGFJobSteps] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE UnholdCandidateMSGFJobSteps
/****************************************************
**
** Desc:
** Examines the n... |
CREATE TRIGGER dbo.TRG_TPW_WF_ACTIVITY
ON dbo.TPW_WF_ACTIVITY
AFTER INSERT, UPDATE
AS
IF EXISTS
(
SELECT I.ACTIVITY
FROM INSERTED I,
dbo.TPW_WF_STATE S
WHERE S.STATE_ID = I.BEGIN_STATE_ID
AND (S.ACTIVITY <> I.ACTIVITY OR S.STATE_NAME <> I.BEGIN_STATE_NAME)
)
BEGIN
RAISERROR(N'ACTIVITY... |
--*************************GO-LICENSE-START*********************************
-- Copyright 2014 ThoughtWorks, 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.apach... |
<reponame>epmd-edp/admin-console
create table action_log
(
id integer default nextval('action_log_id_seq'::regclass) not null
constraint action_log_pk
primary key,
event event not null,
detailed_message text,
username te... |
<reponame>jbjonesjr/rpi-weather
CREATE TABLE reports
(
pid serial NOT NULL,
-- autoincrement
created_on timestamp without time zone NOT NULL,
observed_at timestamp without time zone NOT NULL,
sensor_id character integer NOT NULL,
temperature_f double precision NULL,
humidity double precision... |
<reponame>CaioPi/RestWithASP-NET5
-- CREATE DATABASE rest_with_asp_net_udemy;
CREATE SEQUENCE books_seq;
CREATE TABLE IF NOT EXISTS books (
id int NOT NULL DEFAULT NEXTVAL ('books_seq'),
author varchar(120),
launch_date timestamp(6) NOT NULL,
price decimal(65,2) NOT NULL,
title varchar(120),
PRIMARY KEY (... |
<filename>Tellma.Database.Application/dal/Stored Procedures/dal.AddUserPermissionsVersion.sql
CREATE PROCEDURE [dal].[AddUserPermissionsVersion]
@param1 int = 0,
@param2 int
AS
SELECT @param1, @param2
RETURN 0
|
INSERT INTO burgers(burger_name) VALUES ('Jersey Burger');
INSERT INTO burgers(burger_name) VALUES ('Buffalo Chicken Burger');
INSERT INTO burgers(burger_name) VALUES ('Veggie Burger');
INSERT INTO burgers(burger_name, devoured) VALUES ('Double Cheese', true);
INSERT INTO burgers(burger_name, devoured) VALUES ('Califor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.