sql stringlengths 6 1.05M |
|---|
DROP TABLE IF EXISTS jq_user_favorite_entity;
CREATE TABLE jq_user_favorite_entity (
favorite_id varchar(50) NOT NULL,
user_email_id varchar(500) DEFAULT NULL,
entity_type varchar(50) DEFAULT NULL,
entity_id varchar(100) DEFAULT NULL,
entity_name varchar(100) DEFAULT NULL,
last_updated_date timestamp NOT NU... |
insert into admit_patient(room_number,advance_payment,mode_of_payment,date_of_admission,initial_condition,diagnosis,treatment,number_of_doctors,attendant,MR_no,DC_no,dept_name)
values(100,5000,'Cash','2-3-2020','Critical','Pneumonia','In Process',2,'Farooq','PTDRAAHILCOVIDDGKHAN-101','DC-123','Orthopedic');
insert int... |
-- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 17, 2019 at 05:41 PM
-- Server version: 10.1.33-MariaDB
-- PHP Version: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<filename>sql/db_ukk_spp.sql
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 11 Mar 2020 pada 12.26
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:... |
<filename>db/sql/4569__update_table_vipunentk_lisatiedot_koulutusmuoto.sql
/****** Script for SelectTopNRows command from SSMS ******/
use VipunenTK_lisatiedot
go
update [VipunenTK_lisatiedot].[dbo].[koulutusmuoto]
set koulutusmuoto_SV = 'utbildning för unga, utbildning inom skolsystemet (grundläggande utbildning, gy... |
<filename>scripts/DB/PostgreSQL/DWKitUpdate_2.6.sql<gh_stars>10-100
BEGIN;
DO $CanBeInlined$
BEGIN
BEGIN
BEGIN
ALTER TABLE "WorkflowScheme" ADD COLUMN "CanBeInlined" boolean NOT NULL DEFAULT FALSE;
EXCEPTION
WHEN duplicate_column THEN RAISE NOTICE 'column CanBeInlined alrea... |
<reponame>cincuranet/FirebirdDbComparer
set term ^ ;
create procedure p (in_i int)
returns (out_i int)
as
begin
out_i = in_i * 2;
end^
set term ;^ |
alter table "public"."games"
add constraint "games_card_play_style_fkey"
foreign key ("card_play_style")
references "public"."game_card_play_style"
("value") on update restrict on delete restrict;
|
<reponame>gpipperr/OraPowerShell
--==============================================================================
-- GPI - <NAME>
-- Desc: only for ms powerschell
--==============================================================================
$ (get-host).UI.RawUI.Backgroundcolor="DarkRed" |
<filename>test-db/src/main/resources/create-db.sql<gh_stars>0
DROP TABLE IF EXISTS patient;
DROP TABLE IF EXISTS nurse;
CREATE TABLE nurse(
id int NOT NULL auto_increment,
first_name varchar(50) NOT NULL,
last_name varchar(50) NOT NULL,
CONSTRAINT nurse_pk PRIMARY KEY (id)
);
CREATE TABLE patient(
... |
<reponame>viswaratha12/dbwarden
/****** Object: StoredProcedure [dbo].[GetMassCorrectionID] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[GetMassCorrectionID]
/****************************************************
**
** Desc: Gets Mass Correction ID for given ModSymbol
**
... |
<reponame>sasiperi/alexa-spring-boot<filename>samples/alexa_oms/DB/DML/populate.sql
/**** Customer *************** */
INSERT INTO `ad_6c8971fa5f71c05`.`customer` (`customer_id`, `created`, `last_updated_by`, `updated`, `dob`, `email`, `first_name`, `last_name`, `password`) VALUES ('1', now(), 'sasi', now(), '01-02-1... |
<filename>config/model/usbmeta/SubClass/Replace.sql
REPLACE INTO usbmeta_subclass(
class_id,
subclass_id,
subclass_desc
)
VALUES (
:class_id,
:subclass_id,
:subclass_desc
)
|
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[{0}]') AND type = 'U')
DROP TABLE [dbo].[{0}]
IF OBJECT_ID (N'EndpointQueue', N'U') IS NOT NULL
BEGIN
declare @sql nvarchar(200)
set @sql = 'delete from EndpointQueue where QueueName = ''{0}''';
exec sp_executesql @sql
END |
-- phpMyAdmin SQL Dump
-- version 4.0.10.10
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3306
-- Время создания: Июл 29 2016 г., 15:35
-- Версия сервера: 5.5.45
-- Версия PHP: 5.4.44
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... |
/*
Navicat MySQL Data Transfer
Source Server : 李建博
Source Server Type : MySQL
Source Server Version : 50726
Source Host : 127.0.0.1:3306
Source Schema : vueapi
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 10/04/2021 16:53:48
*/... |
<reponame>17JZ0101-LEEHOJAE/DeliverySystem<filename>src/dbDelivery/InsertOrderdetail.sql
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: 17jz0101 <NAME>
* Created: 2... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 22, 2022 at 11:44 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
SELECT ProductName FROM Products Inner Join Categories ON Products.CategoryID=Categories.CategoryID WHERE CategoryName='Seafood' |
ALTER TABLE canvas_school_template ADD (is_default NUMBER DEFAULT 0 NOT NULL);
ALTER TABLE bulk_canvas_course_crtn_job ADD (template_canvas_course_id NUMBER);
|
CREATE USER IF NOT EXISTS 'quantica_usr'@'%';
ALTER USER 'quantica_usr'@'%' IDENTIFIED BY 'quantica_psw' ;
GRANT ALL ON `db-quantica-core`.* TO 'quantica_usr'@'%';
FLUSH PRIVILEGES; |
<reponame>ishita02jn/TriumbBackend<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 07, 2020 at 03:33 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;... |
<reponame>pmichna/materialized_view_example
SELECT users.id AS user_id, permissions.name AS permission_name
FROM users
JOIN user_permission_groups ON user_permission_groups.user_id = users.id
JOIN permission_groups ON permission_groups.id = user_permission_groups.permission_group_id
JOIN permission_associations ON perm... |
<gh_stars>1-10
drop table if exists output.kid_ethnicity;
-- calculate probability of ethnicity (E) given surname (S) and census tract and year (T)
-- know P(E|S) from census surname data, know P(E|T) from american commnuity survey
-- assuming surname and tract and independent conditioned on ethnicity
-- i.e. P(E,S,T)... |
DROP TABLE IF EXISTS `NServiceBusPoCdb`.`Clubs`;
CREATE TABLE `NServiceBusPoCdb`.`Clubs` (
`ClubId` int(11) NOT NULL,
`ClubName` varchar(45) NOT NULL,
`Location` varchar(200) DEFAULT NULL,
`LimitDateChild` int(11) NOT NULL,
`Contact` varchar(15) DEFAULT NULL,
`NumberOfCoach` int(11) NOT NULL,
PRIMARY KEY... |
USE CursoSQL
GO
DECLARE @Descricao VARCHAR (50) = 'TV'
DECLARE @IdEstoque INT = 1
DECLARE @Quantidade INT = 5
BEGIN
IF NOT EXISTS (SELECT * FROM Estoque
WHERE IdEstoque = @IdEstoque)
BEGIN
INSERT INTO Estoque (
IdEstoque,
Descricao,
Quantidade
)
VALUES (
@IdEstoque,
@... |
BEGIN;
insert into routeid_dirtag (route_id,dirtag) values ('3715','88_IB01');
insert into routeid_dirtag (route_id,dirtag) values ('3715','88_IB02');
insert into routeid_dirtag (route_id,dirtag) values ('3715','88_OB');
insert into routeid_dirtag (route_id,dirtag) values ('3699','44_IB9AV1');
insert into routeid_dirt... |
<filename>YuGiOh.Database/Sql/YuGiOh/Functions/Insert Or Get Support.sql<gh_stars>10-100
create or replace function insert_or_get_support(input varchar)
returns setof integer
as $$
begin
return query
with new_support as (
insert into supports(name) values(input)
on conflict do nothing
returning id
)
s... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 25, 2018 at 05:45 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
drop table if exists mps_twitter;
create table mps_twitter
(
name text,
screen_name text,
party text,
constituency text,
followers text,
new_followers text
);
|
<gh_stars>10-100
----functions----
DROP FUNCTION IF EXISTS istore_length(bigistore);
----
DROP FUNCTION IF EXISTS istore_length(istore);
|
SELECT
local.denom_cost -
((global.pcn_10th * local.denom_quantity * IF(local.num_quantity > 0, (local.num_cost / local.num_quantity), global.cost_per_num))
+ ((local.denom_quantity - (local.denom_quantity * global.pcn_10th))
* IF((local.denom_quantity - COALESCE(local.num_quantity, 0)) = 0, global.c... |
<gh_stars>10-100
-- file:tstypes.sql ln:98 expect:true
SELECT 'a b:89 ca:23A,64b cb:80c d:34c'::tsvector @@ 'd:AC & c:*C' as "true"
|
-- 2018-10-15T16:43:54.734
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Table (LoadSeq,AccessLevel,AD_Client_ID,CreatedBy,IsActive,Created,Updated,IsSecurityEnabled,IsDeleteable,IsHighVolume,IsView,ImportTable,IsChangeLog,ReplicationType,CopyColumnsFromTable,ACTriggerLength,UpdatedBy... |
<gh_stars>1-10
-- $ID$
-- TPC-H/TPC-R Shipping Priority Query (Q3)
-- Functional Query Definition
-- Approved February 1998
select top 10
l_orderkey,
sum(l_extendedprice * (1 - l_discount)) as revenue,
o_orderdate,
o_shippriority
from
customer,
orders,
lineitem
where
c_mktsegment = 'AUTOMOBILE'
and c_custkey... |
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
firstname VARCHAR NOT NULL,
lastname VARCHAR NOT NULL,
email VARCHAR NOT NULL,
password VARCHAR NOT NULL,
imageurl VARCHAR,
bio VARCHAR,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
DROP TABLE IF EXISTS passwo... |
-- This file was last modified at 2021.12.06 18:25 by <NAME>.
-- This is free and unencumbered software released into the public domain.
-- For more information, please refer to <http://unlicense.org>
-- alter_user.sql
GRANT ALL PRIVILEGES ON DATABASE dbuser TO db;
ALTER USER dbuser PASSWORD 'password';
ALTER USER dbu... |
-- :name all_users :many
select * from users;
-- :name check_for_user :one
select * from users where username = :username
-- :name create_user :insert
insert into users (username, email, hashpass) values (:username, :email, :hashpass)
-- :name authenticate_user :many
select username from users where (username = :use... |
<filename>src/main/resources/META-INF/load.sql<gh_stars>1-10
-- SQL statements to populate the database
|
<reponame>h4ck3rm1k3/S2RDF
SELECT tab2.a1 AS a1 , tab5.a2 AS a2 , tab4.movie AS movie , tab0.name1 AS name1 , tab1.name2 AS name2
FROM (SELECT sub AS a1
FROM rdf__type$$3$$
WHERE obj = '<wikicategory_English_film_actors>'
) tab2
JOIN (SELECT sub AS a1 , obj AS name1
FROM skos__prefLabel$$1$$
) tab... |
INSERT INTO algotrading.assets (is_native,token_name,token_code,token_asset_id,token_network) VALUES
(1,'Algorand','ALGO',0,'mainnet'),
(0,'USDC','USDC',31566704,'mainnet'),
(0,'Tether USDt','USDt',312769,'mainnet'),
(1,'Algorand','ALGO',0,'testnet'),
(0,'USDC','USDC',10458941,'testnet'),
(0,'Tether USDt','... |
/* Copyright 2016 OpenMarket Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
<gh_stars>0
CREATE TABLE [dbo].[FinancialTransactionAccount] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[AccountNumber] VARCHAR (255) NULL,
[AgreementId] INT NULL,
[BalanceId] INT NULL,
[BalanceDate] DATE NULL,
... |
<filename>human.sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 01, 2019 at 06:37 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00"... |
PRAGMA foreign_keys=on;
drop table if exists animals;
drop table if exists breeds;
drop table if exists owners;
create table breeds(
name text primary key
);
insert into breeds (name) values('Golden Retriever');
create table owners(
id integer primary key autoincrement,
name text not null,
address text,
phone_... |
-- MODULE MPB008R repetition
-- SQL Test Suite, V6.0, Interactive SQL, mpb008r.sql
-- 59-byte ID
-- TEd Version #
-- AUTHORIZATION SULLIVAN1
SELECT USER FROM HU.ECCO;
-- RERUN if USER value does not match preceding AUTHORIZATION comment
COMMIT WORK;
-- date_time print
-- TEST:0517 Transaction serializabilit... |
-- @testpoint:opengauss关键字raw(非保留),作为模式名
--关键字不带引号-成功
drop schema if exists raw;
create schema raw;
drop schema raw;
--关键字带双引号-成功
drop schema if exists "raw";
create schema "raw";
drop schema "raw";
--关键字带单引号-合理报错
drop schema if exists 'raw';
--关键字带反引号-合理报错
drop schema if exists `raw`;
|
<filename>db/seeds.sql<gh_stars>0
INSERT INTO department (department_name)
VALUES
('Management'),
('Front of House'),
('Back of House');
INSERT INTO manager (first_name, last_name)
VALUES
('Gil', 'Bry'),
('Co', 'Knee'),
('Gar', 'Cris');
INSERT INTO job (title, salary, department_id)
VALUES
('General Manager', '20'... |
--------------------
---- DISTINCT ------
--------------------
/*
1. Use DISTINCT to test if there are any accounts
associated with more than one region.
*/
SELECT DISTINCT a.name AS account,
r.name AS region
FROM accounts a
JOIN sales_reps s
ON a.sales_rep_id = s.id
JOIN region r
ON s.region_id = r.i... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 03-02-2016 a las 12:53:32
-- Versión del servidor: 5.5.46-0ubuntu0.14.04.2
-- Versión de PHP: 5.5.9-1ubuntu4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @... |
SELECT
`t`.`name` AS `team_name`,
`a`.`name` AS `address_name`,
CHAR_LENGTH(`a`.`name`) AS `count_of_characters`
FROM
`teams` AS `t`
LEFT JOIN
`offices` AS `off` ON `t`.`office_id` = `off`.`id`
LEFT JOIN
`addresses` AS `a` ON `a`.`id` = `off`.`address_id`
WHERE
`off`.`websit... |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Aug 05, 2018 at 05:56 AM
-- Server version: 5.7.21
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `googlemap`
--
-- --------------------------... |
<reponame>nf-framework/nf-back-dbfw
{
"schema": "nfc",
"tablename": "options",
"comment": "Системные опции",
"cols": [
{
"name": "caption",
"datatype": "varchar",
"datatype_length": "300",
"datatype_full": "character varying(300)",
"req... |
/*
IF EXISTS (SELECT name FROM sysobjects WHERE (name = 'WorkQueueGetWorkUserView_InsertUpdate' AND type = 'P'))
DROP PROCEDURE dbo.WorkQueueGetWorkUserView_InsertUpdate
GO
*/
CREATE PROCEDURE dbo.WorkQueueGetWorkUserView_InsertUpdate
/* STORED PROCEDURE - INPUTS (BEGIN) */
@workQueueId ... |
<reponame>jantonv/XCoLab
-- Content articles
update xcolab_ContentArticleVersion set content = replace(content,'http://climatecolab.org','https://www.climatecolab.org');
update xcolab_ContentArticleVersion set content = replace(content,'http://www.climatecolab.org','https://www.climatecolab.org');
update xcolab_Content... |
CREATE TABLE [dbo].[meridians] (
[meridian_id] TINYINT NOT NULL,
[meridian_name] VARCHAR (50) NOT NULL,
[meridian_order] TINYINT NOT NULL
);
|
--Create new license role action mapping
INSERT INTO EG_ACTION (ID,NAME,URL,QUERYPARAMS,PARENTMODULE,ORDERNUMBER,DISPLAYNAME,ENABLED,CONTEXTROOT,VERSION,CREATEDBY,
CREATEDDATE,LASTMODIFIEDBY,LASTMODIFIEDDATE,APPLICATION) VALUES (NEXTVAL('SEQ_EG_ACTION'),'Create New License Application',
'/license/create',null,(select ... |
<filename>script/package/pkg_util.body.sql
CREATE OR REPLACE PACKAGE BODY LOG_AUDIT.PKG_UTIL IS
FUNCTION F_SPLIT(P_TEXT IN VARCHAR2) RETURN T_SPLITED_STR
PIPELINED IS
LIST R_SPLITED_STR;
BEGIN
FOR i in (
WITH CTE AS (SELECT P_TEXT temp FROM DUAL)
SELECT ROWNUM AS ID, TRIM(REGEXP_SUBSTR(... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 01, 2019 at 12:25 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
CREATE TABLE users (
PRIMARY KEY (user_id),
user_id VARCHAR(255) NOT NULL,
age INT UNSIGNED,
calorie_goal INT UNSIGNED,
display_name VARCHAR(255),
height_inches INT UNSIGNED,
sex ENUM('Female', 'Male'),
weight_pounds INT UNSIGNED
);
C... |
pg> \d country
| Column | Type | Modifiers |
|----------------+----------------+-----------|
| code | character(3) | not null |
| name | character vary | not null |
| continent | character vary | not null |
| region | character vary | not null |
| surfacearea ... |
-- This file should undo anything in `up.sql`
DROP INDEX blacklist_backend_type;
DROP INDEX blacklist_last_update;
DROP TABLE blacklist;
|
/*
==========================
Identify Blocking 1
==========================
This query looks for any queries that are not currently granted, then returns all other waits on that same object.
Returns no results if there are no blocked queries.
Example: if there is a queued query waiting on an excl... |
<gh_stars>1-10
-- Importance
IF NOT EXISTS (SELECT * FROM sys.sql_logins WHERE name = 'ImportantUser')
BEGIN
CREATE LOGIN [ImportantUser] WITH PASSWORD='<<PASSWORD>>'
END
;
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = 'ImportantUser')
BEGIN
CREATE USER [ImportantUser] FOR LOGIN [ImportantUser]
... |
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_3_0_logs/KCIRB-778.sql
INSERT INTO PROTOCOL_ACTION_TYPE (PROTOCOL_ACTION_TYPE_CODE, DESCRIPTION, TRIGGER_SUBMISSION, TRIGGER_CORRESPONDENCE, FINAL_ACTION_FOR_BATCH_CORRESP, UPDATE_TIMESTAMP, UPDATE_USER, VER_NBR, OBJ_ID) VALUES ('3... |
INSERT INTO dms SET (id, uid, username) VALUES (NULL, NULL, NULL);
|
<filename>tests/queries/0_stateless/02235_add_part_offset_virtual_column.sql
DROP TABLE IF EXISTS t_1;
DROP TABLE IF EXISTS t_random_1;
CREATE TABLE t_1
(
`order_0` UInt64,
`ordinary_1` UInt32,
`p_time` Date,
`computed` ALIAS 'computed_' || cast(`p_time` AS String),
`granule` MATERIALIZED cast(`ord... |
<filename>api/pkg/db/migrate/schema/migrations/000090_notifications_created_at.down.sql
ALTER TABLE notifications
DROP COLUMN created_at; |
<gh_stars>1-10
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.25)
# Database: cfadmin
# Generation Time: 2019-05-21 02:32:16 +0000
# ********************************... |
<reponame>zionyun/cubrid-testcases
--Test retrieve data using case function
--+ holdcas on;
set system parameters 'dont_reuse_heap_file=yes';
set system parameters 'create_table_reuseoid=no';
create class tb ( id int);
insert into tb values(1);
select decode(1, 1, tb) from tb order by 1;
select decode(1, 1, class tb)... |
<reponame>mtlankenau/employee-tracker
DROP DATABASE IF EXISTS employee_database;
CREATE DATABASE employee_database;
USE employee_database; |
<filename>src/fn__word_find.sql
/* leave this
l:see LICENSE file
g:utility
v:090815\s.zaglio: find a word in a sentence
t:print dbo.fn__word_find('convert(nvarchar,@test)','varchar',default,default) -->9
t:print dbo.fn__word_find('declare @test nvarchar(10)','varchar',default,default) -->15
t:... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.5
-- Dumped by pg_dump version 12.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', fal... |
<reponame>fg193/karyon
CREATE EXTENSION IF NOT EXISTS pg_trgm;
CREATE EXTENSION IF NOT EXISTS btree_gin;
CREATE TABLE IF NOT EXISTS
karyon_entity (
id BIGINT NOT NULL,
avatar_entity BIGINT,
owner_entity BIGINT NOT NULL,
editor_entity BIGINT NOT NULL,
viewer_entity BIGINT NOT N... |
<reponame>lee-amber-alex/Employee.Tracker
DROP DATABASE IF EXISTS cms_DB;
CREATE DATABASE cms_DB;
USE cms_DB;
CREATE TABLE department(
id INT AUTO_INCREMENT NOT NULL ,
dep_name VARCHAR(30) NOT NULL,
dep_manager VARCHAR(30) NOT NULL,
primary key(id),
);
CREATE TABLE roles(
id INT NOT NULL AUTO_INCREMENT,
... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 03 Oca 2022, 15:54:47
-- Sunucu sürümü: 10.4.22-MariaDB
-- PHP Sürümü: 8.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... |
USE [ReadingXML]
GO
/****** Object: Table [dbo].[Authors] Script Date: 11/27/2016 16:05:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Authors](
[au_id] [nvarchar](50) NULL,
[au_lname] [nvarchar](50) NULL,
[phone] [nvarchar](50) NULL,
[address] [nvarchar](50) NULL,
[city] [n... |
INSERT INTO blog.hibernate_sequence (next_val) VALUES (48);
INSERT INTO blog.hibernate_sequence (next_val) VALUES (48);
INSERT INTO blog.hibernate_sequence (next_val) VALUES (48);
INSERT INTO blog.hibernate_sequence (next_val) VALUES (48);
INSERT INTO blog.hibernate_sequence (next_val) VALUES (48); |
<reponame>pierresebastien/TourDeFrance<gh_stars>0
CREATE TABLE "versions"
(
"major" integer,
"minor" integer,
"patch" integer,
PRIMARY KEY("major", "minor", "patch")
);
CREATE TABLE "config"
(
"key" citext NOT NULL,
"value" text NULL,
"default_value" text NULL,
"display_name" text NULL,
"desc... |
CREATE TABLE PerfmonMessage (
Id VARCHAR(30) NOT NULL PRIMARY KEY,
Words VARCHAR(512),
Numbers VARCHAR(512),
Alpha VARCHAR(512)
);
|
<reponame>Medicyl/MedEasy<filename>medeasy.sql
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 15, 2018 at 07:46 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 S... |
create table users (
user_id serial primary key
, login varchar(50) unique
, email varchar(50) unique
, password varchar(256)
, enabled boolean
, admin boolean
, last_login timestamp without time zone default (now() at time zone 'utc')
, data json -- dont know maybe will have user pref... |
BEGIN;
ALTER TABLE sessions
DROP CONSTRAINT active_must_have_join_id;
COMMIT;
|
--
-- CzechIdM 8 Flyway script
-- BCV solutions s.r.o.
--
-- empty script - fill up missed version
|
INSERT INTO public.lineitem VALUES (5921955, 131403, 3917, 4, 36, 51638.40, 0.00, 0.06, 'R', 'F', '1993-07-06', '1993-06-28', '1993-07-09', 'DELIVER IN PERSON ', 'REG AIR ', ' slyly unusual deposits against the pen');
INSERT INTO public.lineitem VALUES (77191, 59441, 6957, 5, 39, 54617.16, 0.00, 0.02, 'A', 'F'... |
<reponame>LeanSama10/basketball<filename>cstv/load_cstv_games.sql<gh_stars>10-100
begin;
drop table if exists cstv.games;
create table cstv.games (
event_id integer,
primary key (event_id)
);
copy cstv.games from '/tmp/game.csv' with delimiter as ',' csv header quote as '"';
--alter table nca... |
SELECT * FROM people FETCH FIRST 10 ROWS ONLY; |
-- file:rowsecurity.sql ln:1795 expect:true
CREATE POLICY p4 ON rls_tbl FOR DELETE USING (c1 <= 3)
|
<gh_stars>10-100
-- file:boolean.sql ln:143 expect:true
SELECT '' AS f_4, BOOLTBL2.* FROM BOOLTBL2
|
SET @sName = 'bx_acl';
-- FORMS
DELETE FROM `sys_form_inputs` WHERE `object`='bx_acl_price' AND `name` IN ('period', 'period_unit', 'price');
INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, ... |
<reponame>smith750/kc
TRUNCATE TABLE KRIM_AFLTN_TYP_T DROP STORAGE
/
INSERT INTO KRIM_AFLTN_TYP_T (ACTV_IND,AFLTN_TYP_CD,DISPLAY_SORT_CD,EMP_AFLTN_TYP_IND,LAST_UPDT_DT,NM,OBJ_ID,VER_NBR)
VALUES ('Y','AFLT','d','N',TO_DATE( '20081113140630', 'YYYYMMDDHH24MISS' ),'Affiliate','5B97C50B03736110E0404F8189D85213',1)
/
INSE... |
CREATE TABLE IF NOT EXISTS vets (
id SERIAL PRIMARY KEY,
first_name VARCHAR(30),
last_name VARCHAR(30)
);
CREATE INDEX IF NOT EXISTS vets_idx1 on vets (
last_name
);
CREATE TABLE IF NOT EXISTS specialties (
id SERIAL PRIMARY KEY,
name VARCHAR(80)
);
CREATE INDEX IF NOT EXISTS specialties_idx1 on specialt... |
<filename>Hackerrank/SQL/S0014.sql
/*https://www.hackerrank.com/challenges/weather-observation-station-9/problem*/
SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP '^[^AEIOU]';
|
-- MySQL dump 10.13 Distrib 5.5.29, for osx10.6 (i386)
--
-- Host: 127.0.0.1 Database: opensource
-- ------------------------------------------------------
-- Server version 5.5.29
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... |
<filename>macros/get_automation_recipient_columns.sql<gh_stars>1-10
{% macro get_automation_recipient_columns() %}
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()},
{"name": "automation_email_id", "datatype": dbt_utils.type_string()},
{"name": "list_id", "datatype": d... |
-- -------------------------------------------------------------------
-- @2020, Odysseus Data Services, Inc. All rights reserved
-- MIMIC IV CDM Conversion
-- -------------------------------------------------------------------
-- -------------------------------------------------------------------
-- Populate cdm_obser... |
<reponame>rodel-talampas/gpdb
------------------------------------------------------------------
-- gphdfs Protocol/Formatters
------------------------------------------------------------------
CREATE OR REPLACE FUNCTION pg_catalog.gphdfs_export(record) RETURNS bytea
AS '$libdir/gphdfs.so', 'gphdfsformatter_export'
LAN... |
<gh_stars>1-10
DROP VIEW IF EXISTS view_beban_barang4_bkd;
CREATE VIEW view_beban_barang4_bkd AS
SELECT
*,
beban * harga AS jumlah_harga
FROM
view_beban_barang3_bkd
WHERE
1 = 1 AND
beban > 0 AND
id_skpd = 26;
GRANT ALL PRIVILEGES ON view_beban_barang4_bkd TO lap_bkd;
REVOKE INSERT, UPDATE, DELETE ON view_beban_... |
INSERT INTO `city` (`id`, `name`, `lat`, `long`, `created_at`) VALUES
(1, 'Абакан', '52.6517296', '90.0885929', '2021-02-20 16:01:30'),
(2, 'Анадырь', '53.7223661', '91.4437792', '2021-02-20 16:01:30'),
(3, 'Архангельск', '53.6778096', '53.6473115', '2021-02-20 16:01:31'),
(4, 'Астрахань', '44.8679931', '38.1618437', '... |
<filename>sql/_03_object_oriented/_02_collection_type/_001_class/cases/1006.sql
--Create a class with collection type:sequence
create class t1(c1 sequence integer, c2 sequence varchar(10),
c3 sequence date, c4 sequence char(2),
c5 sequence timestamp, c6 sequence bit(8));
insert into t1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.