sql stringlengths 6 1.05M |
|---|
<filename>starcollector/sql/probonoDML.sql
-- activist insert[재능 기부자 저장]
insert into activist values('giver1', '나의사', 'gp1', 'dermatology');
insert into activist values('giver2', '오드리', 'gp2', 'culture');
insert into activist values('giver3', '키다리', 'gp3', 'mentor');
-- recipient insert[재능 수혜자 저장]
insert into recipie... |
<reponame>metabrainz/sir
-- Automatically generated, do not edit!
\set ON_ERROR_STOP 1
BEGIN;
CREATE OR REPLACE FUNCTION search_annotation_insert() RETURNS trigger
AS $$
BEGIN
PERFORM amqp.publish(2, 'search', 'index', (
WITH keys(editor, id) AS (SELECT NEW.editor, NEW.id)
SELECT jsonb_... |
USE SalutApp;
CREATE TABLE IF NOT EXISTS PlayerConfig
(
Id BIGINT AUTO_INCREMENT PRIMARY KEY,
GameSystemId BIGINT NOT NULL,
PointsAllowed INT NOT NULL,
FOREIGN KEY (GameSystemId) REFERENCES GameSystem(Id)
); |
<gh_stars>100-1000
SELECT TOP (@MaxCount) dbo.Streams.IdOriginal, dbo.Streams.IdInternal
FROM dbo.Streams
WHERE dbo.Streams.IdInternal > @AfterIdInternal
AND dbo.Streams.IdOriginal LIKE CONCAT(@Pattern, '%')
ORDER BY dbo.Streams.IdInternal ASC |
CREATE TABLE utilisateurs (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(30) NOT NULL UNIQUE,
password VARCHAR(200) NOT NULL,
inscription_date DATETIME NOT NULL,
mail VARCHAR(50) NOT NULL UNIQUE,
nom VARCHAR(50) NULL,
telephone CHAR(10) NULL UNIQUE,
adresse VARCHAR(60) NU... |
<reponame>2MAX-io/php-classifieds<filename>install/data/settings.sql
INSERT INTO setting (name, value, last_update_date) VALUES ('indexPageTitle', '2MAX.io Classified Ads', '2010-01-01 00:00:00');
INSERT INTO setting (name, value, last_update_date) VALUES ('pageTitleSuffix', '- 2MAX.io Classified Ads', '2010-01-01 00:0... |
<filename>db/week6.sql
-- SQL statements for stuff
/*
As an HR advisor I want to produce a report on capital cities with the following information
Name
Country
Population
*/
SELECT city.Name, country.Name, city.Population FROM country JOIN city.CountryCode = country.Code
WHERE city.ID = country.Capital
/... |
/*
Navicat MySQL Data Transfer
Source Server : mysql1
Source Server Version : 50634
Source Host : 192.168.180.44:3306
Source Database : back
Target Server Type : MYSQL
Target Server Version : 50634
File Encoding : 65001
Date: 2016-12-12 10:20:30
*/
SET FOREIGN_KEY_CHECKS=0;
-- --... |
<reponame>juhasipo/multi-user-test-runner-project
create table user (
name varchar2(300 char) not null,
username varchar2(300 char) not null,
password varchar2(300 char) not null,
primary key (username),
);
create table user_role (
username varchar2(300 char) not null,
role varchar2(300 char) n... |
-- +migrate Up
-- SQL in section 'Up' is executed when this migration is applied
ALTER TABLE stop_areas
ADD COLUMN parent_id uuid,
ADD COLUMN collect_children boolean,
ADD COLUMN line_ids text;
-- +migrate Down
-- SQL section 'Down' is executed when this migration is rolled back
ALTER TABLE stop_areas
DROP C... |
SET ANSI_NULLS OFF
SET QUOTED_IDENTIFIER ON
if NOT EXISTS
(
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME='tblContentStructure'
AND COLUMN_NAME='nCloneStructId'
)
ALTER TABLE dbo.tblContentStructure
ADD nCloneStructId int NULL;
|
DROP TABLE IF EXISTS release_dependency;
|
SELECT * FROM READ_MARKS
WHERE
NO = ?
;
|
-- test old extension version entry points
CREATE EXTENSION pg_stat_statements WITH VERSION '1.4';
-- Execution of pg_stat_statements_reset() is granted only to
-- superusers in 1.4, so this fails.
SET SESSION AUTHORIZATION pg_read_all_stats;
SELECT pg_stat_statements_reset();
RESET SESSION AUTHORIZATION;
AlTER EXTEN... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Oct 06, 2019 at 10:40 AM
-- Server version: 5.7.21
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... |
<filename>tokoku.sql
/*
SQLyog Community v13.1.8 (64 bit)
MySQL - 10.4.22-MariaDB : Database - tokoku
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!400... |
RAISE EXCEPTION 'Nonexistent ID --> %', user_id
USING HINT = 'Please check your user ID';
|
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 02-03-2021 a las 02:32:55
-- Versión del servidor: 5.7.24
-- Versión de PHP: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
-- Create/Delete/Edit/Display an Employer
INSERT INTO Employer
(UserName, UserPassword, Email, Company, Telephone, PostalCode, City, Address, EmployerCategoryId,Status)
VALUES
("ORNndotA", "RAB52AZN6IP","<EMAIL>","Cat Nuc In.","(232) 402-0247","G3H9J3","Warisoulx","P.O. Box 529, 9904 Dolor, Ave" , 1, "acti... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.3.11
-- Generation Time: Feb 09, 2022 at 06:37 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 7.3.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... |
CREATE TABLE public.director
(
id BIGSERIAL PRIMARY KEY UNIQUE,
name VARCHAR NOT NULL,
forename VARCHAR NOT NULL,
UNIQUE (name, forename)
);
CREATE TABLE public.actor
(
id BIGSERIAL PRIMARY KEY UNIQUE,
name VARCHAR NOT NULL,
forename VARCHAR NOT NULL,
UNIQUE (name, f... |
# 10. Get user’s articles count
CREATE FUNCTION `udf_users_articles_count`(username VARCHAR(30)) RETURNS int
BEGIN
RETURN (SELECT
count(a.id) AS count_articles
FROM articles AS a
JOIN users_articles AS ua ON a.id = ua.article_id
JOIN users As u ON ua.user_id = u.id
WHERE u.username = username
GR... |
<reponame>alevel-cherkashin/Shop
CREATE TABLE [dbo].[Client] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (50) NULL,
[IsDeleted] BIT NULL,
[CategoryId] INT NULL,
CONSTRAINT [PK_Client] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_Client_C... |
-- coreclear --
ALTER TABLE phppos_locations
ADD `blockchyp_api_key` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
ADD `blockchyp_bearer_token` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
ADD `blockchyp_signing_key` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
ADD `blockchyp_test_mode` VARCHAR(255) C... |
create table users (
id serial primary key not null,
email varchar(255) not null,
created_at timestamp not null,
updated_at timestamp not null
);
create table user_orders (
id serial primary key not null,
user_id integer not null references users(id),
product varchar(255) not null,
price float not null... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Окт 05 2020 г., 10:54
-- Версия сервера: 10.3.13-MariaDB
-- Версия PHP: 7.1.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>fagnersutel/mytd<filename>populate_yellow_trips.sql
CREATE TABLE tmp_points AS
SELECT
id,
ST_SetSRID(ST_MakePoint(pickup_longitude, pickup_latitude), 4326) as pickup,
ST_SetSRID(ST_MakePoint(dropoff_longitude, dropoff_latitude), 4326) as dropoff
FROM yellow_tripdata_staging
WHERE pickup_longitude IS NOT... |
DROP TABLE IF EXISTS Notes CASCADE;
-- SCHEMA
CREATE TABLE Notes (
-- General
note_id SERIAL PRIMARY KEY,
created TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
updated TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
-- Attributes
document_id CHARACTER VARYING(255) NOT NULL REFERENCES Docu... |
<gh_stars>10-100
-- Verify schemas/faker/tables/dictionary/table on pg
BEGIN;
SELECT verify_table ('faker.words');
ROLLBACK;
|
-- file:bit.sql ln:149 expect:true
SELECT POSITION(B'111010110' IN B'0000011101011111010110')
|
<reponame>baoziwaka/Springboot<gh_stars>1000+
-- Dumping database structure for concretepage
CREATE DATABASE IF NOT EXISTS `pos` default charset utf8 COLLATE utf8_general_ci;
SET FOREIGN_KEY_CHECKS=0;
USE `pos`;
-- Dumping structure for table concretepage.articles
CREATE TABLE IF NOT EXISTS `articles` (
`article_id` ... |
<reponame>gianadda/ZenPRM
IF EXISTS (select * from dbo.sysobjects where id = object_id(N'ufnGetMeasureTypeAverageIdent')
AND OBJECTPROPERTY(id, N'IsScalarFunction') = 1)
DROP FUNCTION ufnGetMeasureTypeAverageIdent
GO
/*
*/
CREATE FUNCTION ufnGetMeasureTypeAverageIdent()
RETURNS BIGINT
AS
BEGIN
RETURN(1)
... |
CREATE OR REPLACE PACKAGE BODY APPS.xxhr_bipub_rep_pkg IS
PROCEDURE generate_xml( p_errbuf OUT VARCHAR2
, p_retcode OUT NUMBER) IS
BEGIN
FND_FILE.put_line(fnd_file.output, '<?xml version="1.0" encoding="UTF-8"?>');
FND_FILE.put_line(fnd_file.output, '<Roster>');
FN... |
<gh_stars>0
create table JBPM4_DEPLOYMENT (
DBID_ bigint not null,
NAME_ longvarchar,
TIMESTAMP_ bigint,
STATE_ varchar(255),
primary key (DBID_)
)^
create table JBPM4_DEPLOYPROP (
DBID_ bigint not null,
DEPLOYMENT_ bigint,
OBJNAME_ varchar(2... |
<filename>Stuff/AutoWho.ViewHistoricalSessions.StoredProcedure.sql
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [AutoWho].[ViewHistoricalSessions]
/*
Copyright 2016 <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the... |
<reponame>theopensorcerers/helppy
{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6... |
/*
To use this script, enter the command:
$ psql -f checkin-checkout-db-restore.sql -a --echo-all
Also supply the values for -h, -d, -U if applicable
This script will remove all the loans and requests, and their related data from the tables. It is expected that these loans and requests will be repopulated by anot... |
DROP TABLE IF EXISTS folio_derived.holdings_ext;
-- Create an extended holdings table which includes the name for call number type, holdings type, interlibrary loan policy,
-- permanent location, and temporary location.
-- Holdings notes are in a separate derived table.
CREATE TABLE folio_derived.holdings_ext AS
WITH... |
<reponame>nicolaslattuada/Openfire
CREATE TABLE ofExternalServices (
serviceID BIGINT NOT NULL,
name VARCHAR(255),
host VARCHAR(255) NOT NULL,
port INT,
restricted BOOLEAN,
transport CHAR(3),
type VARCHAR(10... |
<reponame>vessels-tech/dfsp-identity
CREATE TABLE identity."roleAction"
(
"roleId" INTEGER NOT NULL,
"actionId" INTEGER NOT NULL,
CONSTRAINT "fkIdentityRoleAction_roleId" FOREIGN KEY ("roleId") REFERENCES identity."role"("roleId"),
CONSTRAINT "fkIdentityRoleAction_actionId" FOREIGN KEY ("actionId") REFERENCES i... |
----------------------------------------
-- INPUTS
-- location: neighborhood
-- proj: :nb_output_srid psql var must be set before running this script,
-- e.g. psql -v nb_output_srid=2163 -f supermarkets.sql
----------------------------------------
DROP TABLE IF EXISTS generated.neighborhood_supermarkets;
CREATE ... |
<filename>db/migrations/governance/009_create_table_governance_votes.sql
create table governance.votes
(
proposal_id bigint not null,
user_id text not null,
support boolean not null,
power numeric(78) not null,
block_timestamp bigint not ... |
-- phpMyAdmin SQL Dump
-- version 4.4.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 01, 2015 at 07:33
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `summittosea`
--
CREATE DATABASE IF NOT EXISTS `summit... |
<reponame>taritom/bn-api
ALTER TABLE ticket_type_codes DROP CONSTRAINT ticket_type_code_ticket_type_id_valid;
DROP FUNCTION ticket_type_code_ticket_type_id_valid;
DROP INDEX index_ticket_type_codes_ticket_type_id_code_id;
DROP TABLE ticket_type_codes;
|
<gh_stars>1-10
CREATE TABLE `{table}` (
`id` integer unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
`name` varchar(128) NOT NULL,
`code` varchar(64) NOT NULL,
`sitecode` varchar(64) NOT NULL,
`min_members` tinyint NOT NULL default 1,
`max_members` tinyint NULL,
`active` timestamp NOT NULL,
UNIQUE code (`... |
SELECT
UNIQUE
CASE
WHEN
NVL(UPPER(stu_serv_rec.bldg), '') = 'CMTR'
OR
NVL(stu_serv_rec.bldg, '') = 'undc'
OR
NVL(UPPER(stu_serv_rec.bldg), '') = ''
THEN
'Commuter'
ELSE
'Resident'
END
AS
resid... |
<filename>Database/Schema/Profile.Data.Publication.Pubmed.AddOneAuthorPosition.StoredProcedure.sql
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE procedure [Profile.Data].[Publication.Pubmed.AddOneAuthorPosition]
@PersonID INT,
@pmid int
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-... |
<gh_stars>1-10
--+ holdcas on;
---- ALTER TABLE ... CHANGE COLUMN , type change : INT to NUMERIC
-- constraints : no constraints
-- ordering : no order defined
-- name : same name or changed
set system parameters 'alter_table_change_type_strict=yes';
set system parameters 'error_log_level=warning';
set system parame... |
<filename>openGaussBase/testcase/KEYWORDS/yes/Opengauss_Function_Keyword_Yes_Case0022.sql<gh_stars>0
-- @testpoint:opengauss关键字yes(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists yes;
create group yes with password '<PASSWORD>';
drop group yes;
--关键字带双引号-成功
drop group if exists "yes";
create group "yes" with password... |
<filename>openGaussBase/testcase/KEYWORDS/public/Opengauss_Function_Keyword_Public_Case0034.sql
-- @testpoint: opengauss关键字public(非保留),作为游标名,部分测试点合理报错
--前置条件
drop table if exists public_test cascade;
create table public_test(cid int,fid int);
--关键字不带引号-成功
start transaction;
cursor public for select * from public_test... |
<filename>cms/sql/article.sql
-- 创建文章数据表
CREATE TABLE `final_article` (
`aid` INT(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
`cate_id` TINYINT NOT NULL DEFAULT 1 COMMENT '文章分类ID',
`title` VARCHAR(100) NOT NULL DEFAULT '' COMMENT '文章标题',
`cover_img` VARCHAR(100) NOT NULL DEFAULT '' COMMENT '文章封面图',
`subtitle` V... |
<filename>Programamos/like.sql
--Encuentro todos las personas con el correo de gmail
SELECT `nombre`,`apellido`,`email`,`edad`,`fecha`,`casado`
FROM `personas` WHERE `email` like <EMAIL>'; |
CREATE TABLE [dbo].[EventStore-Counter] (
[AggregateId] UNIQUEIDENTIFIER NOT NULL,
[Version] BIGINT NOT NULL,
[EventDateTime] DATETIME2 (7) NOT NULL,
[SourceCorrelationId] NVARCHAR(255) NOT NULL,
[Payload] NVARCHAR (MAX) NOT NULL
);
|
set serverout on size unl feed off echo off time off timing off
set head off
set linesize 10000
set pagesize 50000
set long 10000
set colsep ";"
set trimspool on
column tm new_value file_time noprint
select to_char(sysdate, 'YYYYMMDD') tm from dual ;
prompt &file_time
spool logfile_id&file_time..log
Spool "/... |
prompt --application/deployment/install/install_metadata
begin
-- Manifest
-- INSTALL: INSTALL-Metadata
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2021.10.15'
,p_release=>'21.2.6'
,p_default_workspace_id=>18303204396897713
,p_default_application_id=>401
,p_default_id_offset=>0
,p_def... |
CREATE USER test WITH PASSWORD '<PASSWORD>';
CREATE DATABASE test WITH ENCODING 'UTF8' LC_COLLATE='ko_KR.utf8' LC_CTYPE='ko_KR.utf8' TEMPLATE=template0;
GRANT ALL PRIVILEGES ON DATABASE test TO test;
CREATE USER xwiki WITH PASSWORD '<PASSWORD>';
CREATE DATABASE xwiki;
GRANT ALL PRIVILEGES ON DATABASE xwiki TO xwiki;
|
<filename>mysqldump_blog.sql
-- MySQL dump 10.13 Distrib 5.7.30, for Linux (x86_64)
--
-- Host: localhost Database: blog
-- ------------------------------------------------------
-- Server version 5.7.30-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_... |
<reponame>aingvarf/zabbix-bdchecker<gh_stars>0
# The name of this file should be the same as DSN name in databases.yml
# Symbols ? are placeholders for parameters, which are applied according there order in request
# For example:
# name='param' => name=?
# name=param => name=?
# name in ('par1','par2') => n... |
<gh_stars>0
USE CRM;
TRUNCATE TABLE Metadata.MappingColumn
DELETE Metadata.MappingFile
DELETE Metadata.AttributeType
DELETE Metadata.AttributeCategory
SET IDENTITY_INSERT Metadata.AttributeCategory ON
INSERT INTO Metadata.AttributeCategory (CategoryId, CategoryName, IsDemographic, IsSensitive) VALUES (1, N'General'... |
<gh_stars>0
drop database if exists merx_db;
create database merx_db;
use merx_db;
create table Users (
id int auto_increment primary key,
username varchar(50) not null,
tag varchar(4) not null,
email varchar(255) not null,
password varchar(255) not null,
createdAt datetime,
updatedAt date... |
<reponame>lgcarrier/AFW
SET DEFINE OFF;
CREATE UNIQUE INDEX AFW_01_MESG_UK1 ON AFW_01_MESG
(NUMR_MESG, REF_PRODT)
LOGGING
/
|
<reponame>zakiry/golang_api_sample
INSERT INTO users(id, name, age) VALUES
(1, 'ho<NAME>', 20),
(2, 'piyo piyo', 30),
(3, 'foo foo', 35),
(4, 'bar bar', 40),
(5, 'baz baz', 45);
|
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 13, 2019 at 10:44 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.2.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
<filename>src/main/resources/db/migration/V1.1.3__Legger_paa_constraints_i_done-tabellen.sql
ALTER TABLE DONE DROP CONSTRAINT IF EXISTS doneEventIdProdusent;
ALTER TABLE DONE ADD CONSTRAINT doneEventIdProdusent UNIQUE (eventid, systembruker);
|
<reponame>pensnarik/domains-database
revoke all on SCHEMA public from public;
grant all on SCHEMA public to public;
--
-- PostgreSQL database dump complete
--
|
<gh_stars>1-10
--liquibase formatted sql
--changeset uk.gov.pay:alter_table-mandates-return-url
ALTER TABLE mandates ADD COLUMN return_url VARCHAR(255);
--rollback ALTER TABLE mandates DROP COLUMN return_url;
--changeset uk.gov.pay:alter_table-mandates-external_id
ALTER TABLE mandates ALTER COLUMN external_id TYPE VA... |
<filename>core-services/egov-user/src/main/resources/db/migration/ddl/V20180725165212__alter_eg_role_name.sql
ALTER TABLE eg_role ALTER COLUMN name TYPE VARCHAR(128);
|
USE master
GO
CREATE DATABASE os_demo
GO
ALTER DATABASE os_demo SET READ_COMMITTED_SNAPSHOT ON
GO
CREATE LOGIN os_test WITH PASSWORD='<PASSWORD>', DEFAULT_DATABASE=os_demo,
CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO
USE os_demo
GO
CREATE USER os_test
GO
ALTER ROLE db_datareader ADD MEMBER os_test
GO
ALTER ROLE db_ddlad... |
<filename>db/migrate/000438_order_transaction.sql
ALTER TABLE `order_transaction` CHANGE `type` `type` enum('debit','credit','paid-to-restaurant', 'no-payment-needed-restaurant', 'paid-to-driver','reimbursed-driver','refunded','campus-cash-charged') DEFAULT NULL; |
<reponame>dawidkotlin/ormin<gh_stars>100-1000
create table if not exists thread(
id integer primary key,
name varchar(100) not null,
views integer not null,
modified timestamp not null default (DATETIME('now'))
);
create unique index if not exists ThreadNameIx on thread (name);
create table if not exists pers... |
-- enc3.test
--
-- execsql {
-- PRAGMA encoding
-- }
PRAGMA encoding |
<gh_stars>10-100
drop table if exists comments; |
DELETE FROM userfield_values
WHERE IFNULL(value, '') = '';
CREATE TRIGGER prevent_empty_userfields_INS AFTER INSERT ON userfield_values
BEGIN
DELETE FROM userfield_values
WHERE id = NEW.id
AND IFNULL(value, '') = '';
END;
CREATE TRIGGER prevent_empty_userfields_UPD AFTER UPDATE ON userfield_values
BEGIN
DELETE F... |
ALTER TABLE osm_extradata ADD COLUMN group_text_identifier TEXT;
|
<gh_stars>1000+
-- 04.06.2015 09:38
-- URL zum Konzept
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,542843,0,'IsCreditedInvoiceReinvoicable',TO_TIMESTAMP('2015-06-04 09:38:08','YYYY-MM-DD HH24:MI:SS... |
DROP TYPE IF EXISTS nhdplus_navigation30.flowline;
CREATE TYPE nhdplus_navigation30.flowline
AS(
comid INTEGER
,permanent_identifier VARCHAR(40)
,reachcode VARCHAR(14)
,fcode INTEGER
,fmeasure NUMERIC
,tmeasure NUMERIC
,hydro... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 20, 2018 at 11:46 AM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>githotirado/databricks_archives
-- in MSSQL with 'where' and hidden aggregate function, 2 aggregates in select
select max(salary * months), count(*)
from employee em
where salary * months =
(select max(salary * months) from employee);
-- in MSSQL 1 aggregate in select, compensate by putting in 'grou... |
# SQLiteManager Dump
# Version: 1.2.4
# http://www.sqlitemanager.org/
#
# Host: localhost
# Generation Time: Friday 06th 2012f January 2012 03:11 pm
# SQLite Version: 3.6.15
# PHP Version: 5.3.0
# Database: tuxxedo.sqlite3
# --------------------------------------------------------
#
# Table structure for ... |
-- ILP fulfillment data can be 32KiB, plus the ILP packet envelope, encoded in
-- Base64 (33% overhead). 64KiB should be safe.
ALTER TABLE "L_FULFILLMENTS"
ADD COLUMN "FULFILLMENT_DATA" CHARACTER VARYING(65535) NULL;
-- Memos may contain ILP packets which can be slightly larger than 33KiB,
-- encoded in Base64.
ALT... |
/****** Object: Table [dbo].[T_Job_Parameters_History] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_Job_Parameters_History](
[Job] [int] NOT NULL,
[Parameters] [xml] NULL,
[Saved] [datetime] NOT NULL,
[Most_Recent_Entry] [tinyint] NOT NULL,
CONSTRAINT [PK_T_Job_Paramete... |
create table public.categories (
id serial NOT NULL PRIMARY KEY,
name text NOT NULL
);
insert into public.categories (id, name) values
(1, 'Funny'),
(2, 'Weird'),
(3, 'Dumb'),
(4, 'Cute'),
(5, 'Interesting');
create type meme_status AS enum ('new', 'old', 'retired');
create table public.memes (
id serial NOT NU... |
<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/storage/pg_twophase/switch_ckpt_a/post_sql/sql/insert_heap_gist_index_template_a0.sql<gh_stars>0
\d pg2_heap_table_gist_index_a0
set enable_seqscan=off;
select property from pg2_heap_table_gist_index_a0 where property='( (0,0), (1,1) )';
DROP TABLE pg2_heap_table_gist_i... |
<gh_stars>1-10
-- start_ignore
-- Isolation test for instrumentation in shmem
-- One session executing a query then another session
-- try to cancel/terminate the query, instrumentation
-- slots in shmem should be recycled correctly.
DROP SCHEMA IF EXISTS QUERY_METRICS CASCADE;
CREATE SCHEMA QUERY_METRICS;
SET SEARCH_... |
<filename>sql/updates/0.0.2/sql_r241.sql<gh_stars>1-10
/* r241 Multiple choice in polls */
ALTER TABLE `sed_polls` ADD COLUMN `poll_multiple` tinyint(1) NOT NULL default '0'; |
SELECT 1 from db_root where ISNULL(1+1);
SELECT 1 from db_root where ISNULL(1/0);
SELECT 1 from db_root where ISNULL(NULL);
SELECT 1 from db_root where ISNULL('2');
SELECT 1 from db_root where ISNULL(1);
SELECT 1 from db_root where ISNULL('1'+'1');
select 1 from db_root where isnull(123456789012345/1234567890); |
<gh_stars>1-10
-- Prevent TAB-8090 breaking things (will probably just push the exception up the stack to where the bad happens)
drop index if exists idx_submissionvalue_markerfeedback;
create unique index idx_submissionvalue_markerfeedback on submissionvalue (marker_feedback_id, name);
|
UPDATE CONFIG set version = '5.0';
CREATE TABLE VEHICULES_TYPES(
idVehiculesType INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
libelleType VARCHAR(100)
);
CREATE TABLE VEHICULES(
idVehicule INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
libelleVehicule VARCHAR(100),
immatriculation VARCHAR(15),
marqueModele VARCHAR(100),
... |
<gh_stars>0
DROP TABLE IF EXISTS compra;
CREATE TABLE `compra` (
`idcompra` int(11) NOT NULL AUTO_INCREMENT,
`idproveedor` int(11) NOT NULL,
`tipo_pago` varchar(25) DEFAULT NULL,
`num_recibo` varchar(10) NOT NULL,
`fecha_hora` datetime DEFAULT NULL,
`total` decimal(11,2) NOT NULL,
`estado` varchar(10) NO... |
<reponame>christophanneser/Bao-for-Presto
SELECT COUNT(*)
FROM
tag as t,
site as s,
question as q,
tag_question as tq
WHERE
t.site_id = s.site_id
AND q.site_id = s.site_id
AND tq.site_id = s.site_id
AND tq.question_id = q.id
AND tq.tag_id = t.id
AND (s.site_name in ('unix'))
AND (t.name in ('awk','files','filesystems',... |
CREATE OR ALTER PROC usp_TransferMoney(@SenderId INT, @ReceiverId INT, @Amount DECIMAL(36,4))
AS
BEGIN TRANSACTION
DECLARE @SendersAccount DECIMAL(36,4) = (SELECT Balance FROM Accounts WHERE Id = @SenderId)
DECLARE @ReceiversAccount DECIMAL(36,4) = (SELECT Balance FROM Accounts WHERE Id = @ReceiverId)
IF (@Sender... |
DELETE FROM lest;
CREATE TABLE mine_ressurser
(
id SERIAL PRIMARY KEY NOT NULL,
eier VARCHAR NOT NULL,
ressurs ressurs NOT NULL,
tidspunkt TIMESTAMP NOT NULL,
verdi VARCHAR
);
ALTER TABLE lest RENAME TO andres_ressurser;
ALTER TABLE andres_ressurser RENAME CO... |
CREATE OR REPLACE FUNCTION raise_func(text)
RETURNS void LANGUAGE plpgsql AS
$BODY$
BEGIN
RAISE NOTICE '%', $1;
END;
$BODY$;
WITH
sql_task(id) AS (
INSERT INTO timetable.base_task VALUES (
DEFAULT, -- task_id
'raise client message', -- name
... |
<reponame>ambitioninc/django-entity-history
DROP FUNCTION IF EXISTS update_entity_relationship_activation_history();
|
--------------------------------------------------------------------------------
--
-- A PL/SQL chrestomathy
--
-- Module: text
-- Submodule: nonprintables
-- Purpose: detecting and amending nonprintable strings
--
-- Copyright (c) 2014-5 <NAME>
--
-- Permission is hereby granted, free of charge, to any p... |
-- 显示数据库
USE test_db;
SHOW tables;
|
DROP TABLE IF EXISTS `XXX_plugin_skriptor`; ##b_dump##
|
<reponame>jinorasa2002/mint<filename>app/install/refdict_db/ref.sql
--
-- 由SQLiteStudio v3.1.1 产生的文件 周三 8月 5 15:10:22 2020
--
-- 文本编码:UTF-8
--
PRAGMA foreign_keys = off;
BEGIN TRANSACTION;
-- 表:dict
DROP TABLE IF EXISTS dict;
CREATE TABLE dict (
id INTEGER PRIMARY KEY AUTOINCREMENT
UNIQ... |
USE [SQLMonitor]
GO
IF OBJECT_ID('[dbo].[Reports]') IS NOT NULL
DROP TABLE [dbo].[Reports];
GO
CREATE TABLE [dbo].[Reports] (
[ReportID] [int] IDENTITY(1,1) NOT NULL,
[ReportName] [varchar](100) NOT NULL, -- the actual report name as it will appear on the output
[ReportType] [varchar](50) ... |
<gh_stars>10-100
-- file:hs_standby_allowed.sql ln:121 expect:true
discard all
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.