sql stringlengths 6 1.05M |
|---|
<filename>content-resources/src/main/resources/flyway/oskari/V1_55_4__fix_null_styles.sql
update oskari_maplayer set style = '' where style = 'null'; |
<reponame>S20P/CodeIgniter-3.1.9-CRUD
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Sep 08, 2018 at 06:47 AM
-- Server version: 5.7.21
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_z... |
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 01, 2018 at 06:48 AM
-- Server version: 5.5.39
-- PHP Version: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 14, 2020 at 12:20 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.1.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
/* -------------------------------------------------------------------
-- Matches the streams in the state database with the items in the project
--
-- Usage
-- set @configDB = DB_NAME() /* to use the current database */
-- set @configDB = 'AmplaProject' /* or specify the database */
----------------------... |
--
-- journal of all changes to all audited tables
-- set search_path to _pg_dml_audit_model;
--
CREATE TABLE IF NOT EXISTS events (
nspname TEXT NOT NULL,
relname TEXT NOT NULL,
usename TEXT NOT NULL,
trans_ts TIMESTAMPTZ NOT NULL,
trans_id BIGINT NOT NULL,
trans_sq INTE... |
<filename>scratch/Queries/LocalDb.sql
/* SELECT * FROM dbo.BuildCloneTime WHERE DefinitionId = 15 and BuildStartTime > '8/14 /2019' and maxduration > '00:10:00' */
CREATE TABLE ExPlanOperator_P3 (
ID INT IDENTITY(1, 1)
,STD_Name VARCHAR(50)
,STD_BirthDate DATETIME
,STD_Address VARCHAR(MAX)
,STD_Grade INT
... |
<filename>install/reset_demo.sql
-- Reset Group-Name
update groups set honor_name = null where honor_name is not null;
commit;
-- Reset V_GROUPS
create or replace view v_groups as
select
g1.id,
coalesce(g1.honor_name, g1.group_name) group_name,
g1.group_name
|| case when g2.group_name is not null then ' of '... |
<gh_stars>1-10
CREATE SEQUENCE test_id_seq;
CREATE TABLE test (
id INTEGER NOT NULL PRIMARY KEY DEFAULT NEXTVAL('test_id_seq'::regclass),
bar INTEGER NOT NULL,
baz VARCHAR(16) NOT NULL DEFAULT 'fizz',
foo VARCHAR(255) DEFAULT 'buzz'
);
CREATE INDEX ON test(bar);
ALTER TABLE test ADD CHECK (bar > 0);... |
-- file:plpgsql.sql ln:1175 expect:true
insert into WSlot values ('WS.002.3a', '002', '', '')
|
<filename>backend/de.metas.externalsystem/src/main/sql/postgresql/system/80-de.metas.externalsystem/5631020_sys_gh12711_refactor_C_BPartner_SyncTo_RabbitMQ_HTTP_process.sql<gh_stars>1-10
-- 2022-03-21T13:21:42.854Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process SET Classname='de.met... |
<reponame>mfooo/wow
UPDATE creature_template SET ScriptName='npc_karynaku' WHERE entry=22112;
|
<reponame>uk-gov-mirror/defra.prsd-weee
IF NOT EXISTS(SELECT * FROM sys.database_principals WHERE name=@Username)
BEGIN
BEGIN TRANSACTION
EXEC('CREATE USER ' + @Username + ' FOR LOGIN ' + @Login)
EXEC('ALTER ROLE ' + @Role + ' ADD MEMBER ' + @Username)
IF @@ERROR != 0
BEGIN
PRINT 'Errors Found ... Rollin... |
---
-- ============LICENSE_START=======================================================
-- openECOMP : SDN-C
-- ================================================================================
-- Copyright (C) 2017 AT&T Intellectual Property. All rights
-- reserved.
-- ==========================... |
<reponame>jamespohalloran/hydra<gh_stars>0
DROP INDEX hydra_oauth2_consent_request ON hydra_oauth2_consent_request_client_id_subject_idx;
|
CREATE INDEX "IDX_PERMIT_NUM" ON "PERMIT" ("PERMIT_NUM")
|
<filename>packages/engine-tenant-api/migrations/2018-08-02-174310-init.sql<gh_stars>10-100
CREATE TABLE "tenant"."identity" (
"id" uuid NOT NULL,
"parent_id" uuid,
"roles" jsonb NOT NULL,
CONSTRAINT "identity_id" PRIMARY KEY ("id"),
CONSTRAINT "identity_parent_id_fkey" FOREIGN KEY ("parent_id") REFERENCES "tenant"... |
CREATE OR REPLACE FUNCTION public.get_ibc_channels_stats_on_period(period_in_hours integer)
RETURNS SETOF fn_table_zone_channels
LANGUAGE sql
STABLE
AS $function$
with stats as (
select distinct
zone_src,
zone_dest,
CASE WHEN txs_cnt is NULL THEN 0 ELSE 1 END as count
... |
ALTER TABLE GROUPER_SYNC_GROUP ADD COLUMN metadata_json VARCHAR(4000);
update grouper_ddl set last_updated = to_char(CURRENT_TIMESTAMP, 'YYYY/MM/DD HH24:mi:DD'), history = substring((to_char(CURRENT_TIMESTAMP, 'YYYY/MM/DD HH24:mi:DD') || ': upgrade Grouper from V' || db_version || ' to V37, ' || history) from 1 for 35... |
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... |
<reponame>CGATechnologies/sctp2<filename>sctp-core/src/main/resources/db/migration/V1.1.7.1626629437575__Fix_programs_id_column_to_auto_increment.sql
DROP TABLE IF EXISTS program_funders;
ALTER TABLE programs modify id BIGINT NOT NULL AUTO_INCREMENT;
-- Restore
CREATE TABLE IF NOT EXISTS program_funders (
program... |
USE [AIDE]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'PROBLEM_IMPLEMENT')
BEGIN
DROP TABLE [dbo].[PROBLEM_IMPLEMENT]
END
CREATE TABLE [dbo].[PROBLEM_IMPLEMENT](
[IMPLEMENT_ID] [int] IDENTITY(1,1) NOT NULL,
[PROBLEM_ID] [int] NOT NULL... |
<gh_stars>0
alter table instruments_instrument
rename column admin_identity_id to admin_user_id;
drop index instruments_instrument_idx_admin_identity_id;
create index instruments_instrument_idx_admin_user_id
on instruments_instrument (admin_user_id);
|
INI BUDI
INI BAPAK BUDI
INI IBU BUDI
INI ANU |
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Tempo de geração: 14/08/2021 às 00:59
-- Versão do servidor: 10.3.31-MariaDB-0ubuntu0.20.04.1
-- Versão do PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "... |
-- --------------------------------------------------------
--
-- Table structure for table `accounts`
--
DROP TABLE IF EXISTS `accounts`;
CREATE TABLE `accounts` (
`account` char(65) CHARACTER SET utf8 NOT NULL,
`alias` varchar(255) DEFAULT NULL,
`monitor_url` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
`... |
CREATE TABLE language(
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
japanese TEXT NOT NULL,
english TEXT NOT NULL,
chinese TEXT NOT NULL,
lock BOOLEAN NOT NULL DEFAULT FALSE,
add_timestamp TIMESTAMP WITHOUT TIME ZONE,
update_timestamp TIMESTAMP WITHOUT TIME ZONE
); |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 08, 2017 at 04:46 AM
-- Server version: 10.1.8-MariaDB
-- PHP Version: 5.6.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
<filename>database/store.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 13-11-2021 a las 02:25:44
-- Versión del servidor: 10.4.17-MariaDB
-- Versión de PHP: 8.0.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "... |
<reponame>maciejstanek/php-sql-lecture-examples<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Czas generowania: 03 Maj 2017, 23:33
-- Wersja serwera: 5.7.18-0ubuntu0.16.04.1
-- Wersja PHP: 7.0.15-0ubuntu0.16.04.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_Z... |
<gh_stars>0
INSERT INTO `social_media`
(url`,
`image`,
`account_id`)
VALUES
(?,?,?);
|
<reponame>mwwhited/MasterDataTools
CREATE TABLE [Vehicles].[Tires] (
[TireID] INT IDENTITY (1, 1) NOT NULL,
[CarID] INT NOT NULL,
[Date] DATETIME NOT NULL,
[Miles] DECIMAL (14, 4) NOT NULL,
[Make] NVARCHAR (256) NOT NULL,... |
DROP DATABASE IF EXISTS fmDB;
CREATE DATABASE fmDB;
USE fmDB;
CREATE TABLE `amt_coaches` (
`username` varchar(255) UNIQUE NOT NULL,
`password` varchar(255),
`first_name` varchar(255),
`last_name` varchar(255),
`isAdmin` boolean,
CONSTRAINT FK_Coach_username_ID PRIMARY KEY (username)
);
CREATE TABLE `am... |
<filename>Docker/mysql/initdb.d/init_tables.sql
CREATE TABLE `articles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`content` text COLLATE utf8_unicode_ci,
`created_at` datetime DEFAULT NOW(),
`updated_at` datetime DEFAULT NOW(),
`deleted_at` datetime D... |
/******************************************************************************/
/*** User Defined Functions ***/
/******************************************************************************/
DECLARE EXTERNAL FUNCTION SPHINXCLIENT$CREATE
RETURNS INTEGER BY VA... |
<gh_stars>1-10
/*
SQLyog Enterprise - MySQL GUI v8.02 RC
MySQL - 5.5.0-m2-community : Database - warehouse
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY... |
create table user(
id serial primary key,
first_name text,
last_name text,
email varchar(128) unique not null,
login varchar(128) not null default 'custom',
password varchar(256)
); |
--DROP FUNCTION populate_missing_city_region_ip2loc_sm_tab();
CREATE OR REPLACE FUNCTION populate_missing_city_region_ip2loc_sm_tab()
RETURNS SETOF varchar AS $BODY$
DECLARE ip bigint;
DECLARE hold_region varchar(100);
DECLARE hold_city varchar(100);
DECLARE counter bigint;
DECLARE xyz CURSOR FOR SELECT distinct (a.co... |
<reponame>nledford/rustfm-scraper
DROP TABLE IF EXISTS all_dates_tbl;
DROP VIEW IF EXISTS all_dates;
-- Will simply hold a static list of dates
CREATE TABLE all_dates_tbl
(
id integer primary key,
date datetime not null
);
-- Ensure each date can only be inserted once
create unique index if not exists ux_al... |
<filename>src/test/resources/randexpr1.test_53.sql
-- randexpr1.test
--
-- db eval {SELECT -c-coalesce((select max(t1.a) from t1 where (a>17-t1.a) and (select abs(min(t1.a))*case abs(case (((min((t1.c))))+min(a)) when count(distinct f) then min(11) else count(distinct b) end) when min(t1.f) then (count(distinct t1.b)... |
<reponame>Shuttl-Tech/antlr_psql
-- file:regex.linux.utf8.sql ln:26 expect:true
SELECT 'aⒶⓜ' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS t
|
PRAGMA encoding="UTF-8";
-- ##############################
-- participations � l'evenement 1
-- ##############################
INSERT INTO PARTICIPATION
VALUES (1, 'E168011W');
INSERT INTO PARTICIPATION
VALUES (1, 'E147093J');
INSERT INTO PARTICIPATION
VALUES (1, 'E148834B');
INSERT INTO PARTICIPATION... |
<filename>dbsaledatatracker.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 24, 2015 at 10:09 AM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
<reponame>jumbojett/zombodb
CREATE TYPE zdb_multi_search_response AS (table_name regclass, user_identifier text, query text, total int8, score float4[], row_data json);
CREATE OR REPLACE FUNCTION zdb_id_to_ctid(id text) RETURNS tid LANGUAGE sql STRICT IMMUTABLE AS $$
SELECT ('(' || replace(id, '-', ',') || ')')::tid;
... |
-- Tags: no-parallel
drop user if exists " ";
drop user if exists ' spaces';
drop user if exists 'spaces ';
drop user if exists " spaces ";
drop user if exists "test 01119";
drop user if exists "<NAME>";
drop user if exists "无名氏 ";
drop user if exists "🙈 🙉 🙊";
create user " ";
create user ' spac... |
<reponame>aasmpro/behdar
UPDATE [user]
SET username = @username, fname = @fname, lname = @lname, ncode = @ncode, type = @type, status = @status
WHERE (username = @org_username) |
<reponame>UAMS-DBMI/PosdaTools<filename>posda/posdatools/queries/sql/GetSegBitmapSegmentations.sql
-- Name: GetSegBitmapSegmentations
-- Schema: posda_files
-- Columns: ['seg_bitmap_file_id', 'segmentation_num', 'label', 'description', 'color', 'algorithm_type', 'algorithm_name', 'segmented_category', 'segmented_type']... |
<gh_stars>1-10
INSERT INTO token_whitelist (name, address, version) VALUES ('SOON', '0:a15e6a7a91c331ddcd85675ca64d5a7db8c7e94b35806b2e05bf4bce29d21023', 'Tip3');
|
<filename>resources/db/migration/V1.2.0.1__create_reports.sql
create table bug_reports
(
uuid varchar(36) not null primary key,
created timestamptz not null,
operator_uuid varchar(36) not null,
email varchar not null,
center_uuid varchar not null,
center_nam... |
<reponame>Nadyr/SkeletonApplication<gh_stars>0
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(255) COLLATE utf8_general_ci NOT NULL,
`password` char(60) COLLATE utf8_general_ci NOT NULL,
`role` enum('user','admin') COLLATE utf8_general_ci NOT NULL DEFAULT 'user',
`firstn... |
create table component_used
(
id varchar(36) not null,
cost integer not null,
lead_time integer not null,
quantity integer not null,
bom_id varchar(36) not null
constraint bom_fk
references bom,
component_id varchar(36) not null
constraint component_fk
ref... |
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
create unique index SYS_C0020839_idx on ZSTG_GENE_AGENT_CGID
(AGENT_ID,GENE_ID) tablespace CABIO_MAP_FUT;
alter table ZSTG_GENE_AGENT_CGID enable constraint SYS_C... |
autocommit off;
set names utf8;
create table test_rtrim(
rtrim_1_1 varchar(50),
rtrim_1_2 varchar(50),
rtrim_1_3 varchar(50),
rtrim_1_4 varchar(50),
rtrim_1_5 varchar(50),
rtrim_2_1_1 varchar(50),
rtrim_2_1_2 varchar(50),
rtrim_2_1_3 varchar(50),
rtrim_2_1_4 varchar(50),
rtrim_2_2_1 varcha... |
--Africa
select timestamptz'2015-10-9 13:08:00 Africa/Abidjan';
select timestamptz'2015-10-9 13:08:00 Africa/Accra';
select timestamptz'2015-10-9 13:08:00 Africa/Addis_Ababa'
select timestamptz'2015-10-9 13:08:00 Africa/Algiers';
select timestamptz'2015-10-9 13:08:00 Africa/Asmara';
selec... |
<reponame>wadep23/track-your-employees
INSERT INTO department (name)
VALUES
('Marketing'),
('Development'),
('Quality Assurance'),
('Help Desk');
INSERT INTO role (title, salary, department_id)
VALUES
('Marketing Manager', 125000, 1),
('Market Research Analyst', 90000, 1),
('SEO Manager', 65000, 1),
('Public Relations... |
INSERT INTO DivisionAuthority
SELECT *
FROM Rescission
WHERE Rescission.BudgetLevel = '8'
AND Rescission.BocCode NOT IN ('10', '17')
ORDER BY Rescission.BFY DESC , Rescission.FundCode, Rescission.AccountCode, Rescission.BocCode;
|
WITH CTE_CurrUseByCont (ContinentCode, CurrencyCode, CurrencyUsage) AS
(
SELECT
ContinentCode,
CurrencyCode,
COUNT(CurrencyCode) AS [CurrencyUsage]
FROM Countries
GROUP BY ContinentCode, CurrencyCode
HAVING COUNT(CurrencyCode) > 1
)
,
CTE_MaxCurrUseByCont (ContinentCode, MaxCurrencyUsage) AS
(
SELECT
ContinentCode... |
<gh_stars>0
INSERT INTO users (first_name, last_name, email, password, avatar_url)
VALUES
('Kevin', 'Test', '<EMAIL>', '$2b$10$VGkYZWBp9IJZpq6Ca28VIuOHHP8Ag0dtkyI4LOTK1GW4of37/ACsS','https://avatars.githubusercontent.com/u/31554101?v=4'),
('Connie', 'Ho', '<EMAIL>', '$2b$10$VGkYZWBp9IJZpq6Ca28VIuOHHP8Ag0dtkyI4LOTK1GW4o... |
ALTER TABLE `clients` CHANGE `wangwang` `wangwang` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `qq` `qq` INT(15) NULL DEFAULT NULL, CHANGE `qq_name` `qq_name` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
|
<reponame>cdesiniotis/yelp-faceted-search
DROP TABLE Sub_Categories CASCADE CONSTRAINTS;
DROP TABLE Main_Categories CASCADE CONSTRAINTS;
DROP TABLE Business_Attributes CASCADE CONSTRAINTS;
DROP TABLE Days_Open CASCADE CONSTRAINTS;
DROP TABLE Reviews CASCADE CONSTRAINTS;
DROP TABLE Businesses CASCADE CONSTRAINTS;
DROP T... |
<filename>cms (1).sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 26-01-2021 a las 02:24:33
-- Versión del servidor: 10.4.16-MariaDB
-- Versión de PHP: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00... |
<reponame>hmmis/Sell-Products
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 24, 2016 at 09:25 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.5.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER... |
--UPPER
select ehinput.timestamp, ehinput.vin, ehinput.speed, ehinput.outsidetemperature,
UPPER(ehinput.city) as city
from ehinput
--AVG
select System.Timestamp as WindowEndTimestamp, ehinput.city,
AVG(ehinput.speed) as average_speed
from ehinput timestamp by ehinput.timestamp
group by ehinput.city, TumblingW... |
create schema websystique;
create table websystique.STUDENT (
id INT NOT NULL auto_increment PRIMARY KEY,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
section VARCHAR(30) NOT NULL
); |
<reponame>mobcomlab/we-share
GRANT ALL PRIVILEGES ON * . * TO 'root'@'%' IDENTIFIED BY '' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
|
-- This file should undo anything in `up.sql`
DROP INDEX ratings_user_id_idx;
DROP INDEX ratings_movie_id_idx;
DROP INDEX means_user_id_idx; |
<filename>Chapter05/10_min_max_handling_null.sql
SELECT
MIN(ISNULL(VacationHours, 0)) as MinVacationHours
, MAX(ISNULL(VacationHours, 0)) as MaxVacationHours
FROM HumanResources.EmpCopy |
<reponame>CSCfi/antero
use VipunenTK_lisatiedot
go
if not exists (select top 1 * from [dbo].[Vipunen_aineisto_kuutio] where [aineisto_avain] = 'TK_K2_4h')
begin
insert into [dbo].[Vipunen_aineisto_kuutio]([aineisto_avain], kuutio_avain)
values('TK_K2_4h', 'I_KL_TAB')
insert into [dbo].[Vipunen_aineisto_kuutio]... |
<gh_stars>1000+
-- 2020-05-04T12:41:28.523Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,AllowQuickInput,Created,CreatedBy,EntityType,HasTree,ImportFields,InternalName,IsActive,IsAdvancedTab,IsC... |
create table if not exists houses (
id serial primary key,
query char(100),
centroid geometry,
centroid_913 geometry,
population double precision,
virtual_population double precision
);
create index houses_id_ind on houses (id);
delete from houses; |
<filename>demo-sql/catalog.sql
alter session enable shard ddl;
-- USER SQL
CREATE USER "EXAMPLE_USER" IDENTIFIED BY "welcome1" ;
-- QUOTAS
-- ROLES
GRANT "CONNECT" TO "EXAMPLE_USER" ;
GRANT "RESOURCE" TO "EXAMPLE_USER" ;
-- SYSTEM PRIVILEGES
GRANT CREATE TABLESPACE TO "EXAMPLE_USER" ;
GRANT CREATE ANY TABLE TO "EXA... |
<filename>1sprintdemo.sql<gh_stars>0
\c azure_leaf
select name, class, race, username from characters; |
<reponame>ramitsingh/sqldbProj-poc
CREATE TABLE [SalesLT].[ProductCategory] (
[ProductCategoryID] INT IDENTITY (1, 1) NOT NULL,
[ParentProductCategoryID] INT NULL,
[Name] [dbo].[Name] NOT NULL,
[rowguid] UNIQUEIDENTIFIER CONSTRAINT ... |
<gh_stars>0
create or replace package ut authid current_user as
/*
utPLSQL - Version 3
Copyright 2016 - 2021 utPLSQL Project
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:... |
<gh_stars>1-10
DROP TABLE vm_template_image_map;
DROP TABLE vm_templates;
|
<reponame>nathnael/cats
CREATE FUNCTION [dbo].[netsqlazman_ItemsHierarchy] ()
RETURNS TABLE
AS
RETURN
SELECT dbo.[netsqlazman_ItemsHierarchyTable].*
FROM dbo.[netsqlazman_ItemsHierarchyTable] INNER JOIN
dbo.[netsqlazman_Items]() Items ON dbo.[netsqlazman_ItemsHierarchyTable].ItemId... |
<gh_stars>100-1000
--liquibase formatted sql
--changeset awhelms:electrode_ota_db_0_0_1 dbms:mariadb
CREATE TABLE user (
id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(128) NOT NULL UNIQUE KEY,
create_time DATETIME(3) DEFAULT CURRENT_TIMESTAMP,
name VARCHAR(128) NULL
); |
<gh_stars>10-100
CREATE PROCEDURE SP474(OUT MYCOUNT INTEGER) SPECIFIC SP474_130218 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE232;SELECT COUNT(*)INTO MYCOUNT FROM TABLE197;SELECT COUNT(*)INTO MYCOUNT FROM TABLE458;SELECT COUNT(*... |
<reponame>igarny/pscheduler
--
-- Table with one row that holds control values
--
DO $$
DECLARE
t_name TEXT; -- Name of the table being worked on
t_version INTEGER; -- Current version of the table
t_version_old INTEGER; -- Version of the table at the start
BEGIN
--
-- Preparation... |
BEGIN TRANSACTION
CREATE TABLE dbo.Tmp_estateban
(
EstateID int NOT NULL,
bannedUUID varchar(36) NOT NULL,
bannedIp varchar(16) NULL,
bannedIpHostMask varchar(16) NULL,
bannedNameMask varchar(64) NULL
) ON [PRIMARY]
IF EXISTS(SELECT * FROM dbo.estateban)
EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, banned... |
<filename>talos/tests/T026.ddl
def Main = {
@v1 = UInt8;
@v2 = UInt8;
20 < v2 is true;
} |
-- @testpoint:opengauss关键字enum(非保留),作为数据库名
--关键字不带引号-成功
drop database if exists enum;
create database enum;
drop database enum;
--关键字带双引号-成功
drop database if exists "enum";
create database "enum";
drop database "enum";
--关键字带单引号-合理报错
drop database if exists 'enum';
create database 'enum';
--关键字带反引号-合理报错
drop datab... |
<gh_stars>0
-- @testpoint:opengauss关键字nologin(非保留),作为模式名
--关键字不带引号-成功
drop schema if exists nologin;
create schema nologin;
drop schema nologin;
--关键字带双引号-成功
drop schema if exists "nologin";
create schema "nologin";
drop schema "nologin";
--关键字带单引号-合理报错
drop schema if exists 'nologin';
create schema 'nologin';
--... |
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字set非保留),作为序列名
--关键字不带引号-成功
drop sequence if exists set;
create sequence set start 100 cache 50;
drop sequence set;
--关键字带双引号-成功
drop sequence if exists "set";
create sequence "set" start 100 cache 50;
drop sequence "set";
--关键字带单引号-合理报错
drop sequence if exis... |
/*******************************************************
Script: co859.sql
Date: Oct 05, 2020
Description: Create co859 Database objects for Real Estate Property
********************************************************/
-- Setting NOCOUNT ON suppresses completion messages for each INSERT
SET NOCOUNT ON
-- Se... |
<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : 墨阳
Source Server Type : MySQL
Source Server Version : 80026
Source Host : localhost:3306
Source Schema : zero
Target Server Type : MySQL
Target Server Version : 80026
File Encoding : 65001
Date: 08/02/2022 ... |
<filename>db/full_db_chuan.sql/crawl-data-amazon_transaction.sql
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: crawl-data-amazon
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.19-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... |
<filename>Logingservlet/BaseUsuarios.sql
create database Login;
use Login;
create table Usuarios(
usuario varchar(20) not null,
cont varchar(20) not null
);
select * from Usuarios; |
-- permission for List Users
INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES (1, 152);
UPDATE `tblusers` SET `last_login`=NULL WHERE `last_login`='0000-00-00 00:00:00';
UPDATE `tblusers_clients` SET `last_login`=NULL WHERE `last_login`='0000-00-00 00:00:00';
UPDATE `tblemails` SET `attachments`='[]' WHERE `at... |
<gh_stars>0
REPLACE INTO ?:yad_statuses (yad_status_id, yad_status_code) VALUES(0, 'DRAFT');
REPLACE INTO ?:yad_statuses (yad_status_id, yad_status_code) VALUES(1, 'VALIDATING');
REPLACE INTO ?:yad_statuses (yad_status_id, yad_status_code) VALUES(2, 'VALIDATING_ERROR');
REPLACE INTO ?:yad_statuses (yad_status_id, yad_s... |
USE TSQL_Koans
SET ANSI_PADDING ON
GO
EXEC tSQLt.NewTestClass 'AboutFunctions'
GO
/*
http://msdn.microsoft.com/en-us/library/ms174318.aspx
*/
CREATE FUNCTION AboutFunctions.Fake_ComputeCommission (@EmployeeId INT, @RevenueFromSales DECIMAL(10,4))
RETURNS DECIMAL(10,4)
AS
BEGIN
RETURN 1234.5678;
END;
GO
CREATE PR... |
SELECT * FROM %s WHERE issuer=:client_id AND subject=:subject AND audience=:audience AND expires=:expires AND jti=:jti', $this->config['jti_table']));
CREATE TABLE {$this->config['jwt_table']} ( client_id VARCHAR(80) NOT NULL, subject VARCHAR(80), public_key VARCHAR(2000) NOT NULL )
SELECT * from %s where client_id = :... |
<gh_stars>1-10
alter table egbpa_buildingdetail add column machineroom double precision;
alter table egbpa_buildingdetail add column fromgroundwithwostairroom double precision;
alter table egbpa_buildingdetail add column fromstreetwithwostairroom double precision;
alter table egbpa_buildingdetail add column townplannin... |
/*
* Rename the phone field to phone_cell.
*
* This intentionally conflicts with 2_rename_phone_to_home.sql!
*/
ALTER TABLE employee CHANGE phone phone_cell VARCHAR(10);
|
<filename>sources/test/cg_test_base_fragment.sql
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-- test base table with combination of fields
create table bar(
id INTEGER NOT N... |
DROP TABLE IF EXISTS public.public_keys;
|
<reponame>ankigupt0000/InsuranceManagment<gh_stars>0
-- ******************************************
-- Database dump of "Insurence Management"
-- Author : <NAME>
-- email : <EMAIL>
-- URL : http://sourceforge.net/projects/insurencemgmt/
-- ******************************************
-- phpMyAdmin SQL Dump
-- version... |
<filename>db/sql/src/main/resources/org/kuali/rice/rice-sql/initial-db/sql/oracle/KRMS_AGENDA_T.sql
--
-- Copyright 2005-2014 The Kuali Foundation
--
-- Licensed under the Educational Community License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a ... |
CREATE TABLE m_audit_event_new (
id NUMBER(19, 0) GENERATED BY DEFAULT ON NULL AS IDENTITY,
attorneyName VARCHAR2(255 CHAR),
attorneyOid VARCHAR2(36 CHAR),
channel VARCHAR2(255 CHAR),
eventIdentifier VARCHAR2(255 CHAR),
eventStage NUMBER(10, 0),
eventType ... |
<filename>sqls/fa_attachment.sql<gh_stars>0
INSERT INTO `fa_attachment`(`id`, `category`, `admin_id`, `user_id`, `url`, `imagewidth`, `imageheight`, `imagetype`, `imageframes`, `filename`, `filesize`, `mimetype`, `extparam`, `createtime`, `updatetime`, `uploadtime`, `storage`, `sha1`) VALUES (1, '', 1, 0, '/assets/img/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.