sql stringlengths 6 1.05M |
|---|
DROP DATABASE IF EXISTS custom_db;
CREATE DATABASE custom_db;
USE custom_db;
|
<gh_stars>0
CREATE TABLE [Source].[RescueTimeActivityHistory]
(
[Date] DATETIME NULL,
[NameShort] VARCHAR(100) NULL,
[NameLong] VARCHAR(MAX) NULL,
[Type] VARCHAR(50) NULL,
[Category] VARCHAR(50) NULL,
[Seconds] INT NULL
)
|
<filename>src/main/resources/db/migration/V3__add_columns_notes.sql
DELETE FROM Notes;
INSERT INTO Notes (candidate_id, content, created_at, created_by_id)
VALUES (0, 'Himanshu is a technology focused professional constantly looking to innovate and adapt to the situation.', now(), 0);
INSERT INTO Notes (candidate_id,... |
<filename>ordersquery.sql
SELECT O.O_ORDERSTATUS, O.O_ORDERPRIORITY
FROM ORDERS O
WHERE O.O_TOTALPRICE > 30000
;
|
DROP DATABASE IF EXISTS date_DB;
CREATE DATABASE date_DB;
USE date_DB;
CREATE TABLE `date_DB` (
`id` Int(30) AUTO_INCREMENT NOT NULL,
`weather` VARCHAR( 255),
`restuarant` VARCHAR( 255),
`food` VARCHAR( 255),
`movie` VARCHAR( 255),
`music` VARCHAR( 255),
`movieTime` VARCHAR( 6),
PRIMARY KEY ( `id` )
);
|
<reponame>mhdalmajid/restAPI-express-typescript-prisma<filename>prisma/migrations/20210319085755_init2/migration.sql
/*
Warnings:
- Added the required column `birthday` to the `Profile` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Profile" ADD COLUMN... |
<filename>sql/yjbb/603090.sql
EXEC [EST].[Proc_yjbb_Ins] @Code = N'603090',@CutoffDate = N'2017-09-30',@EPS = N'0.22',@EPSDeduct = N'0',@Revenue = N'2.58亿',@RevenueYoy = N'52.36',@RevenueQoq = N'-1.35',@Profit = N'2198.34万',@ProfitYoy = N'-24.20',@ProfiltQoq = N'-33.40',@NAVPerUnit = N'4.5770',@ROE = N'4.86',@CashPerUn... |
<gh_stars>0
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.5.5-10.4.13-MariaDB)
# Database: bblr
# Generation Time: 2020-07-10 08:55:08 +0000
# ***********************... |
ALTER TABLE triggers CHANGE type type ENUM('IMMEDIATE','LOCATION','QR','TIMER','AR') NOT NULL DEFAULT 'IMMEDIATE';
ALTER TABLE triggers ADD ar_target_id INT(32) UNSIGNED NOT NULL DEFAULT 0 AFTER seconds;
CREATE TABLE ar_targets ( ar_target_id INT(32) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, game_id INT(32) UNSIGNE... |
<gh_stars>1-10
create table project_run_report (
id INTEGER PRIMARY KEY AUTOINCREMENT,
project_name TEXT NOT NULL,
start_date Date NOT NULL,
commit_hash TEXT,
repo_pull_output TEXT,
status TEXT NOT NULL,
result TEXT,
flows TEXT
);
create table user (
id INT... |
<gh_stars>1-10
begin;
create schema if not exists widget;
create table widget.widget (
id uuid not null default public.uuid_generate_v4() primary key,
name text not null,
css text default 'div {
}'::text not null,
html text default '<div>
</div>'::text not null,
docs text
);
create table widget.event (
... |
<gh_stars>1-10
ALTER TABLE [dbo].[ZFC_FUNCTION_TYPES]
ADD CONSTRAINT [DF_ZFC_FUNCTION_TYPES_ADDED_DATE] DEFAULT (getdate()) FOR [ADDED_DATE];
|
<gh_stars>100-1000
# OJ: https://leetcode.com/problems/find-customer-referee/
# Author: github.com/lzl124631x
SELECT
name
FROM
customer
WHERE
referee_id <> 2 OR referee_id IS NULL |
-- The population of people, people living in cities, and people not living in cities in each continent.
SELECT country.continent,
(SUM(DISTINCT(country.population))) AS 'Total Population',
(SUM(DISTINCT(country.population)) - SUM(city.population)) AS 'NOT in cities',
((SUM(DISTINCT(country.po... |
-- MySQL dump 10.16 Distrib 10.3.9-MariaDB, for Win64 (AMD64)
--
-- Host: 127.0.0.1 Database: landlordcommunication
-- ------------------------------------------------------
-- Server version 10.3.9-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@... |
CREATE DATABASE IF NOT EXISTS `skinatechnologies` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `skinatechnologies`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: skinatechnologies
-- ------------------------------------------------------
-- Server version 5.7.18-log
/*!4010... |
CREATE TYPE testrowperl AS (f1 integer, f2 text, f3 text);
CREATE OR REPLACE FUNCTION perl_row() RETURNS testrowperl AS $$
return {f2 => 'hello', f1 => 1, f3 => 'world'};
$$ LANGUAGE plperl;
SELECT * FROM perl_row();
|
<filename>sql/_01_object/_07_alteration/_003_class_change/cases/1012.sql
--create a class,alter class add one method and the method's file,alter the class to change the method's file
CREATE CLASS ddl_0001;
ALTER CLASS ddl_0001 add method method1(int) int function method1 file '$HOME/method' ;
ALTER CLASS ddl_0001 ch... |
select ?subject ?predict ?object where {?subject <http://www.founder.20.link:52> <http://www.founder/106>; ?predict ?object . }
|
<reponame>1-SQL/Oido
CREATE TABLE `category` (
`idCategory` int(11) unsigned NOT NULL AUTO_INCREMENT,
`parent` int(11) unsigned DEFAULT NULL,
`category` int(11) unsigned NOT NULL,
PRIMARY KEY (`idCategory`),
UNIQUE KEY `idCategory_UNIQUE` (`idCategory`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `o... |
<reponame>flaviowu/nest-games
/*
Warnings:
- You are about to drop the column `createAt` on the `game` table. All the data in the column will be lost.
- You are about to drop the column `userId` on the `game` table. All the data in the column will be lost.
- You are about to drop the column `createAt` on the `... |
SELECT NAME FROM Employee
WHERE
months < 10
AND
salary > 2000
ORDER BY employee_id ASC |
CREATE TABLE Hauptkategorien (
ID INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
Name VARCHAR(255) NOT NULL UNIQUE
);
CREATE TABLE Produkte (
ID INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
Produktname VARCHAR(512) NOT NULL,
Preis INTEGER(10),
Link VARCHAR(1024),
HauptkategorieID INTEGER,
FOREIGN KE... |
<filename>sql/schema.sql
CREATE TABLE `hair-style`.`hrs_livre_d_or` ( `ldo_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `ldo_nom` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , `ldo_mail` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , `ldo_message` TEXT CHARACTER SET utf8 COLLATE utf8_ge... |
<reponame>ats-techteam/HR
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 29, 2020 at 09:44 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
<reponame>zhechu/jfinal_light
alter table sys_area modify column parent_id bigint(20) NOT NULL COMMENT '父级编号';
alter table sys_area modify column create_by bigint(20) DEFAULT NULL COMMENT '创建者';
alter table sys_area modify column update_by bigint(20) DEFAULT NULL COMMENT '更新者'; |
CREATE TABLE "todo-list" (
"id" SERIAL PRIMARY KEY,
"listItem" varchar(120) not null,
"isComplete" BOOLEAN DEFAULT FALSE);
INSERT INTO "todo-list" ("listItem")
VALUES ('climb at bouldering gym'), ('graduate from prime'), ('feed the cat'), ('get a job');
SELECT * FROM "todo-list"; |
<reponame>ShadowedMists/Bloodhound<gh_stars>0
CREATE TABLE [dbo].[EventTypes] (
[EventTypeId] INT IDENTITY (1, 1) NOT NULL,
[EventTypeName] NVARCHAR (128) NOT NULL,
CONSTRAINT [PK_EventTypes] PRIMARY KEY CLUSTERED ([EventTypeId] ASC)
);
|
<filename>src/main/resources/db/migration/V6__expanding_search_process.sql<gh_stars>0
ALTER TABLE public.managed_order
ADD COLUMN shipping_search_status text NOT NULL DEFAULT 'NONE';
|
<filename>db/U028__Test.sql<gh_stars>0
DROP TABLE IF EXISTS `test_028`; |
--Create database empresa
--go
--use empresa
--create table funcionario (codigo int primary key identity(1,1),
-- nome varchar(100),
-- matricula varchar(100))
select * from funcionario |
-- Metroid Prime
INSERT INTO categories (id, name, abbreviation, gameid) VALUES (1, 'Any%', 'any', 1);
INSERT INTO categories (id, name, abbreviation, gameid) VALUES (2, '100%', '100', 1);
INSERT INTO categories (id, name, abbreviation, gameid) VALUES (3, '21%', '21', 1);
INSERT INTO categories (id, name, abbreviation,... |
<reponame>Nrkozan/webinar
/*
Navicat Premium Data Transfer
Source Server : local
Source Server Type : MySQL
Source Server Version : 100411
Source Host : localhost:3306
Source Schema : webinar
Target Server Type : MySQL
Target Server Version : 100411
File Encoding : 650... |
create table refresh_tokens
(
refresh_token varchar(200) PRIMARY KEY,
user_id varchar(100) REFERENCES users (user_id),
session_id varchar(100) NOT NULL,
expires_at timestamptz NOT NULL,
created_at timestamptz NOT NULL,
deleted boolean DEFAULT false
); |
\pset pager off
\set ECHO queries
drop extension if exists vrptools;
create extension if not exists vrptools with schema public;
/*
select * from vrp_trashcollection(
'select gid as id, round(st_x(st_transform(geom,4326))::numeric,6)::float8 as x, round(st_y(st_transform(geom,4326))::numeric,6)::float8 as y,
0... |
select * from screen limit 1\G;
|
<reponame>Deathnerd/grocy
CREATE TABLE userfields (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
entity TEXT NOT NULL,
name TEXT NOT NULL,
caption TEXT NOT NULL,
type TEXT NOT NULL,
show_as_column_in_tables TINYINT NOT NULL DEFAULT 0,
row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime'))... |
<reponame>dkbarrett/odyssey
INSERT INTO `destination_type` (`id`, `destination_type`) VALUES
(1, 'Amenity Area'),
(2, 'Appellation'),
(3, 'Area'),
(4, 'Bank'),
(5, 'Basin'),
(6, 'Bay'),
(7, 'Beach'),
(8, 'Bend'),
(9, 'Bridge'),
(10, 'Building'),
(11, 'Bush'),
(12, 'Canal'),
(13, 'Canyon'),
(14, 'Cape'),
(15, 'Cave'),
(... |
INSERT INTO ontology_term
(acc, db_id, name, description, is_obsolete, replacement_acc)
VALUES
('MmusDv:0000040', 25, 'adult stage', 'Mouse developmental stage that refers to a mouse which is over 5 weeks old.', 1, 'MmusDv:0000110')
-- THESE ARE AUTOMATICALLY ADDED BY THE h2/schema.sql SCRIPT:
-- ('IMPC_S... |
<filename>csb-installer/tables/3_images.sql
CREATE TABLE `images` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`image_set_id` int(10) unsigned DEFAULT NULL,
`application_id` int(10) unsigned DEFAULT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`file_location` text COLLATE utf8_unicode_ci NO... |
library LungCancerScreeningCDS version '0.1.0'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'
include FHIRCommon version '4.0.1' called FC
include LungCancerConcepts called Cx
include LungCancerElements called LCE
context Patient
define ScreeningSummary: {
notifyPatient: "Notify Patient",
recom... |
<filename>spring-security-oauth2/oauth2-authorization-code/oauth2-authorization-code-qq/src/main/resources/script/data.sql
INSERT INTO `oauth_client_details` (`client_id`, `client_secret`, `scope`, `authorized_grant_types`, `access_token_validity`, `additional_information`)
VALUES ('account-service', 'secret', 'read', ... |
<reponame>rimig/sql-parser
ALTER TABLE test.t ALTER COLUMN c NOT NULL |
#namespace("wechatTemplate")
#sql("findByKeywords")
select wt.* from joy_wechat_template wt where wt.event_keywords like CONCAT('%,', #para(0), ',%')
#end
#end |
-- Deploy ggircs:function_transform to pg
-- requires: table_eccc_xml_file
begin;
-- @data string (with or without data)
create or replace function swrs_transform.transform(data text)
returns void as
$function$
declare
row record;
begin
-- Refresh views with data
for row in select matviewname from p... |
<reponame>Tim-Abwao/postgres-notes
BEGIN;
DROP TABLE IF EXISTS weather CASCADE;
CREATE TABLE weather (
city varchar(80),
temp_lo int, -- low temperature
temp_hi int, -- high temperature
prcp real, -- precipitation
date dat... |
-- These triggers behave more like PostgreSQL's default-from-sequence feature.
-- Work around a bering bug: it can't handle a PL/SQL block
-- at the top of a file.
SELECT SYSDATE FROM DUAL;
CREATE OR REPLACE TRIGGER SET_CSM_USER_GROU_USER_GROUP_R
BEFORE INSERT
ON CSM_USER_GROUP_ROLE_PG
REFERENCING NEW AS New OLD AS O... |
<reponame>dykuang/R-integrated-in-PostgreSQL
create or replace function plr_qqplot(y float[],x float[])
returns text as
'
pdf("D:/qqplot.pdf");
qqplot(x,y);
dev.off;
print("done");
'
language 'plr'; |
<gh_stars>0
CREATE TABLE `tblInvoiceDetail` (
`InvoiceDetailID` int(11) NOT NULL AUTO_INCREMENT,
`InvoiceID` int(11) NOT NULL,
`ProductID` int(11) DEFAULT NULL,
`Description` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
`StartDate` datetime DEFAULT NULL,
`EndDate` datetime DEFAULT NULL,
`Price` decimal(... |
<reponame>ethanpost/saas_asset
create or replace view saas_asset_demo_v as (
select a.asset_name,
a.asset_id,
(select asset_type_name from saas_asset_types where asset_type_id=a.asset_type_id) asset_type_name,
a.order_id,
a.created,
a.updated,
a.asset_type_id,
a.root_id,... |
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 05/07/2018 15:34:39 */
/*==============================================================*/
drop table if exists escenarios;
drop table if ex... |
<filename>database.ddl<gh_stars>0
CREATE TABLE IF NOT EXISTS Repositories(
RepoName varchar(50),
RepoDesc varchar(500),
RepoURL varchar(100),
primary key (RepoName)
);
INSERT INTO Repositories VALUES('test','test1','test2');
|
CREATE PROCEDURE [dbo].[uspActionTypeUpdate]
@ActionTypeID uniqueidentifier,
@ActionName nvarchar(50)
AS
SET NOCOUNT ON
SET XACT_ABORT ON
BEGIN TRAN
UPDATE [dbo].[ActionType]
SET [ActionTypeID] = @ActionTypeID, [ActionName] = @ActionName
WHERE [ActionTypeID] = @ActionTypeID
-- Begin Return Sel... |
-- dyadic Johnson
EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON)
SELECT ed.target_id, COUNT(ed.target_id) AS frequency, t2.term_text
FROM entity_dyadic AS ed, terms t, terms AS t2
WHERE ed.source_id = t.term_id
AND t.term_text ILIKE '<NAME>'
AND ed.target_id = t2.term_id
GROUP BY ed.target_id, t2.term_text... |
<reponame>madunstar/portal_terpadu_pesantren_
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 20, 2020 at 06:23 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;... |
--
-- Database version 8 Update script
--
-- 2012-06-28
--
-- This update adds the namespace table and adds relationships between the
-- permalink namespace.
-- Create namespace table
CREATE TABLE [namespace] (
[namespace_id] UNIQUEIDENTIFIER NOT NULL,
[namespace_internal_id] NVARCHAR(32) NOT NULL,
[namespace_nam... |
<reponame>ghentlivinglab/Personalized-mobility-information-service-solution-3<filename>postgres/persons.sql<gh_stars>0
insert into persons (id, first_name, last_name, email, mute_notifications, validated_email, validated_cell_number) values (1, 'Beverly', 'Smith', '<EMAIL>', true, true, true);
insert into persons (id, ... |
<reponame>Sachin121Kum/Complete-LaravelApi
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jan 19, 2021 at 07:10 AM
-- Server version: 8.0.21
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";... |
SET search_path = public, pg_catalog;
--
-- Table structure for table 'mtotacct'
--
CREATE TABLE mtotacct (
mtotacctid BIGSERIAL PRIMARY KEY,
username TEXT DEFAULT '' NOT NULL,
acctdate DATE DEFAULT 'now' NOT NULL,
connnum BIGINT,
conntotduration BIGINT,
connmaxduration BIGINT,
connmindurat... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 09, 2018 at 06:59 AM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
-- https://judge.softuni.bg/Contests/Practice/Index/671#0
CREATE DATABASE `closed_judge_system`;
USE `closed_judge_system`;
-- Section 1: Data Definition Language (DDL) – 40 pts
CREATE TABLE `users` (
`id` INT PRIMARY KEY,
`username` VARCHAR(30) UNIQUE NOT NULL,
`password` VARCHAR(30) NOT NULL,
`em... |
SELECT deposit_group, is_deposit_expired, AVG(deposit_interest) AS deposit_interest
FROM wizzard_deposits
WHERE deposit_start_date > '1985-01-01'
GROUP BY deposit_group , is_deposit_expired
ORDER BY deposit_group DESC , is_deposit_expired; |
alter table ads drop column targeting;
|
<gh_stars>1-10
-- script to print description for table in given DB
-- DML query to select description information
SHOW CREATE TABLE first_table;
|
CREATE SEQUENCE PUBLISHER_ID_AUTOINCREMENT_SEQ
START WITH 1000
INCREMENT BY 1;
|
INSERT INTO topics (title)
VALUES ('Super simple file server?'),
('Found a Spotify playlist that is :fire:'),
('Share your best NBA gifs!');
INSERT INTO messages (topic_id, author_initials, author_theme, content, posted)
VALUES (1, 'BT', 4, 'What is a simple tool/command for starting a file server fast?
... |
<reponame>daggerok/spring-batch-example<gh_stars>1-10
CREATE SCHEMA IF NOT EXISTS my_database DEFAULT CHARACTER SET utf8
;
CREATE
USER IF NOT EXISTS 'my_user'@'%' IDENTIFIED BY '<PASSWORD>'
;
GRANT ALL
ON my_database.* TO 'my_user'@'%'
;
flush
privileges
;
|
USE ProductCatalogDemo
GO
with
history as (
select ProductID, Name, Price, DateModified,
LAG (Price, 1, 1) over (partition by ProductID order by DateModified) as PrevPrice,
LEAD (Price, 1, 1) over (partition by ProductID order by DateModified) as NextPrice
from dbo.Product for system_time all
),
spikes as (
... |
IF EXISTS (select * from dbo.sysobjects where id = object_id(N'uspAddEntityProject') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE uspAddEntityProject
GO
/* uspAddEntityProject
*
*
*
*
*/
CREATE PROCEDURE uspAddEntityProject
@bntEntityIdent BIGINT,
@bntASUserIdent BIGINT,
@nvrName1 NVARCHAR(MAX... |
<reponame>hungtin3/SQL4OracleEBS<gh_stars>0
set pagesize 600
set linesize 150
set head on
set echo off
SET feedback off
SET VERIFY off
rem @E:\GoogleDrive\runall\badprocedure.sql
COLUMN Owner FORMAT A10
COLUMN Name FORMAT A30
COLUMN Type FORMAT A20
COLUMN Text FORMAT A75
COLUMN TIMESTAMP FORMAT A20
COLUMN... |
DROP TABLE IF EXISTS `activatorCI`;
CREATE TABLE `activatorCI` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`activatorId` int(11) NOT NULL,
`ciId` int(11) NOT NULL,
`lastUpdated` datetime DEFAULT NULL,
`isActive` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
KEY `FK_acti... |
<reponame>viswaratha12/dbwarden<filename>DMS_Capture/V_Mgr_Params.sql<gh_stars>1-10
/****** Object: View [dbo].[V_Mgr_Params] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW V_Mgr_Params
AS
SELECT ManagerID,
ManagerName,
ManagerType,
ParameterName,
ParameterValue,
[Com... |
<gh_stars>1-10
ALTER TABLE "public"."journals" DROP COLUMN "journal_type"; |
<reponame>mazhelis/redshift
{% macro vacuumable_tables_sql() %}
{#-
Pull the arguments out of the kwargs dictionary. This allows folks to define
whatever arguments they want, e.g. a variable limit
-#}
{%- set exclude_schemas=kwargs.get('exclude_schemas', []) -%}
{%- set exclude_schemas_like=kwar... |
BEGIN;
ALTER TABLE batch_spec_workspaces
ADD COLUMN IF NOT EXISTS batch_spec_execution_cache_entry_id INTEGER REFERENCES batch_spec_execution_cache_entries(id) DEFERRABLE;
ALTER TABLE batch_spec_workspaces
DROP COLUMN IF EXISTS cached_result_found;
ALTER TABLE batch_spec_execution_cache_entries
DROP CONSTRAINT... |
<filename>db_library/views/db_function_ddl.sql
--# Copyright IBM Corp. All Rights Reserved.
--# SPDX-License-Identifier: Apache-2.0
/*
* Returns the CREATE FUNCTION DDL for all user defined functions on the database
*/
CREATE OR REPLACE VIEW DB_FUNCTION_DDL AS
SELECT
ROUTINESCHEMA AS FUNCSCHEMA
, ROUTINENAM... |
<reponame>khuddlefish/gpdb
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
CREATE TABLE ck_sync1_hybrid_part1 (
PS_PARTKEY INTEGER,
PS_SUPPKEY INTEGER,
PS_AVAILQTY integer,
PS_SUPPLYCOST decimal,
PS_COMMEN... |
- Alter
- Graduierung
- Ausbilderqualifikation
- Unterrichtest Du
- Eigene Schule
- Dein(e) Lehrer
- Organisation
- Erfahrung and. Stile
- <NAME>
- Wieviel Zeit
- Trainingspartner
- Erst-Termin (Datumsfeld)
CREATE TABLE `wt-data`.`intensiv` (
`id` INT NOT NULL AUTO_INCREMENT COMMENT '',
`mitgliede... |
<gh_stars>1-10
/*L
Copyright ScenPro Inc, SAIC-F
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cadsr-cdecurate/LICENSE.txt for details.
L*/
--Please run with account SBR
--ACs for KEARNSD
select 'DEC_affected_for_KEARNSD = ' || count(*) from sbr.data_element_concepts_view d... |
<gh_stars>1-10
SELECT BIT_COUNT(29) from db_root;
SELECT BIT_COUNT(NULL) from db_root;
SELECT BIT_COUNT(-1) from db_root;
SELECT BIT_COUNT('a') from db_root;
SELECT BIT_COUNT(2183482934529472) from db_root;
SELECT BIT_COUNT('sarws') from db_root; |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 07, 2020 at 03:02 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.3.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 12-01-2021 a las 15:48:55
-- Versión del servidor: 10.1.9-MariaDB
-- Versión de PHP: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... |
<reponame>hugolimachaves/sqlSnippets
SELECT
COUNT(salary)
FROM
salaries
WHERE
salary > 100000;
SELECT
COUNT(*)
FROM
dept_manager;
|
CREATE TABLE badminto_finalf.t_cheltuieli LIKE avban.t_cheltuieli;
ALTER TABLE badminto_finalf.t_cheltuieli CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
INSERT INTO badminto_finalf.t_cheltuieli SELECT * from avban.t_cheltuieli;
ALTER TABLE badminto_finalf.t_cheltuieli CHANGE COLUMN id_chlet id INT UNSIG... |
<reponame>phaibin/gh-ost
drop table if exists gh_ost_test_child;
drop table if exists gh_ost_test;
drop table if exists gh_ost_test_fk_parent;
create table gh_ost_test_fk_parent (
id int auto_increment,
ts timestamp,
primary key(id)
);
create table gh_ost_test (
id int auto_increment,
i int not null... |
<filename>setup/sales.sql
drop table if exists sales;
create table sales(
id serial primary key,
state text,
gta_series text,
gta_number int,
issue_date timestamp,
status text,
producer_estab_code text,
producer_estab_name text,
p... |
CREATE VIEW [playground].[vMovies] AS (
SELECT
JSON_VALUE(value,'$.movie_id') AS movie_id,
JSON_VALUE(value,'$.plot_summary') AS plot_summary,
[json].[fAsTimespan](JSON_VALUE(value,'$.duration')) AS duration,
JSON_VALUE(value,'$.genre[0]') AS genre,
CAST(JSON_VALUE(value,'$.rating') AS DECIMAL(3,1)) AS rating,
... |
<filename>src/SFA.DAS.Commitments.Database/Functions/CourseDatesOverLap.sql
CREATE FUNCTION [dbo].[CourseDatesOverlap](@StartDate DATETIME2, @EndDate DATETIME2, @NewStartDate DATETIME2, @NewEndDate DATETIME2)
RETURNS SMALLINT
AS
BEGIN
DECLARE @Start INT = YEAR(@StartDate) * 100 + MONTH(@StartDate)
DECLARE @End INT =... |
-- AlterTable
ALTER TABLE "User" ADD COLUMN "ericaRequestIdSenden" TEXT;
|
<reponame>PC-Axis/PxStat
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME>
-- Read date: 12 Dec 2018
-- Description: Reads CLASSIFICATION Recordsassociated with a given matrix code and language (optional)
-- EXEC Data_Stat_Matrix_ReadClassification 'a... |
<reponame>StarCitizenWiki/API<filename>database/dumps/vehicle_translations/focus.sql<gh_stars>1-10
INSERT INTO vehicle_focus_translations (locale_code, focus_id, translation, created_at, updated_at) VALUES ('de_DE', 1, 'Einsteiger', '2018-07-26 23:49:03', '2018-07-26 23:49:03');
INSERT INTO vehicle_focus_translations (... |
create user onstest identified by onstest default tablespace users
/
alter user onstest quota unlimited on users
/
grant connect, resource to onstest
/
grant select on sys.v_$instance to "ONSTEST"
/
grant execute on sys.dbms_lock to "ONSTEST"
/
grant select_catalog_role to "ONSTEST"
/
drop table "ONSTEST"."BOOK"
... |
-- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 16-10-2013 a las 15:08:32
-- Versión del servidor: 5.5.32
-- Versión de PHP: 5.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
<gh_stars>0
-- find sql_id based on SQL_TEXT search
column SQL_TEXT format a100 word_wrap;
set long 30000;
-- undefine 1;
SELECT 'DBA_HIST_SQLTEXT' src,
s.sql_id,
s.plan_hash_value,
-- CAST(t.sql_text AS VARCHAR (1000)) sql_text,
t.sql_text sql_text_hist,
s.snap_id
FROM dba_hi... |
<reponame>PewhProgrammer/CMS-K-System<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.4.15.5
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1:3306
-- Erstellungszeit: 13. Jun 2017 um 19:03
-- Server-Version: 5.6.34-log
-- PHP-Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTIO... |
-- MySQL dump 10.13 Distrib 5.1.73, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: addressbook
-- ------------------------------------------------------
-- Server version 5.1.73
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_... |
<gh_stars>1-10
CREATE TABLE [dbo].[Users_ManageArea]
(
[User_ID] [int] NOT NULL,
[CM_ID] [int] NOT NULL
) ON [PRIMARY]
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE TRIGGER [dbo].[tr_Users_ManageArea_iud] ON [dbo].[Users_ManageArea]
FOR INSERT, DELETE, UPDATE AS
BEGIN
SET NOCOUNT ON
UPDATE Users
S... |
alter table box.field drop column if exists linked_label_fields;
alter table box.field drop column if exists linked_key_fields;
alter table box.field_i18n add column if not exists static_content text; |
<reponame>goldmansachs/obevo-kata<filename>kata-files/lesson2/postgresql/expected/MYLARGESCHEMA/function/func647.sql
CREATE FUNCTION func647() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE299);val:=(SELECT COUNT(*)INTO MYCOUNT FROM M... |
/*
Warnings:
- Made the column `total` on table `invoices` required. This step will fail if there are existing NULL values in that column.
*/
-- AlterTable
ALTER TABLE "invoices" ALTER COLUMN "total" SET NOT NULL;
-- AlterTable
ALTER TABLE "items" ALTER COLUMN "quantity" SET DEFAULT 1;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.