sql stringlengths 6 1.05M |
|---|
ALTER TABLE REISETILSKUDD
ADD STATUS VARCHAR(10) NOT NULL;
ALTER TABLE REISETILSKUDD
ADD OPPFOLGENDE INTEGER NOT NULL;
|
DROP TABLE IF EXISTS `test_159`; |
use caldb;
/* Department DB 스키마 (학과 이름 데이터)
name : 학과이름 (pk) / subject, professor, student 테이블에서 참조
*/
truncate Department;
INSERT INTO Department(name)
VALUES("컴퓨터공학부");
INSERT INTO Department(name)
VALUES("정보통신학과");
INSERT INTO Department(name)
VALUES("경제학과");
INSERT INTO Department(name)
VALUES("영어영문학과");
INSERT ... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 26, 2022 at 05:20 AM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 8.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>sman6solsel.sql
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 21 Jun 2020 pada 10.47
-- Versi server: 10.4.10-MariaDB
-- Versi PHP: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00"... |
CREATE TABLE `idus`.`member` (
`seq` INT(11) NOT NULL AUTO_INCREMENT COMMENT '멤버SEQ',
`userName` VARCHAR(50) NOT NULL COMMENT '이름',
`nickname` VARCHAR(50) NOT NULL COMMENT '넥네임',
`passwd` VARCHAR(100) NOT NULL COMMENT '비밀번호',
`phone` VARCHAR(100) NOT NULL COMMENT '전화번호',
`email` VARCHAR(150) NOT... |
create table intficapar (
id varchar(45),
type varchar(45),
name varchar(200),
rate decimal(10,2),
created_by varchar(45),
created_at timestamp,
updated_by varchar(45),
updated_at timestamp
)
|
<gh_stars>1-10
create table produtos(
id int primary key auto_increment,
nome varchar(100) not null,
descricao text
);
|
<reponame>Nonanti/UnturnedStore
CREATE TABLE dbo.MessageReplies
(
Id INT IDENTITY(1,1) NOT NULL CONSTRAINT PK_MessageReplies PRIMARY KEY,
MessageId INT NOT NULL CONSTRAINT FK_MessageReplies_MessageId FOREIGN KEY REFERENCES dbo.Messages(Id),
UserId INT NOT NULL CONSTRAINT FK_MessageReplies_UserId FOREIGN KEY REFEREN... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th9 28, 2021 lúc 03:18 PM
-- Phiên bản máy phục vụ: 10.4.19-MariaDB
-- Phiên bản PHP: 7.4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!4010... |
-- file:arrays.sql ln:579 expect:true
select array_agg(distinct ar order by ar desc)
from (select array[i / 2] from generate_series(1,10) a(i)) b(ar)
|
<gh_stars>100-1000
-- CONTENT PLACEHOLDERS
DELETE FROM `sys_pages_content_placeholders` WHERE `module` = 'bx_timeline';
-- PAGES & BLOCKS
DELETE FROM `sys_objects_page` WHERE `module` = 'bx_timeline';
DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_timeline' OR `object` IN('bx_timeline_view', 'bx_timeline_view_h... |
-- 2018-07-16T15:49:09.414
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsUpdateable='N',Updated=TO_TIMESTAMP('2018-07-16 15:49:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=8757
;
|
DROP TABLE IF EXISTS process;
CREATE TABLE process (
id INT AUTO_INCREMENT PRIMARY KEY,
priority INT NOT NULL,
start_time TIMESTAMP NOT NULL
); |
--
-- Copyright (c) 2013, Yatta Tech and/or its affiliates. All rights reserved.
-- YATTATECH PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
--
CREATE TABLE uf (
"cd_uf" INTEGER PRIMARY KEY NOT NULL,
"uf_desc" TEXT NOT NULL
)
|
<reponame>alexavila150/luciddb
set schema 's';
SELECT COUNT(*) FROM BENCH1M B2, BENCH1M B1
WHERE
B1.K100K = 49
AND B1.K250K = B2.K500K
;
SELECT COUNT(*) FROM BENCH1M B2, BENCH1M B1
WHERE
B1.K40K = 49
AND B1.K250K = B2.K500K
;
SELECT COUNT(*) FROM BENCH1M B2, BENCH1M B1
WHERE
B1.K10K = 49
AND B1.K25... |
/* 9.1 Get salary of musician with ID_MUSICIAN = musicianId */
CREATE FUNCTION "DBA"."getSalary"( IN musicianId INTEGER )
RETURNS INTEGER
DETERMINISTIC
BEGIN
DECLARE salary INTEGER;
DECLARE musician INTEGER;
SET musician = musicianId;
SET salary = (SELECT Salary FROM Musician WHERE musician = Music... |
CREATE PROCEDURE [sp_sel_Hub]
AS
SELECT
[HubID],
[Name],
[HubOwnerID]
FROM
[dbo].[Hub] |
-- Add up migration script here
create table config_values (
name text primary key,
value text
);
insert into config_values
select name, value from configs;
drop table configs;
create table configs(
name text not null,
id text not null,
value text,
primary key (name, id)
);
create index conf... |
CREATE FUNCTION func595() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE449);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE132);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE336);val:=(SELECT COUNT(*)INTO MYCOU... |
<reponame>dspflash/3ucsERP
USE `xbs`;
delete from address;
delete from ap_payment_header;
delete from ap_payment_line;
delete from ap_transaction_detail;
delete from ap_transaction_header;
delete from ap_transaction_line;
delete from ar_customer;
delete from ar_customer_bu;
delete from ar_customer_relation;
delete from... |
<gh_stars>1-10
--
-- 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 "Lice... |
<filename>ArcanaErp.Database/dbo/Tables/Position.sql<gh_stars>0
CREATE TABLE [dbo].[Position] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[PartyId] INT NULL,
[PositionTypeId] INT NULL,
[EstimatedFromDate] DATE NULL,
[EstimatedThroughDate] DATE ... |
<filename>gemini-resin-archetype/src/main/resources/archetype-resources/database/mysql/migration/00002 Insert Testing Accounts.sql<gh_stars>0
/* Inserts some testing user accounts. Delete these in a production environment. */
/* Username / Password: user / password */
INSERT INTO `user` (userusername, userfirstname, ... |
# init.sql
create database techincm_botasbom;
use techincm_botasbom;
source /db/techincm_botasbom.sql;
create user appuser identified by "appuserPasswd";
grant all privileges on techincm_botasbom.* to appuser@'%'; |
start TRANSACTION;
CREATE TABLE date_ (
d_datekey INT, -- identifier, unique id -- e.g. 19980327 (what we use)
d_date STRING, -- varchar(18), --fixed text, size 18, longest: december 22, 1998
d_dayofweek STRING, -- varchar(8), --fixed text, size 8, sunday, monday, ..., ... |
<filename>src/app/voltdb/voltdb_src/tests/sqlcoverage/template/int/advanced-ints.sql
<configure-for-ints.sql>
<advanced-template.sql>
-- Additional test of GROUP BY and aggregate functions, with CAST function (like ENG-18549, but w/o ?)
SELECT _variable[#GB], CAST(_value[byte] AS INTEGER) + @agg(_variable[@columntype]... |
-- @testpoint:openGauss保留关键字Collation作为作为表空间名,
--不带引号,合理报错
drop tablespace if exists Collation;
CREATE TABLESPACE Collation RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
--加双引号,创建成功
drop tablespace if exists "Collation";
CREATE TABLESPACE "Collation" RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
--... |
<reponame>anilnepal14949/inventory_suppliers
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 08, 2016 at 04:36 AM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
<reponame>alittihadalislami/sim<filename>file/tambah_santri_agt.sql<gh_stars>0
INSERT INTO `t_agtkelas` (santri_id, kelas_id, tahun_id)
SELECT a.`santri_id`, a.`kelas_id`, 3 AS tahun_id
FROM t_agtkelas a
WHERE tahun_id = 2 |
<reponame>Uassource4cicipjtyuliputri/sistem-informasi-pengelolaan-data-siswa-anggota-perpustakaan-di-smkn-1-kisaran
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 24, 2020 at 08:43 AM
-- Server version: 5.6.21
-- PHP Version: 5.5.19
SET SQL_MODE = "N... |
-- =============================================
-- Author: <NAME>
-- Create date: 6/9/2015 4:10 am
-- Description:
-- =============================================
CREATE FUNCTION FindInStoredProc
(
@search nvarchar(250)
)
RETURNS TABLE
AS
RETURN
(
SELECT DISTINCT
o.name AS Object_Name,
o.type_d... |
<filename>Intro to Computer Science/lab7/3.sql
SELECT
name
FROM
songs
ORDER BY
duration_ms DESC
LIMIT
5 |
-- THIS IS THE POPULATION SCRIP FOR LIVE DATABASE CHANGE ONLY WITH TEAM APPROVAL --
INSERT IGNORE INTO activities (id, name, description, price, group_size, duration, start_time, age_restriction,
height_restriction, full_description, img_link1, img_link2)
VALUES (1, 'GoKart', 'Accelerate ... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 14, 2021 at 02:47 PM
-- 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... |
CREATE PROC usp_GetTownsStartingWith @prefixName NVARCHAR(10) AS
SELECT Name AS Town
FROM Towns
WHERE LEFT(Name, LEN(@prefixName)) = @prefixName
EXEC usp_GetTownsStartingWith 'B' |
IF OBJECT_ID('[HumanResources].[vJobCandidateEducation]') IS NOT NULL
DROP VIEW [HumanResources].[vJobCandidateEducation];
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW [HumanResources].[vJobCandidateEducation]
AS
SELECT
jc.[JobCandidateID]
,[Education].ref.value(N'declare default eleme... |
-- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
--
-- Host: 192.168.1.131 Database: WHEATHERSTATION
-- ------------------------------------------------------
-- Server version 5.5.5-10.3.25-MariaDB-0+deb10u1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RE... |
--------------------------------------------------------------------------------
--Example #12: Create ranks using ascending heigth within gender
--------------------------------------------------------------------------------
select c.*
, rank() over (partition by c.gender order by c.height) as ht_rank
, d... |
CREATE PROCEDURE [dbo].[InsertNewPersonLanguageProficiency]
@PersonLanguageProficiencyId int output ,
@PersonId int,
@LanguageId int,
@CanRead bit,
@CanWrite bit,
@CanSpeak bit
AS
INSERT INTO [Person].[PersonLanguageProficiency] (
[PersonId],
[LanguageId],
[CanRead],
[CanWrite]... |
<filename>src/test/resources/io.test_50.sql
-- io.test
--
-- execsql { INSERT INTO abc VALUES('c', 'd') }
INSERT INTO abc VALUES('c', 'd') |
<filename>Patches/Live_17/Raw_SQL/02_BALANCE_Hmech_srf_area__2020_01_28.sql
USE [perpetuumsa]
GO
---------------------------------------------------------
--Misc Balancing for Patch 17: Hmech srf area, T4 shield to match, Green HM/Mech reactor
--15->25 Combats
--14->23 Syndicate Combats
--14->23 Industrial
--12->15 Gl... |
<reponame>applemorshed/Person-Database-with-Oracle-PL-SQL
-----------INSERT DATA INTO TABLE --------------------------
DROP PROCEDURE HM_BANK_INFO;
DROP PROCEDURE HM_CAR_INFO;
DROP PROCEDURE HM_EDUCATION_TABLE;
DROP PROCEDURE HM_FAMILY_TABLE;
DROP PROCEDURE HM_HOUSE_TYPE;
DROP PROCEDURE HM_JOB_TABLE;
DROP P... |
/*
Autheur: <NAME>
Fichier: afficherRabais.sql
Travail: Projet synthèse
Details: Affiche le rabais
*/
SET SERVEROUTPUT ON
SET VERIFY OFF
PROMPT
ACCEPT leNumClient PROMPT "Entrer le numClient: "
ACCEPT laDate PROMPT "Entrer la date: "
PROMPT
DECLARE
-- variables internes pour saisir le user input externe, du meme t... |
/*
Chronic Condition
Onset Date
Still Active
Previous Admissions (Notes)
*/ |
INSERT INTO AUTH_ROLE_DEF(ID,NAME,TENANT_ID) VALUES(3,'账号管理员','1');
INSERT INTO AUTH_ROLE_DEF(ID,NAME,TENANT_ID) VALUES(4,'实验管理员','1');
INSERT INTO AUTH_ROLE_DEF(ID,NAME,TENANT_ID) VALUES(5,'内容管理员','1');
INSERT INTO AUTH_ROLE_DEF(ID,NAME,TENANT_ID) VALUES(6,'行政管理员','1');
INSERT INTO AUTH_ROLE_DEF(ID,NAME,TENANT_ID) V... |
alter table company add column contact_email varchar(255); |
-- Taken from https://github.com/dremio/dremio-oss/blob/master/sabot/kernel/src/test/resources/queries/tpch/
select
o.o_orderpriority,
count(*) as order_count
from
"orders" o
where
o.o_orderdate >= date '1996-10-01'
and o.o_orderdate < date '1996-10-01' + interval '3' month
and
exists (
select
*... |
/**
测试环境信息
CN:127.0.0.1
WORKER1:worker_1_host/57637
WORKER2:worker_2_host/57638
WORKER3:worker_3_host/57639
worker_1_host、worker_2_host、worker_3_host:都是127.0.0.1
*/
set datestyle = ISO, YMD;
set search_path = cigration_regress_test, cigration, public;
set citus.shard_count = 8;
set client_min_messages to... |
/*
Navicat MySQL Data Transfer
Source Server : mysql-127.0.0.1
Source Server Version : 80020
Source Host : 127.0.0.1:3306
Source Database : xmodule
Target Server Type : MYSQL
Target Server Version : 80020
File Encoding : 65001
Date: 2020-08-04 20:49:30
*/
SET FOREIGN_KEY_CHECKS=0;... |
<reponame>andrewsmike/jasmine
SELECT "HI";
SELECT 'YO';
SELECT 1;
SELECT 1.4;
SELECT 1E-3;
SELECT a.b;
|
<filename>webapp/src/main/resources/db/migration/V1__Initial_Setup.sql
create table `drop` (id bigint not null auto_increment, created_date datetime, last_modified_date datetime, canceled bit, drop_exporter_config varchar(255), drop_exporter_type varchar(255), last_imported_date datetime, name varchar(255), created_by_... |
<gh_stars>0
/*
* This file is released under the terms of the Artistic License. Please see
* the file LICENSE, included in this package, for details.
*
* Copyright (C) 2003 Open Source Development Lab, Inc.
* 2003-2021 <NAME>
*
* Based on TPC-C Standard Specification Revision 5.11 Clause 2.6.... |
select T1.hostel, sroll, T1.parent_inc
from stud, (select hostel, max(parent_inc) as parent_inc
from stud group by hostel) T1
where stud.hostel = T1.hostel
and stud.parent_inc = T1.parent_inc;
|
<gh_stars>1-10
--TEST: A cub_server core was thrown when run "execute reject" (in intl_identifier_casecmp at ../../src/base/intl_support.c:2771)
drop table if exists x;
create table x(a int);
prepare x from 'insert into x values(ifnull(?,1))';
execute reject;
deallocate prepare x;
prepare x from 'delete from x whe... |
CREATE TABLE "kvstore" (
"user_id" character varying (64) NOT NULL,
"key" character varying (128) NOT NULL,
"value" character varying (1024) NOT NULL,
"tag" character varying (128) NOT NULL,
"timestamp" bigint NOT NULL,
CONSTRAINT "kvstore_pkey"
PRIMARY KEY ("user_id", "key"));
CREATE ... |
--
-- Copyright (C) Analytics Engines
-- 2021 <NAME> (<EMAIL>)
--
insert into public_api.enrichment_def (document_type_id,name,type,is_manual)
values ((select id from public_api.document_type where name = 'legislation.gov.uk'),'labelled stuff','text',true);
-- select update_enrichment_def((select id from public_api... |
USE ipc_master1
INSERT INTO t_typeGenerateur(id,mode,description)
VALUES (
NULL , "SU", "Surchauffeur"
);
|
SELECT name FROM people WHERE id IN
(SELECT person_id FROM stars WHERE movie_id IN
(SELECT movie_id FROM stars WHERE person_id IN
(SELECT id FROM people WHERE name = "<NAME>" AND birth = 1958))) AND name != "<NAME>"; |
<reponame>143umohsinkhan/VTS
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Question1]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Question1](
[QuestionID] [bigint] IDENTITY(1,1) NOT NULL,
[OriginalSentence] [varchar](max) NOT NULL,
[QuestionSentence] [varchar](max) NOT NULL,
PRIMA... |
<filename>GenGetSet.sql
DECLARE @TableName sysname = 'YourTableName'
DECLARE @result varchar(max) = 'public class ' + @TableName + '
{'
SELECT
@result = @result
+ CASE
WHEN ColumnDesc IS NOT NULL THEN '
/// <summary>
/// ' + ColumnDesc + '
/// </summary>'
ELSE ''
END
+ '
pub... |
-- =============================================
-- Author: <NAME>
-- Create date: 7/13/2014 12:18 am
-- Description:
-- =============================================
CREATE PROCEDURE [dbo].[GetPageList]
@websiteId int = 0,
@orderby int = 1,
@subonly bit = 0,
@filter nvarchar(10) = '',
@start int = 1,
@length... |
--
-- Database: `phpsamples`
--
-- --------------------------------------------------------
--
-- Table structure for table `tbl_registered_users`
--
CREATE TABLE `tbl_registered_users` (
`id` int(10) NOT NULL,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL
) E... |
<reponame>Agungzbudiman/kuro_game_flapping
/*
Navicat MySQL Data Transfer
Source Server : my sql
Source Server Version : 100316
Source Host : localhost:3306
Source Database : flapping_bird
Target Server Type : MYSQL
Target Server Version : 100316
File Encoding : 65001
Date: 2020-06... |
CREATE TABLE mpm (
prodi NUMBER NOT NULL,
kode TEXT(6) NOT NULL,
kuliah TEXT NOT NULL
);
INSERT INTO mpm VALUES (5, 'ISL304', 'Analisa Proses Bisnis');
INSERT INTO mpm VALUES (5, 'IKS323', 'Analisis dan Pemodelan Perangkat Lunak');
INSERT INTO mpm VALUES (3, 'IKS323', 'Analisis dan Pemodelan Perangkat Lunak');
I... |
DROP TABLE IF EXISTS `paymenttype`;
|
<reponame>schmandr/gretljobs
SELECT
"Nichtschaden-ID" AS nichtschaden_id,
"Kontaktperson_AfU" AS kontaktperson_afu,
"Datum" AS datum,
"Ort" AS ort,
"Strasse_Nr" AS strasse_nr,
"x-Koordinate" AS x_koordinate,
"y-Koordinate" AS y_koordinate,
"Kurzbeschrieb" AS kurzbeschrieb,
"Bemerkung... |
<gh_stars>10-100
USE TestDB;
EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
EXEC sp_msforeachtable 'DROP TABLE ?'
CREATE TABLE student (
ID INTEGER,
Name VARCHAR(50)
);
INSERT INTO student values ('10', 'Venus');
|
<reponame>jbt00000/RevolutionaryStuff<gh_stars>1-10
CREATE proc [db].[AssertNull]
@actual int,
@msg varchar(4000)=null
as
begin
if (@actual is not NULL)
begin
set @msg = 'AssertNull FAIL as value ['+cast(@actual as varchar(20))+'] is not null: '+@msg;
throw 50001, @msg, 1;
end
end
GO
CREATE proc [db].[A... |
<filename>backendbackup/Dump20201027.sql
CREATE DATABASE IF NOT EXISTS `ravesppe` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `ravesppe`;
-- MySQL dump 10.13 Distrib 8.0.22, for Linux (x86_64)
--
-- Host: 192.168.0.3 Database: ravesppe
-- -----------... |
<gh_stars>0
/* HOMEWORK 6
CMPSC 430
<NAME> */
declare
dept instructor.dept_name%TYPE;
avgsal instructor.salary%TYPE;
cursor SalCursor is
select dept_name, avg(salary)
from instructor
group by dept_name;
begin
open SalCursor;
dbms_output.put_line(' Department Salary');
d... |
# --- !Ups
create table competitor (
id SERIAL PRIMARY KEY,
name text not null
);
create table competition (
id SERIAL PRIMARY KEY,
name text not null,
date timestamptz not null
);
create table points (
id SERIAL PRIMARY KEY,
points JSON not null
);
cr... |
-- 1
CREATE TABLE MEMBER (
MEMBER_ID NUMBER(10),
MEMBER_EMAIL VARCHAR(50),
MEMBER_PASSWORD VARCHAR(256),
MEMBER_NAME VARCHAR(50),
MEMBER_AGE NUMBER(10),
MEMBER_TYPE NUMBER(10),
PRIMARY KEY (MEMBER_ID),
UNIQUE (MEMBER_EMAIL)
);
/
CREATE SEQUENCE MEMBER_SEQUENCE START WITH 1 INCREM... |
CREATE TABLE `s_unlocked_items` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`item_code` char(6) NOT NULL,
`item_name` varchar(32) NOT NULL DEFAULT '',
`unlocked_time` int(10) unsigned NOT NULL COMMENT '解禁时间',
`unlocked_type` varchar(32) NOT NULL DEFAULT '' COMMENT '解禁类型,如:首发原股东限售股份',
`circulation_perce... |
/* Table B would get one top level region for total
And sub-level regions column
Row headers - Turnover variables
Column headers - Sub-level of Oblasts/Regions/Counties, Rayons level
*/
/*
RegionLevel for kyrgyz database:
1 Level : Kyrgyz Republic - Country level
2 Level : Area, Oblast, Region, Count... |
-- Verify connectivity-intake:schemas/private on pg
begin;
select pg_catalog.has_schema_privilege('connectivity_intake_private', 'usage');
rollback;
|
<reponame>loujine/musicbrainz-server<gh_stars>100-1000
CREATE INDEX CONCURRENTLY artist_idx_area ON artist (area);
CREATE INDEX CONCURRENTLY artist_idx_begin_area ON artist (begin_area);
CREATE INDEX CONCURRENTLY artist_idx_end_area ON artist (end_area);
CREATE INDEX CONCURRENTLY label_idx_area ON label (area);
-- re... |
<reponame>inest-us/db
create table book_author_title
(
title_id bigint not null references book_titles(title_id),
auth_id int not null references book_authors(auth_id),
unique key _aut_title_key_1 (title_id, auth_id)
) |
SELECT TOP (1000) [SaleID]
,[CreatedOn]
,[Description]
FROM [dbo].[Sale]
ORDER BY SaleID DESC |
INSERT INTO dog VALUES (3,'Bertold',98898,FALSE,12);
INSERT INTO owner VALUES (13,'<NAME>');
INSERT INTO registration VALUES (70,9299,TRUE,11);
SELECT id_dog, dog_name FROM dog WHERE (contract ='TRUE' and id_dog_club = '10');
SELECT registration.id_registration, owner.id_owner, owner.owner_name FROM registration INNER... |
<filename>sap-real-estate-contract-sql-contract-data.sql
CREATE TABLE `sap_real_estate_contract_contract_data`
(
`InternalRealEstateNumber` varchar(13) NOT NULL,
`CompanyCode` varchar(4) DEFAULT NULL,
`RealEstateContract` varchar(13) DEFAULT NULL,
`REStatusObject` ... |
<reponame>lucas2500/Gestor-de-recursos<filename>Tabelas sql/tabelas_Triggers.sql
CREATE TABLE saidaFrances(
tipoProduto VARCHAR(100),
ID INT PRIMARY KEY AUTO_INCREMENT
);
CREATE TABLE saidaDoceComprido(
tipoProduto VARCHAR(100),
ID INT PRIMARY KEY AUTO_INCREMENT
);
CREATE TABLE saidaDoceCortado(
tipoProduto VARCH... |
<filename>schema/articles.sql<gh_stars>0
CREATE TABLE articles (
id CHAR(32) NOT NULL PRIMARY KEY,
channel_id CHAR(32) NOT NULL,
url VARCHAR(255) NOT NULL,
title VARCHAR(255) NOT NULL,
description TEXT,
published_at int,
created_at int,
updated_at int
);
|
<filename>db_sarpras.sql<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80022
Source Host : localhost:3306
Source Schema : db_sarpras
Target Server Type : MySQL
Target Server Version : 80022
File Encodin... |
# 04. Appetizers Count
#
# Write a query to retrieve the count of all appetizers (category id = 2)
# with price higher than 8.
USE restaurant;
SELECT count(*)
FROM products p
WHERE p.price > 8
GROUP BY p.category_id
HAVING p.category_id = 2; |
<gh_stars>1-10
SELECT BasePath,
COUNT(Name) as NumMachines,
MAX(Cast ((JulianDay(datetime('{scanDateTime}')) - JulianDay(LastPasswordSet)) As Integer)) as PasswordAge
FROM SPN
WHERE LastPasswordSet <= datetime('{scanDateTime}', '-{expirationDays} days')
AND NOT (Name LIKE '%*%'
OR Name LIKE ''
OR Name LIKE 'S-%'... |
<filename>src/test/resources/sql/alter_user_mapping/0f1135f0.sql
-- file:rolenames.sql ln:314 expect:true
ALTER USER MAPPING FOR CURRENT_USER SERVER sv1
OPTIONS (SET user 'CURRENT_USER_alt')
|
/*
Navicat MySQL Data Transfer
Source Server : mysql_local
Source Server Version : 50621
Source Host : localhost:3306
Source Database : finalschedule
Target Server Type : MYSQL
Target Server Version : 50621
File Encoding : 65001
Date: 2016-02-12 20:17:35
*/
SET FOREIGN_KEY_CHECKS=... |
\prompt 'Enter table name: ' tabname
select * from pg_indexes_cust where tablename = lower(:'tabname');
|
<gh_stars>1000+
-- 2018-05-29T07:47:32.898
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET Name='Wird gehandelt (Bestellkontrolle)',Updated=TO_TIMESTAMP('2018-05-29 07:47:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556495
;
-- 2018-05-29T07:48:32.952
-- I forgot t... |
CREATE OR REPLACE PACKAGE dz_sdotxt_util
AUTHID CURRENT_USER
AS
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
FUNCTION downsize_2d(
p_input IN MDSYS.SDO_GEOMETRY
) RETURN MDSYS.SDO_... |
If Exists(Select * from sys.columns where Name = N'AuditData' AND Object_ID = Object_ID(N'ord_Visit'))
BEGIN
ALTER TABLE ord_Visit DROP COLUMN AuditData
END
GO
If NOT Exists(Select * from sys.columns where Name = N'AuditData' AND Object_ID = Object_ID(N'ord_visit'))
BEGIN
ALTER TABLE ord_visit ADD AuditData XML
END
... |
<gh_stars>0
alter session SET NLS_DATE_FORMAT='dd/mm/rr hh24:mi:ss';
-- Backup optimization monitoring
COL STATUS FORMAT a9
COL hrs FORMAT 999.99
SELECT SESSION_KEY, INPUT_TYPE, STATUS, TO_CHAR(START_TIME,'mm/dd/yy hh24:mi') start_time,
TO_CHAR(END_TIME,'mm/dd/yy hh24:mi') end_time, ROUND(ELAPSED_SECONDS/60,2) ela... |
<filename>prototype/nacoss_db.sql
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 25, 2015 at 01:45 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... |
CREATE OR REPLACE PROCEDURE proc_zero_temp_accs
IS
CURSOR account_cur IS
SELECT account_no, account_type_code, account_balance
FROM account
WHERE account_type_code = 'EX' OR account_type_code = 'RE' ;
account_rec account_cur%rowtype;
processed VARCHAR2(100) := 'Zero out';
BEGIN
OPEN accou... |
USE [CosmOz]
GO
/****** Object: View [dbo].[Level3View] Script Date: 8/02/2019 3:38:15 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*
Keys and Example Usage:
***********************
========
Keys
========
a = AllStations Table
l1 = Level1View View
l2 = Level2View View
===========
EXAMPLE
=... |
#standardSQL
--
-- Retrieve heterozygous haplotype calls on chromosomes X and Y for male samples.
--
SELECT
reference_name,
start_position,
end_position,
reference_bases,
ARRAY_TO_STRING(ARRAY(SELECT a.alt FROM UNNEST(alternate_bases) AS a), ',') AS alt_concat,
c.name,
(SELECT STRING_AGG(CAST(g AS STRING)... |
update pg_proc set provolatile = 'i'
from pg_namespace
where pg_namespace.oid = pronamespace and nspname = 'oracle'
and proname in ('trunc','round','length','btrim','ltrim','rtrim','lpad','rpad');
update pg_type set typcollation = 100
where typname in ('varchar2', 'nvarchar2');
|
------------------------------------------------------------------------
--+ alltypes -- autogenerated package named alltypes
------------------------------------------------------------------------
create or replace package alltypes
as
--------------------------------------------------------------------
--+ p... |
/*Provide a query that shows the top 5 most purchased tracks over all.*/
SELECT t.TrackId, t.Name as TrackName, sum(il.TrackId) as TimesPurchased
FROM Track t, Invoice i, InvoiceLine il
WHERE t.TrackId = il.TrackId
and i.InvoiceId = il.InvoiceId
GROUP BY t.Name
ORDER BY TimesPurchased DESC limit 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.