sql stringlengths 6 1.05M |
|---|
<gh_stars>0
SELECT
{{ columnNames }}
FROM
albums
WHERE
released > (CURRENT_DATE - INTERVAL '2' year)
LIMIT
4; |
<filename>krdef/db/krdefupdate.sql
-- first time install
INSERT INTO `sys_entry` (`name`, `abbr`, `code`, `buildin`, `integration`, `open`, `key`, `ip`, `logo`, `login`, `control`, `size`, `position`, `visible`, `order`) VALUES
('TOOLS', 'KR', 'krdef', 1, 1, 'iframe', 'gscw6szg9rcue3r9ulm379dnm5d8y82c', '*', 'theme/def... |
<filename>sql/site/spGetSiteData.sql
DELIMITER ;;
DROP PROCEDURE IF EXISTS GetSiteData;;
CREATE PROCEDURE GetSiteData( IN `account_id` int(11), IN `site_url` varchar(128), IN `request_uri` varchar(512), IN `site_token` varchar(256), IN `site_pass` varchar(512) )
BEGIN
DECLARE `x_site_locked` enum('N','Y');
DECL... |
<filename>database/table/table_variable.sql
CREATE TABLE IF NOT EXISTS variable(
v_key VARCHAR(30) NOT NULL,
value VARCHAR(10000) NOT NULL,
PRIMARY KEY (v_key)
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
INSERT INTO person VALUES(1,'<NAME>','See');
INSERT INTO person VALUES(2,'Jerry','Schneider');
|
--
--User procedures
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
create or replace procedure GetUserByLogin (userok sys_refcursor,ln in varchar2 default null) as
... |
<reponame>JieGou/blogsamples
CREATE TABLE [UserData].[Role] (
[Id] BIGINT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (256) NOT NULL,
CONSTRAINT [PK_Role] PRIMARY KEY CLUSTERED ([Id] ASC)
);
GO
CREATE UNIQUE NONCLUSTERED INDEX [UX_Role_Name]
ON [UserData].[Role]([Name] ASC);
|
<filename>prisma/migrations/20210427183241_add_brand_slug/migration.sql
/*
Warnings:
- You are about to drop the column `brand` on the `Sneaker` table. All the data in the column will be lost.
- Added the required column `brandId` to the `Sneaker` table without a default value. This is not possible if the table ... |
<reponame>dram/metasfresh
-- 2018-07-20T09:26:58.098
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process SET Name='Export in E-Mail-Kampagne',Updated=TO_TIMESTAMP('2018-07-20 09:26:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=540960
;
-- 2018-07-20T09:27:09.125
-- I ... |
<filename>db/dist/base_data.sql
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Data for Name: report_type; Type: TABLE DATA; Schema: gcis_metadata; Owner: -
--... |
<reponame>S1143455/o365-windesheim<filename>deliverymethod.sql
INSERT INTO `deliverymethod` (`DeliveryMethodID`, `DeliveryMethodName`, `LastEditedBy`) VALUES
(1, 'Post', 1),
(2, 'Courier', 1),
(3, 'Delivery Van', 1),
(4, 'Customer Collect', 1),
(5, 'Chilled Van', 16),
(6, 'Customer Courier to Collect', 1),
(7, 'Road Fr... |
<reponame>JokerRun/flink-sql-cookbook
CREATE TABLE server_logs (
client_ip STRING,
client_identity STRING,
userid STRING,
request_line STRING,
status_code STRING,
log_time AS PROCTIME()
) WITH (
'connector' = 'faker',
'fields.client_ip.expression' = '#{Internet.publicIpV4Address}',
'fields... |
<reponame>Tsvetelin98/Solar<gh_stars>0
UPDATE solarnode.ocpp_charge
SET auth_status = ?, xid = ?, ended = ?, posted = ?
WHERE sessid_hi = ? AND sessid_lo = ?
|
CREATE TABLE "CCTSPECIMEN_PART_NAME4"
( "PART_NAME" VARCHAR2(70) NOT NULL ENABLE,
"COLLECTION_CDE" VARCHAR2(10) NOT NULL ENABLE
) |
/*
Navicat Premium Data Transfer
Source Server : localmysql5.7
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : springcloud
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 07/11... |
<filename>chapter-4/chapter-4-spring-data-r2dbc/src/test/resources/db/schema.sql
CREATE TABLE fruits
(
id bigserial NOT NULL,
name varchar(255) NOT NULL UNIQUE,
description varchar(255),
PRIMARY KEY (id)
);
INSERT INTO fruits(name, description) VALUES
('Apple', 'Hearty fruit'),
('Pear', 'Juicy fruit');
|
<reponame>WebColegioJD/Proyecto<filename>SysColegioJD/JuanDiegoSys/dbweb_colejd2019.sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 06-11-2019 a las 06:53:52
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.3.3
SET SQL_MODE = "N... |
DROP TABLE IF EXISTS gacela.fields;
CREATE TABLE gacela.fields (
`primary` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
`date` DATE NULL,
`datetime` DATETIME NULL,
`timestamp` TIMESTAMP NULL,
`int` INT NOT NULL,
`tinyint` TINYINT(4) UNSIGNED NULL,
`smallint` SMALLINT,
`mediumint` MEDIUMINT,
`bigint` BIGI... |
<gh_stars>0
--
-- post表 文章表
--
DROP TABLE IF EXISIT `post`;
CREATE TABLE `post`(
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '唯一id',
`title` VARCHAR(256) NOT NULL COMMENT '文章标题',
`content` TEXT NOT NULL COMMENT '文章内容',
) |
<filename>docs/deployment/db_deployment_request/db_scripts/delete_dupe_vc.sql
/*L
Copyright SAIC, Ellumen and RSNA (CTP)
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/national-biomedical-image-archive/LICENSE.txt for details.
L*/
/*
select series_instance_uid
... |
<gh_stars>0
INSERT INTO person VALUES ('vee', '038');
|
CREATE TABLE IF NOT EXISTS photo.gps_altitude_ref (
id SMALLINT NOT NULL,
name VARCHAR(20) NOT NULL,
CONSTRAINT pk_photo_gps_altitude_ref PRIMARY KEY (id),
CONSTRAINT uq_photo_gps_altitude_ref_name UNIQUE (name)
);
GRANT SELECT
ON photo.gps_altitude_ref
TO website;
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 21, 2019 at 06:39 PM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<gh_stars>0
CREATE TABLE location (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT UNIQUE NOT NULL CHECK (1 < char_length(name) AND char_length(name) < 256)
);
CREATE TABLE "user" (
id VARCHAR(255) PRIMARY KEY,
name TEXT UNIQUE NOT NULL CHECK (1 < char_length(name) AND char_length(name) < 256... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : lun. 22 nov. 2021 à 10:32
-- Version du serveur : 10.4.20-MariaDB
-- Version de PHP : 7.4.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... |
CREATE TABLE [dbo].[action_type] (
[id] INT NOT NULL,
[verb] NVARCHAR (30) NOT NULL,
PRIMARY KEY CLUSTERED ([id] ASC)
);
|
<filename>templates/init/pg_short.sql
\set id random(1, {{ recordcount }})
select name from test_short_long where id = :id;
|
CREATE TABLE temporal_schema.comments(
id serial primary key,
user_actions_id integer NOT NULL,
body text NOT NULL,
sender_by_id integer NOT NULL,
received_by_id integer NOT NULL,
parent_id integer NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL... |
select categories.name, sum(products.amount) as sum from products
inner join categories on products.id_categories = categories.id
group by categories.name |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 17 Tem 2019, 20:59:27
-- Sunucu sürümü: 10.1.39-MariaDB
-- PHP Sürümü: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... |
<reponame>jmullercuber/atom-beautify<filename>examples/simple-jsbeautifyrc/sql/expected/test2.sql
INSERT INTO client (HOST, description, created_at)
VALUES('hallpclnx',
'My linux machine',
CURRENT_TIMESTAMP);
INSERT INTO THREAD (THREAD,
description,
created_at,
... |
DROP TABLE IF EXISTS tmp_payment_currencycode_to_migrate
;
CREATE TEMPORARY TABLE tmp_payment_currencycode_to_migrate AS
SELECT p.c_payment_id,
bsl.currencyrate,
acs.c_currency_id AS source_currency_id
FROM c_bankstatementline bsl
INNER JOIN c_payment p ON p.c_payment_id = bsl.c_payment_id
... |
<gh_stars>1-10
create or replace function ${AQTS_SCHEMA_NAME}.prune_time_series_data(pruneDate date)
returns void
language plpgsql
as $$
declare
month_number integer := extract( month from pruneDate );
month_name varchar := trim(to_char(pruneDate, 'month'));
begin
/* drop the partitions */
execute format('drop tab... |
<filename>AnchorModeling/5675/test/tbl/utm_traffic_division.sql
create table [core].[utm_traffic_division] (
[utm_key] [bigint] not null,
[traffic_division] [nvarchar](4000) null,
[mt_insert_dt] [datetime2](0) not null,
[mt_update_dt] [datetime2](0) not null,
constraint [pk_utm_traffic_division] primary key clust... |
<reponame>Pivotal-Data-Engineering/greenplum-5-introduction-workshop
/* *******************************************************************************************************
Copyright (C) 2019-Present Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under the ... |
<reponame>kyokomi/goma
select
id
, name
, detail
, create_at
FROM
quest
|
-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-10-08 13:34:39
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Enable Versioning **********************************
-- +... |
-- Copyright 2018 <NAME>. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
col username for a25
col default_Tablespace for a25
col temp_tablespace for a20
prompt Show database usernames from dba_users matching %&1%
sele... |
<reponame>cb-deepak/pgcodekeeper
CREATE TABLE public.testtable (
field1 integer,
field2 integer,
field3 character varying(150) DEFAULT 'none'::character varying,
field4 double precision
);
CREATE INDEX testindex ON public.testtable USING btree (field1); |
<reponame>tenaciousRas/Openfire
# jiveRoster: Change jid column to varchar
ALTER TABLE jiveRoster CHANGE COLUMN jid jid varchar(1024) not null;
# jiveRoster: Add new index
ALTER TABLE jiveRoster ADD INDEX jiveRoster_jid_idx (jid);
UPDATE jiveVersion set version=14 where name = 'openfire';
|
-- No data when Engine is Null
DROP TABLE IF EXISTS t0;
DROP TABLE IF EXISTS t1;
CREATE TABLE t0(a int) ENGINE = Null;
INSERT INTO TABLE t0 values(1);
SELECT * FROM t0;
RENAME TABLE t0 TO t1;
DROP TABLE t0; -- {ErrorCode 1025}
SELECT * FROM t1;
RENAME TABLE t1 to system.t1; -- {ErrorCode 1002}
DROP TABLE IF EXISTS t... |
CREATE TABLE `ltmart_daily_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner_id` int(11) NOT NULL,
`item_id` smallint(5) unsigned NOT NULL,
`branch_id` int(11) NOT NULL,
`qty` smallint DEFAULT 0,
`original_amnt` int DEFAULT 0,
`amnt` int DEFAULT 0,
`logdate_since` date NOT NULL,
`logdate` date NOT N... |
create schema ibolc;
-- TODO: Naming convention for types, tables and fields
create extension citext;
create table country (
id serial primary key,
iso text unique not null,
name text unique not null,
nice_name text not null,
iso3 text,
num_code smallint,
phone_code nu... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 04 Kas 2020, 09:34:01
-- Sunucu sürümü: 10.1.36-MariaDB
-- PHP Sürümü: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
-- $ID$
-- TPC-H/TPC-R Potential Part Promotion Query (Q20)
-- Function Query Definition
-- Approved February 1998
select
s_name,
s_address
from
supplier,
nation
where
s_suppkey in (
select
ps_suppkey
from
partsupp
where
ps_partkey in (
select
p_partkey
from
part
where
p... |
<filename>webframework/databases/fill_data.sql
BEGIN TRANSACTION;
CREATE TABLE "users" (
`id` INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE,
`last_name` TEXT NOT NULL,
`first_name` TEXT NOT NULL,
`middle_name` TEXT,
`phone` TEXT,
`email` TEXT,
`city_id` INTEGER,
`deleted` INTEGER DEFAULT 0,
FOREIGN KEY(`city_id`) R... |
use db_generation_game_online;
create table tb_classe(
id int not null AUTO_INCREMENT,
nome_classe varchar(50) not null,
arma varchar(50) not null,
funcao varchar(50) not null,
PRIMARY KEY(id));
create table tb_personagem(
id int not null auto_increment,
nome_personagem varchar(50) not null... |
<reponame>emilia98/SoftUni-CSharp-Db
USE "SoftUni";
SELECT
CONCAT(FirstName, ',', MiddleName, ',', LastName)
FROM
"Employees"; |
<reponame>gelapro/toko_gelaman
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 18 Sep 2019 pada 11.16
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00... |
<reponame>KevinMarete/adtv4<filename>tools/public/sql/editt/update/regimen.sql
UPDATE regimen r
INNER JOIN regimen_category rc ON rc.Name = r.category AND rc.ccc_store_sp = {destination_store_id}
SET r.category = rc.id
WHERE r.ccc_store_sp = {destination_store_id}//
UPDATE regimen r
INNER JOIN regimen_service_type r... |
<reponame>ByersPlusPlus/userservice
-- Your SQL goes here
CREATE TABLE bpp_groups (
group_id SERIAL PRIMARY KEY,
group_name VARCHAR NOT NULL,
bonus_payout INTEGER NOT NULL
);
CREATE TABLE bpp_groups_permissions (
group_id INTEGER NOT NULL REFERENCES bpp_groups(group_id),
permission VARCHAR NOT NULL... |
SET DEFINE OFF;
create or replace package afw_12_ldap_pkg
is
function obten_servr_ldap (pnu_domn in number default afw_12_domn_pkg.obten_domn_sesn)
return vd_afw_12_servr_ldap%rowtype;
function authe_apex (pva_code_utils in varchar2
,pva_mot_passe in varchar2)
return boolean;
... |
DROP TABLE IF EXISTS play;
DROP TABLE IF EXISTS piece;
DROP TABLE IF EXISTS actor;
CREATE TABLE actor (
id varchar(32) PRIMARY KEY,
free BOOLEAN[7][24]
);
CREATE TABLE piece (
id varchar(32) PRIMARY KEY,
roles JSONB -- {"romeo":["tim","tom"],"julliette":["eva","amy"]}
);
CREATE TABLE play (
id SERIAL PRIMARY KEY... |
--
-- 表的结构 `wemall_apply_config`
--
CREATE TABLE IF NOT EXISTS `wemall_apply_config` (
`id` int(10) unsigned NOT NULL,
`name` text NOT NULL,
`event` text NOT NULL,
`time_range` text NOT NULL,
`introduce` text NOT NULL,
`visiter` int(11) NOT NULL,
`apply` int(11) NOT NULL,
`status` int(11) NOT NULL,
`ti... |
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "layers" (
"id" INTEGER NOT NULL UNIQUE,
"fingerprint" BLOB NOT NULL CHECK(length("fingerprint") == 32),
"ready" INTEGER NOT NULL,
PRIMARY KEY("id")
);
CREATE TABLE IF NOT EXISTS "values" (
"id" INTEGER NOT NULL UNIQUE,
"key_hash" BLOB NOT NULL CHECK(length("key_has... |
<reponame>jdkoren/sqlite-parser
-- e_fkey.test
--
-- execsql {
-- INSERT INTO parent2 VALUES('I', 'II');
-- INSERT INTO child8 VALUES('I', 'II');
-- }
INSERT INTO parent2 VALUES('I', 'II');
INSERT INTO child8 VALUES('I', 'II'); |
<gh_stars>10-100
-- file:opr_sanity.sql ln:664 expect:true
SELECT p1.oid, p1.oprname, p2.oid, p2.proname
FROM pg_operator AS p1, pg_proc AS p2
WHERE p1.oprcode = p2.oid AND
p1.oprkind = 'b' AND
(p2.pronargs != 2
OR NOT binary_coercible(p2.prorettype, p1.oprresult)
OR NOT binary_coercible(p1.oprleft, p... |
CREATE PROC dbo.LastGoodCheckDB_Get(
@InstanceIDs VARCHAR(MAX)=NULL,
@IncludeCritical BIT=1,
@IncludeWarning BIT=1,
@IncludeNA BIT=0,
@IncludeOK BIT=0
)
AS
DECLARE @StatusSQL NVARCHAR(MAX)
DECLARE @SQL NVARCHAR(MAX)
SELECT @StatusSQL = CASE WHEN @IncludeCritical=1 THEN ',1' ELSE '' END
+ CASE WHEN @IncludeW... |
select tag_id as id,
count(tag_id) as amount,
tags."en-US" as label
from event_tags et
left join tags on (tags.id = tag_id)
where et.deleted_date is null
and event_id in (
select event_id
from company_events
where company_id = :company_id
)
group by tag_id, label
order by amount desc
limit 50;
|
UPDATE PROTOCOL_ONLN_RVWS SET REVIEW_DETERM_RECOM_CD = 4 WHERE REVIEW_DETERM_RECOM_CD = 6;
DELETE FROM PROTOCOL_ONLN_RVW_DETERM_RECOM WHERE REVIEW_DETERM_RECOM_CD = 6;
|
<gh_stars>0
/****** Object: StoredProcedure [dbo].[sp_iMart_Load_dim_Course] Script Date: 4:40:40 PM ******/
CREATE PROCEDURE [dbo].[sp_iMart_Load_dim_Course]
AS
-- ============================================================================
-- Script UTC date: 2019-04-22 13:59:06
-- Description: Generated by Oti... |
<gh_stars>0
{{ config(
materialized = 'table'
) }}
{% set event_types = [ 'page_view' , 'add_to_cart' , 'delete_from_cart' ] %}
WITH {% for event_type in event_types %}
{{ event_type }}_table AS (
{{ funnel_step(event_type, ref('int_events')) }}),
{% endfor %}
checkout AS (
... |
SELECT
1 AS flag
FROM
apidbtuning.datasetpresenter -- TODO: Remove "2270"
WHERE
dataset_presenter_id = ?
|
select int64_4 from nulls where int64_4 > 49000000000
50000000000
|
<gh_stars>0
CREATE TABLE DistributorContent(
Id INT IDENTITY(1,1) PRIMARY KEY,
Content4BeADistributor NVARCHAR(MAX) NULL,
DistributorUrl NVARCHAR(125) NULL
) |
-- name: CreateCategory :one
INSERT INTO categories (
category
) VALUES (
$1
) RETURNING *;
-- name: GetACategoryByID :one
SELECT * FROM categories
where id = $1 LIMIT 1;
-- name: GetACategoryIDByName :one
SELECT * from categories
where category = $1 LIMIT 1;
-- name: ListCategories :many
SELECT * FROM categ... |
<reponame>kindlyops/mappamundi
ALTER TABLE mappa.likert_surveys
RENAME COLUMN uuid TO id; |
<filename>sql/light-measurement-devices/delete-light-measurement-devices.sql
DO
$$
BEGIN
UPDATE ssld SET light_measurement_device_id = null;
DELETE FROM device_authorization WHERE device IN (SELECT id FROM device WHERE device_identification IN ('LMD01','LMD02','LMD03','LMD04'));
DELETE FROM light_measurement_device... |
<gh_stars>0
set max_parallel_workers_per_gather to 0;
set work_mem to 1000000;
set decision_method to dp;
set enable_nestloop to off;
set enable_indexscan to off;
set enable_mergejoin to off;
set memory_budget to :v_budget;
set tpch_delta_mode to :v_mode;
set bd_prob to :v_prob;
set enable_incremental to on;
set t... |
<reponame>jorry2008/turen
# Host: localhost (Version: 5.6.16)
# Date: 2015-09-13 22:24:54
# Generator: MySQL-Front 5.3 (Build 4.234)
/*!40101 SET NAMES utf8 */;
#
# Structure for table "t_attribute"
#
CREATE TABLE `t_attribute` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`cat_id` smallint(5) unsigned... |
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/KEYWORDS/Index/Opengauss_Function_Keyword_Index_Case0029.sql
-- @testpoint:opengauss关键字Index(非保留),作为表空间名
--关键字不带引号,创建成功
drop tablespace if exists Index;
CREATE TABLESPACE Index RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
drop tablespace Index;... |
-- EXERCISE 1
-- a) Define user accounts according to security levels
CREATE USER IF NOT EXISTS 'bank_admin'@'localhost' IDENTIFIED BY 'bank_admin';
GRANT ALL PRIVILEGES ON `bank`.* TO 'bank_admin'@'localhost';
FLUSH PRIVILEGES;
CREATE USER IF NOT EXISTS 'bank_staff'@'localhost' IDENTIFIED BY 'bank_staff';
GRANT SELEC... |
USE employees_DB;
INSERT INTO department (id, depname)
VALUES (1, "Store Leaders");
INSERT INTO department (id, depname)
VALUES (2, "Fresh Convenience");
INSERT INTO department (id, depname)
VALUES (3, "Grocery");
INSERT INTO department (id, depname)
VALUES (4, "invoice");
INSERT INTO department (id, depname)
VALU... |
<reponame>zmovirzynski/PokeRoots<gh_stars>0
CREATE TABLE "server_config"
(
"config" VARCHAR(35) NOT NULL DEFAULT '',
"value" INT NOT NULL,
UNIQUE ("config")
);
INSERT INTO "server_config" VALUES ('db_version', 7);
CREATE TABLE "server_motd"
(
"id" SERIAL,
"text" TEXT NOT NULL,
PRIMARY KEY ("id")
);
INSERT INTO... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 23, 2017 at 02:49 AM
-- Server version: 10.1.10-MariaDB
-- 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_CL... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 12 Mar 2020 pada 14.07
-- 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";
/*!40101 S... |
CREATE TABLE Level
(
_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
star int NOT NULL,
coin int,
hero varchar(255),
username varchar(255),
guid varchar(255)
)
CREATE TABLE Sale
(
_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
round int NOT NULL,
product varchar(255),
magic_type varchar(255),
quote_quantity int,
sale_quant... |
<reponame>nikhilbhatewara/HackerRank
select round(min(lat_n),4)
from STATION
where lat_n > 38.7780
|
<reponame>omegavesko/Shinoa<filename>prisma/migrations/20211205193541_polls_v2/migration.sql
/*
Warnings:
- You are about to drop the column `value` on the `Vote` table. All the data in the column will be lost.
- Added the required column `minValues` to the `Poll` table without a default value. This is not possi... |
id int(10) unsigned NOT NULL auto_increment,
type enum('normal','get','usernormal', 'userget', 'begin', 'end', 'regexp') default 'normal',
url varchar(255) NOT NULL,
class varchar(64) NOT NULL,
arg varchar(32) NOT NULL,
PRIMARY KEY (id),
KEY url (url)
|
--liquibase formatted sql
--changeset artemov_i:public_global_var dbms:postgresql splitStatements:false stripComments:false
/*
Целочисленный тип
*/
create type public.sessvari as (nm_ext varchar);
-- функция декларирования
create or replace function public.sessvari_declare(p_pcg_name varchar, p_var_name varchar, p_in... |
CREATE TABLE [dbo].[UpdateType]
(
[UpdateTypeId] INT NOT NULL PRIMARY KEY,
[Name] NVARCHAR(50) NOT NULL ,
CONSTRAINT [AK_UpdateType_Name] UNIQUE ([Name])
)
|
<gh_stars>1-10
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 8.0.17 - MySQL Community Server - GPL
-- Server OS: Win64
-- HeidiSQL Version: 10.1.0.5464
-- --------------------------------------------... |
-- This script was generated by the Schema Diff utility in pgAdmin 4
-- For the circular dependencies, the order in which Schema Diff writes the objects is not very sophisticated
-- and may require manual changes to the script to ensure changes are applied in the correct order.
-- Please report an issue for any failure... |
<filename>migrations/2021-12-24-084959_create_users/up.sql
-- Your SQL goes here
CREATE TABLE users (
id Integer PRIMARY KEY NOT NULL,
username VARCHAR NOT NULL,
email VARCHAR NOT NULL,
password VARCHAR NOT NULL,
login_session VARCHAR
); |
<reponame>Shuttl-Tech/antlr_psql<filename>src/test/resources/sql/alter_operator/fbd2d76c.sql
-- file:alter_generic.sql ln:185 expect:true
ALTER OPERATOR @+@(int4, int4) OWNER TO regress_alter_user2
|
-- 2021-07-09T16:23:51.603Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Lieferantenfreigabe Norm', PrintName='Lieferantenfreigabe Norm',Updated=TO_TIMESTAMP('2021-07-09 19:23:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579454 AND... |
<reponame>smith750/kc<gh_stars>0
ALTER TABLE IACUC_PROTOCOL_ONLN_RVWS
ADD ( CONSTRAINT UQ1_IACUC_PROTOCOL_ONLN_RVWS
UNIQUE (PROTOCOL_ID, SUBMISSION_ID_FK, PROTOCOL_REVIEWER_FK)
)
/
|
/*
* Author: <NAME>.
* Purpose: Creation of index, to promove the performace.
*
*/
CREATE INDEX descriptor_type_index
ON descriptor(type_descriptor_id); |
<reponame>kids-cademy/atlas.studio<gh_stars>0
-- Add electric charge to quantity enumeration.
ALTER TABLE `atlas`.`featuremeta`
CHANGE COLUMN `quantity` `quantity` ENUM('NONE', 'SCALAR', 'MASS', 'TIME', 'LENGTH', 'SPEED', 'POWER', 'ELECTRC_CHARGE', 'FOOD_ENERGY', 'DENSITY', 'ACCELERATION', 'ANGLE', 'AREA', 'POPULATIO... |
<reponame>fivetran-jamie/dbt_asana<gh_stars>0
select count(*) as validation_errors
from (
select
id
from `dbt-package-testing`.`asana`.`section`
where id is not null
group by id
having count(*) > 1
) validation_errors
|
-- TABLE
CREATE TABLE Users( -- Users
Id varchar(38) NOT NULL, -- PK, guid
UserName varchar(256) NOT NULL,
NormalizedUserName varchar(256) NOT NULL,
Email varchar(256) NULL,
NormalizedEmail varchar(256) NOT NULL,
EmailConfirmed boolean NOT NULL,
PasswordHash v... |
<reponame>provenance-io/p8e<gh_stars>10-100
ALTER TABLE affiliate ADD COLUMN index_name VARCHAR (255) NOT NULL default 'scopes'; |
ALTER TABLE public.model_versions ADD COLUMN notes text;
ALTER TABLE public.models DROP COLUMN readme;
|
ALTER TABLE [dbo].[ConsumptionMeteringPoints]
DROP COLUMN ScheduledMeterReadingDate
ALTER TABLE [dbo].[MeteringPoints]
ADD ScheduledMeterReadingDate [NVARCHAR](10) NULL |
ALTER TABLE users
ADD COLUMN lastLogin TIMESTAMP DEFAULT CURRENT_TIMESTAMP
AFTER token;
ALTER TABLE users
ADD COLUMN lastNotif TIMESTAMP DEFAULT CURRENT_TIMESTAMP
AFTER lastLogin;
DROP TABLE useronline;
CREATE TABLE users_online (
ip VARCHAR(40) PRIMARY KEY,
lastOn TIMESTAMP DEFAULT CURRENT_... |
<reponame>muffinresearch/solitude
-- This is a straight dump of:
-- ./manage.py sqlreset djcelery
CREATE TABLE `celery_taskmeta` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`task_id` varchar(255) NOT NULL UNIQUE,
`status` varchar(50) NOT NULL,
`result` longtext,
`date_done` datetime NOT NULL... |
<gh_stars>1-10
ALTER TABLE
`addons`
ADD COLUMN
`latest_version` int(11) unsigned DEFAULT NULL,
ADD CONSTRAINT
`latest_version_refs_versions`
FOREIGN KEY (`latest_version`) REFERENCES `versions` (`id`)
ON DELETE SET NULL;
UPDATE
addons AS a,
versions AS v,
files AS f
SET
a.latest_ver... |
DELETE FROM "conference"."ConfigurationKey" WHERE "name" = 'INPUT_LOSS_SLATE';
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 03, 2021 at 05:28 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.