sql stringlengths 6 1.05M |
|---|
<reponame>kevin-at-datical/liquibase-test-harness<filename>src/main/resources/liquibase/harness/change/expectedSql/db2-z/dropFunction.sql<gh_stars>0
CREATE FUNCTION test_function (X1 DOUBLE) RETURNS DOUBLE DETERMINISTIC RETURN SIN(X1)/COS(X1)
DROP FUNCTION "LTHUSER".test_function |
<gh_stars>1-10
CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" (
"MigrationId" character varying(150) NOT NULL,
"ProductVersion" character varying(32) NOT NULL,
CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId")
);
START TRANSACTION;
DO $$
BEGIN
IF NOT EXISTS(SELECT 1 FROM "__EFMigr... |
<reponame>computer0316/lezu<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2017 年 11 月 27 日 10:57
-- 服务器版本: 5.6.12-log
-- PHP 版本: 5.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 21, 2017 at 01:43 PM
-- Server version: 5.7.19-0ubuntu1
-- PHP Version: 7.1.9-1+ubuntu17.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!... |
<filename>php_sql/database_sql/02_m_beras_users.sql<gh_stars>0
DROP TABLE IF EXISTS `u216319883_beras_m_db`.`beras_users`;
CREATE TABLE `u216319883_beras_m_db`.`beras_users`
(
`user_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`card_uid` CHAR(14) NOT NULL,
`user_ktp` CHAR(16) NOT NULL,
`user_firstname` VAR... |
<reponame>Dara2004/EmployeeDirectory
INSERT INTO WorkerSkill (WorkerNumber, SkillCategoryId, SkillId, SkillLevel) VALUES (N'10000', N'26', N'4', N'novice');
INSERT INTO WorkerSkill (WorkerNumber, SkillCategoryId, SkillId, SkillLevel) VALUES (N'10000', N'34', N'3', N'intermediate');
INSERT INTO WorkerSkill (WorkerNumber... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 27-03-2020 a las 09:27:49
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 19, 2021 at 08:04 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
-- Punkte verschmelzen
update radverkehr.o_radweg set geometrie = ST_SetPoint(geometrie,0,s.geom), source = s.k from (
select distinct on (f.id) f.id f, k.id k, k.the_geom geom from radverkehr.o_radweg_vertices_pgr f, radverkehr.o_radweg_vertices_pgr k
where f.cnt = 1 and k.cnt > 1 and not st_within(f.the_geom,(select ... |
CREATE OR REPLACE FUNCTION edit_row(session jsonb, params jsonb) returns jsonb AS $$
plv8.elog(LOG, 'edit_row:', JSON.stringify(params))
if (session.user_id == null) {
throw Error ('missing user_id in session ' + session.id)
}
var mandatoryParams = ['schema', 'table', 'row']
mandatoryParams.forEach(func... |
<reponame>Qvapil/Databases_2021
select S.Service_description, count(S.Service_ID) as Count
from Visits as V, Customer as C, Provided_at as P, Service as S
where V.Area_ID=P.Area_ID and
V.NFC_ID=C.NFC_ID and
P.Service_ID=S.Service_ID and
S.Service_description<>'stay at room' and
/*V.Visit_datetime>'202... |
<filename>5.2.3/Database/Constraints/AFW_12_GR_UT_OPERT_OPTIO_DO_PK.sql
SET DEFINE OFF;
ALTER TABLE AFW_12_GR_UT_OPERT_OPTIO_DOMN ADD (
CONSTRAINT AFW_12_GR_UT_OPERT_OPTIO_DO_PK
PRIMARY KEY
(SEQNC)
ENABLE VALIDATE)
/
|
CREATE TABLE IF NOT EXISTS submissions (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
problem_id TEXT NOT NULL,
contestant_id TEXT NOT NULL,
solution_id TEXT NOT NULL,
language TEXT NOT NULL,
status TEXT NOT NULL,
source TEXT NOT NULL,
submit_time INTEGER NOT NULL
);
CREATE INDEX IF N... |
<gh_stars>1-10
DECLARE @capabilities AS TABLE
(
Id uniqueidentifier NOT NULL PRIMARY KEY,
CapabilityRef nvarchar(10) NOT NULL,
[Name] nvarchar(255) NOT NULL,
[Description] nvarchar(500) NOT NULL,
SourceUrl nvarchar(1000) NOT NULL,
IsFoundation bit DEFAULT 0 NOT NULL,
[Version] nvarchar(10) ... |
ALTER TABLE [icUrlTracker] ADD ForceRedirect bit NOT NULL CONSTRAINT DF_icUrlTracker_ForceRedirect DEFAULT 0 |
CREATE TABLE terms_and_conditions (
terms_and_conditions_text VARCHAR(255) DEFAULT NULL
); |
-- file:polymorphism.sql ln:502 expect:true
select concat('|', variadic array[]::int[])
|
CREATE TABLE `repeat_feature` (
`repeat_feature_id` int(10) unsigned NOT NULL auto_increment,
`seq_region_id` int(10) unsigned NOT NULL default '0',
`seq_region_start` int(10) unsigned NOT NULL default '0',
`seq_region_end` int(10) unsigned NOT NULL default '0',
`seq_region_strand` tinyint(1) NOT NULL default... |
<reponame>ptrick/hdfs-hive-sql-playground<gh_stars>0
version https://git-lfs.github.com/spec/v1
oid sha256:02be3d352ad2afef0423479373c3ee856ca9ba12c0410458fb4ddf9f90bd42a6
size 23907
|
/* ---------------------------------------------------------------------- */
/* APPLICATION */
/* ---------------------------------------------------------------------- */
IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'APPLICATION')
BEGIN
DECLARE @reftable_1 nvarchar(60), @constraintnam... |
CREATE SEQUENCE seq_id_mor_poll START WITH 1000000000 INCREMENT BY 1 CACHE 100;
CREATE TABLE poll_index (
id_poll_index INTEGER NOT NULL,
questionary_type INTEGER NOT NULL,
questionary_name VARCHAR(128),
questionary_description VARCHAR(512)
);
ALTER TABLE poll_index ADD CONSTRAINT poll_index_p... |
/****** Object: View [dbo].[V_Pipeline_Job_Steps_History_List_Report] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[V_Pipeline_Job_Steps_History_List_Report]
AS
SELECT JS.Job,
JS.Step_Number AS Step,
J.Script,
JS.Step_Tool AS Tool,
SSN.Name AS Step_St... |
create table ODE_SCHEMA_VERSION (VERSION integer);
insert into ODE_SCHEMA_VERSION values (7);
|
<reponame>Zhaojia2019/cubrid-testcases<gh_stars>1-10
create table foo(id int) reuse_oid;
commit;
insert into foo values (1);
insert into foo values (2);
insert into foo values (3);
select *
from foo;
alter table foo add column text varchar(32);
select *
from foo;
update foo set text='A' where id=1;
update foo ... |
/****** Object: StoredProcedure [dbo].[Insert_Test_Item] Script Date: 07/18/2014 10:59:41 ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Insert_Test_Item]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[Insert_Test_Item]
GO
/****** Object: StoredProcedure [dbo].[Ins... |
<filename>sql_scripts/createDW.sql
CREATE DATABASE IF NOT EXISTS DWH_PROJECT;
USE DWH_PROJECT;
-- DROP SCHEMA
DROP TABLE IF EXISTS STOREANALYSIS_MV;
DROP TABLE IF EXISTS SALES;
DROP TABLE IF EXISTS PRODUCTS;
DROP TABLE IF EXISTS TIME_DIM;
DROP TABLE IF EXISTS STORES;
DROP TABLE IF EXISTS SUPPLIERS;
DROP TABLE IF EXIST... |
SELECT DISTINCT
SMATRICPL.RA as 'MATRICULA',
UPPER(PPESSOA.NOME) as 'ALUNO',
spletivo.CODPERLET [PERIODO_LETIVO],
sstatus.DESCRICAO [STATUS],
SCURSO.NOME [CURSO],
SGRADE.DESCRICAO [GRADE],
STURMADISC.CODTURMA [TURMA],
sturmadisc.CODDISC [COD_DISCIPLINA],
SDISCIPLINA.NOME [DISCIPLINA],
LOWER(PPESSO... |
USE game_db;
INSERT INTO rate (name)
VALUES ('(EC) Early Childhood'),
('(E) Everyone'),
('(E+) Everyone +10'),
('(T) Teen'),
('(M) Mature'),
('(A) Adults +18'),
('(RP) Rating Pending');
INSERT INTO studio (name)
VALUES ('Arkane'),
... |
<filename>database-schema/scripts/20180622145500_create_changelog.sql
CREATE TABLE changelog (
ID NUMERIC(20,0) NOT NULL,
APPLIED_AT VARCHAR(25) NOT NULL,
DESCRIPTION VARCHAR(255) NOT NULL);
ALTER TABLE changelog
ADD CONSTRAINT PK_changelog
PRIMARY KEY (ID);
--//@UNDO
-- SQL to undo the change goes here.
DROP ... |
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: May 13, 2019 at 08:14 PM
-- Server version: 5.6.38
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
use tessa_sullivan_test;
--
-- Database: `tessa_sullivan_test`... |
<filename>src/main/resources/db/migration/V006__Add_status_column.sql
ALTER TABLE letters
ADD COLUMN status VARCHAR(256);
UPDATE
letters
SET
status = (
CASE
WHEN printed_at IS NULL THEN
'Uploaded'
ELSE
'Posted'
END
);
|
CREATE TABLE benchmark_test
(
data character varying(32)
); |
<reponame>317h0n/soaint-challenge<gh_stars>0
INSERT INTO users (username, password, enabled) VALUES ('echocano','<PASSWORD>',true);
INSERT INTO users (username, password, enabled) VALUES ('admin','<PASSWORD>',true);
INSERT INTO authorities(user_id, authority) VALUES(1, 'ROLE_USER');
INSERT INTO authorities(user_id, au... |
CREATE PROCEDURE [dbo].[dnn_UpdateFileVersion]
@FileID int,
@VersionGuid uniqueidentifier
AS
UPDATE dbo.dnn_Files
SET VersionGuid = @VersionGuid
WHERE FileID = @FileID
|
-- MySQL dump 10.13 Distrib 5.7.19, for Win64 (x86_64)
--
-- Host: localhost Database: project_1
-- ------------------------------------------------------
-- Server version 5.7.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... |
<reponame>ligana/Ensemble-om-SpringBoot<filename>db/db/3table/level/CIF_SIGNATORY.sql
drop table if exists CIF_SIGNATORY;
/*==============================================================*/
/* Table: CIF_SIGNATORY */
/*============================================================... |
ALTER TABLE `user_live_progress`
ADD COLUMN `mods` INT NOT NULL DEFAULT '0' AFTER `lp_factor`;
UPDATE `user_live_log`
SET mods = 0;
ALTER TABLE `user_live_log`
CHANGE COLUMN `mods` `mods` INT NOT NULL DEFAULT 0 AFTER `live_setting_ids`; |
<reponame>tizian/Cendric2<filename>db/insert_scripts/dialogue/insert_text_dl_npc_robert_utf8.sql
INSERT INTO text(text_id, text_type, english, german, swiss_german) values ('DL_Robert_Congrats', 'dl_npc_robert', 'Oh, so you''re the new one here! I hope we can be friends then.', 'Oh, du bist also der Neue hier! Ich hoff... |
-- AlterTable
ALTER TABLE "User" ADD COLUMN "embedSiteName" TEXT DEFAULT E'{image.file} • {user.name}';
|
<filename>samples/databases/wide-world-importers/wwi-ssdt/wwi-ssdt/WebApi/Stored Procedures/SearchForStockItems.sql<gh_stars>1000+
CREATE PROCEDURE [WebApi].[SearchForStockItems]
@Name nvarchar(100),
@Tag nvarchar(100),
@MinPrice decimal(18,2),
@MaxPrice decimal(18,2),
@StockGroupID int,
@MaximumRowsToReturn int
WITH ... |
<reponame>iuri/tutortronics
-- upgrade-5.0.1.0.1-5.0.1.0.2.sql
SELECT acs_log__debug('/packages/intranet-timesheet2-tasks/sql/postgresql/upgrade/upgrade-5.0.1.0.1-5.0.1.0.2.sql','');
-- -------------------------------------------------------------------
-- Gantt TaskList
-- -----------------------------------------... |
-- :disable-transaction
CREATE TABLE IF NOT EXISTS foo(id bigint);
|
<filename>cellar-storage/src/main/resources/db/changelog/sql/insert_shelfs.sql
insert into shelfs (name, description, rack_id) values ('Wines', 'Shelf for wines', (select id from racks where name = 'Tinctures'));
insert into shelfs (name, description, rack_id) values ('Tinctures 1', 'Last year tinctures', (select id fr... |
# --- !Ups
create table "users" ("user_name" VARCHAR(20) NOT NULL,"user_email" VARCHAR(30) NOT NULL,"user_password" VARCHAR(20) NOT NULL,"user_mobile" VARCHAR(10) NOT NULL,"user_isadmin" BOOLEAN NOT NULL,"user_id" SERIAL PRIMARY KEY);
INSERT INTO "users" values ('<NAME>','<EMAIL>','<PASSWORD>','8826518608',true,1);
cr... |
<filename>EmployeeSQL/queries.sql<gh_stars>0
-- Select the employee number, last name, first name, sex, and salary of all employees, ordered by employee number
SELECT
e.emp_no AS "Employee Number",
e.last_name AS "<NAME>",
e.first_name AS "<NAME>",
e.sex As "Gender",
s.salary AS "Salary"
FROM employees e
INNER JO... |
alter table contributions
drop column images;
create table images
(
key text primary key,
contribution_id integer not null references contributions (id),
title text
); |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 27-03-2017 a las 14:50:36
-- Versión del servidor: 10.1.16-MariaDB
-- Versión de PHP: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... |
IF NOT EXISTS(SELECT * FROM sys.tables WHERE name = N'PatientPncExercises')
BEGIN
CREATE TABLE [dbo].[PatientPncExercises](
[Id] [int] IDENTITY(1,1) NOT NULL,
[PatientId] [int] NOT NULL,
[PatientMasterVisitId] [int] NOT NULL,
[PncExercisesDone] [int] NOT NULL,
[CreatedBy] [int] NOT NULL,
[CreateDate] [date... |
-- labels
DELETE FROM `labels` WHERE `id` = '11fd443d-f298-11e6-aa46-525400b263eb';
-- security_functions
DELETE FROM `security_functions` WHERE `id` IN (1054);
SET @order := 0;
SELECT `order` INTO @order FROM `security_functions` WHERE `id` = 1027;
UPDATE `security_functions` SET `order` = `order` - 1 WHERE `order` ... |
/************************
Standardized vocabulary
************************/
CREATE UNIQUE INDEX idx_concept_concept_id ON concept (concept_id ASC);
CREATE INDEX idx_concept_code ON concept (concept_code ASC);
CREATE INDEX idx_concept_vocabluary_id ON concept (vocabulary_id ASC);
CREATE INDEX idx_concept_domai... |
BEGIN;
drop index if exists sub_repo_permissions_repo_id_user_id_version_uindex;
drop index if exists sub_repo_perms_version;
create unique index sub_repo_permissions_repo_id_user_id_uindex
on sub_repo_permissions (repo_id, user_id);
COMMIT;
|
## (C) Copyright IBM Corporation 2015.
##
## 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 t... |
-- Revert phoebot:poi-extras from pg
BEGIN;
ALTER TABLE poi DROP COLUMN dimension;
COMMIT;
|
<reponame>apparentorder/r53db<filename>r53db--0.1.sql<gh_stars>10-100
CREATE FUNCTION r53db_fdw_handler()
RETURNS fdw_handler
LANGUAGE C
AS 'MODULE_PATHNAME', 'r53db_fdw_handler';
CREATE FOREIGN DATA WRAPPER r53db
HANDLER r53db_fdw_handler;
|
ALTER TABLE perf_appversions CHANGE COLUMN app app varchar(255);
|
-- --------------------------------------------------------
-- Host: ibex.localhost
-- Server version: 10.3.11-MariaDB - MariaDB Server
-- Server OS: Linux
-- HeidiSQL Version: 9.5.0.5196
-- --------------------------------------------------------
/*... |
-- MySQL dump 10.13 Distrib 8.0.19, for macos10.15 (x86_64)
--
-- Host: us-cdbr-east-06.cleardb.net Database: heroku_415dbacdf62d4a6
-- ------------------------------------------------------
-- Server version 5.5.62-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... |
INSERT INTO Authors VALUES
('<NAME>'),
('<NAME>');
INSERT INTO Books VALUES
(1, 'Alice in Wonderland', '<NAME>', 14, 3500),
(2, 'Pride and Prejudice', '<NAME>', 16, 3000),
(3, 'Sense and Sensibility', '<NAME>', 15, 10000); |
<gh_stars>0
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "mail" (
"id" TEXT NOT NULL,
"date" TEXT NOT NULL,
"source" TEXT NOT NULL DEFAULT "",
"receiver" TEXT NOT NULL DEFAULT "",
"subject" TEXT NOT NULL DEFAULT "",
"body" TEXT NOT NULL DEFAULT "",
"status" TEXT NOT NULL DEFAULT "",
"l... |
DROP TABLE IF EXISTS task_role_authorizations;
|
<filename>bd_prueba.sql
CREATE DATABASE [prueba]
ON
( NAME = prueba_data,
FILENAME = 'D:\BASES DE DATOS\prueba.mdf',
SIZE = 4,
MAXSIZE = 10,
FILEGROWTH = 1 )
GO
USE [prueba]
GO
/****** Object: Table [dbo].[prueba] Script Date: 06/15/2016 09:48:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIF... |
<reponame>robertjlooby/scotty-story-board<gh_stars>1-10
CREATE TABLE projects_users (
project_id SERIAL REFERENCES projects(id) ON DELETE CASCADE,
user_id SERIAL REFERENCES users(id) ON DELETE CASCADE
);
CREATE UNIQUE INDEX ON projects_users (project_id, user_id);
|
<gh_stars>1-10
--Insert command
INSERT INTO Blog.dbo.Posts (AuthorId, Title, Body, Date)
VALUES (2, 'Random Title', 'Random Content', CAST('2016-07-17T12:56:34' AS DateTime))
--Update command
UPDATE Blog.dbo.Posts SET Title = 'New Title' WHERE Id = 9
--Delete command
DELETE FROM Blog.dbo.Posts WHERE Id = 9
--Count... |
<reponame>oyedotunsodiq045/lagos-state-executive-council-members
DROP TABLE `executives`;
CREATE TABLE `executives` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`full_name` varchar(255) NOT NULL,
`portfolio` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`contact` varchar(2... |
SET NOCOUNT ON;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
DECLARE @secondsBetween tinyint = 5;
DECLARE @delayInterval char(8) = CONVERT(Char(8), DATEADD(SECOND, @secondsBetween, '00:00:00'), 108);
IF OBJECT_ID('tempdb..#baseline') IS NOT NULL
DROP TABLE #baseline;
IF OBJECT_ID('tempdb..#baselinewritten') IS NO... |
CREATE TABLE `user_payment_type` (
`id_user_payment_type` int(11) unsigned NOT NULL AUTO_INCREMENT,
`id_user` int(11) unsigned NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
`stripe_id` varchar(255) DEFAULT NULL,
`card` varchar(16) DEFAULT NULL,
`card_type` enum('visa','mastercard','amex','discover') DEFAU... |
<filename>server/src/test/diff/compiled/jinja_at_the_end.sql
select
field_1,
field_2,
field_3,
field_4,
field_5,
count(*)
from my_table
group by field_5
|
-- file:rangetypes.sql ln:87 expect:true
select numrange(1.0, 2.0) -|- numrange(2.0, 3.0,'[]')
|
<filename>src/test/resources/sql/insert/18b8d40c.sql
-- file:plpgsql.sql ln:598 expect:true
insert into HSlot (
slotname,
hubname,
slotno,
slotlink
) values (
new.slotname,
new.hubname,
new.slotno,
new.slotlink
)
|
<filename>sqllinuxbook/ch5/deletepeoplebeforeimport.sql
USE [WideWorldImporters]
GO
ALTER TABLE [Sales].[Customers] NOCHECK CONSTRAINT ALL
GO
ALTER TABLE [Application].[People] NOCHECK CONSTRAINT ALL
GO
DELETE FROM [Application].[People]
GO |
<reponame>dram/metasfresh
-- 2017-07-24T19:06:42.208
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsSelectionColumn='Y', IsUpdateable='N',Updated=TO_TIMESTAMP('2017-07-24 19:06:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=100
;
-- 2017-07-24T19:06:44.693
-- I ... |
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5464250_sys_gh1723-request-adjustments-webui.sql
-- 2017-06-04T12:49:25.555
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Se... |
<filename>backend/de.metas.dlm/base/src/main/sql/postgresql/ddl/public/views/DLM_Partition_Size_per_Table_V.sql
DROP VIEW IF EXISTS public.DLM_Partition_Size_per_Table_V;
CREATE VIEW public.DLM_Partition_Size_per_Table_V AS
SELECT
p.AD_Client_ID,
p.AD_Org_ID,
p.IsActive,
p.Created,
p.Createdby,
p.Updated,
p.U... |
<filename>packages/acs-kernel/sql/postgresql/acs-object-util.sql
-- moved from site-wide search to acs-kernel
-- added
select define_function_args('acs_object_util__object_type_exist_p','object_type');
--
-- procedure acs_object_util__object_type_exist_p/1
--
CREATE OR REPLACE FUNCTION acs_object_util__object_type_... |
USE SOCSeafood;
GO
INSERT INTO [dbo].[AspNetUsers]
([Id]
,[AccessFailedCount]
,[ConcurrencyStamp]
,[Email]
,[EmailConfirmed]
,[LockoutEnabled]
,[LockoutEnd]
,[NormalizedEmail]
,[NormalizedUserName]
,[PasswordHash]
,[PhoneNumber]
,[PhoneNumberConfirme... |
<filename>webapps/app-core/WEB-INF/db/50-gestion-actividades/update/hsql/16/160407-2-updateResponsable1.sql
create unique index IDX_GESTIONACTIVIDADES_RESPONSABLE_UNIQ_DOC_ID on GESTIONACTIVIDADES_RESPONSABLE (DOC_ID) ;
|
GRANT SELECT ON ALGORITHM_RULE_CODE TO GRAD_READONLY;
GRANT SELECT ON LETTER_GRADE TO GRAD_READONLY;
GRANT SELECT ON MESSAGE_TYPE_CODE TO GRAD_READONLY;
GRANT SELECT ON SPECIAL_CASE_CODE TO GRAD_READONLY;
GRANT SELECT ON UNGRAD_REASON_CODE TO GRAD_READONLY;
GRANT SELECT ON PROGRAM_ALGORITHM_RULE TO GRAD_READONLY;
GRANT... |
-- Make sure experimental immutable function with 2 arguments can be used in caggs.
-- Functions with 3 arguments and/or stable functions are currently not supported in caggs.
CREATE TABLE conditions(
day DATE NOT NULL,
city text NOT NULL,
temperature INT NOT NULL);
SELECT create_hypertable(
'conditions', 'da... |
<reponame>jnichols-pdx/raspberry-tracker
--Add tables to support storing sounds to be played when earning achievements.
--Increase DB version to 0.5
CREATE TABLE soundsets
(
id INTEGER NOT NULL,
name TEXT,
filename TEXT,
author TEXT,
description TEXT,
PRIMARY KEY (id)
);
CREATE TABLE sounds
(
parent_set... |
CREATE TABLE tbl_notification_preferences (
id INT AUTO_INCREMENT PRIMARY KEY,
user INT NOT NULL,
responses BOOL DEFAULT TRUE,
mentions BOOL DEFAULT TRUE,
digests BOOL DEFAULT TRUE,
FOREIGN KEY (user) REFERENCES tbl_users(id)
); |
<gh_stars>10-100
PRINT 'Update NotificationTemplates'
UPDATE dbo.[NotificationTemplates]
SET [Body] = REPLACE([Body], '<p>Dear @Model.Project.Manager,</p>', '<p>Dear @(Model.Project.Manager ?? "Property Manager"),</p>')
WHERE [Id] = 16
UPDATE dbo.[NotificationTemplates]
SET [Body] = REPLACE([Body], '<p>Good afternoo... |
<filename>TAO/Linux_new/etc/oracle/idb.sql
connect / as sysdba
set newpage 0
set pagesize 9999
set linesize 1000
set verify off
set trimspool on
set trimout on
set feedback 6
set recsep off
set maxdata 60000
set Numwidth 20
set longchunk 60000
set long 9999999
set termout off
set arraysize 3
set linesize 120
prompt ... |
<filename>openGaussBase/testcase/KEYWORDS/show/Opengauss_Function_Keyword_Show_Case0028.sql
-- @testpoint: opengauss关键字show(非保留),作为同义词对象名,部分测试点合理报错
--前置条件
drop table if exists explain_test;
create table explain_test(id int,name varchar(10));
--关键字不带引号-成功
drop synonym if exists show;
create synonym show for explain_t... |
-- Table: public."user"
-- DROP TABLE public."user";
CREATE TABLE public."user"
(
id uuid NOT NULL,
name character varying(10) COLLATE pg_catalog."default" NOT NULL,
email text COLLATE pg_catalog."default",
is_banned boolean,
password text COLLATE pg_catalog."default",
gender integer,
emai... |
<filename>GitC-master/29-07-19_02-08-19/Querys/Exemplo2.sql
select
a.Nome,
SUM(iif(n.Presenca=1,100,null)) / COUNT(n.Presenca) ,
SUM(n.Nota) / COUNT(n.Nota) as '´Média',
IIF((SUM(n.Nota) / COUNT(n.Nota) >= 7),'Aprovado','Reprovado') as 'Status Média',
IIF(SUM(iif(n.Presenca=1,100,null)) / COUNT(n... |
<reponame>foton/letoma
-- +micrate Up
CREATE TABLE games (
id INTEGER NOT NULL PRIMARY KEY,
stage_group_id BIGINT,
left_side_id BIGINT,
right_side_id BIGINT,
left_score INT,
right_score INT,
created_at TIMESTAMP,
updated_at TIMESTAMP
);
CREATE INDEX game_stage_group_id_idx ON games (stage_group_id);
CRE... |
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME>
-- Create date: 04/06/2020
-- Description: logically deletes a properties user relation
-- =============================================
CREATE or ALTER PROCEDURE dbo.SP_deletePropertiesUsers
-- Add the... |
CREATE DATABASE M_Peoples;
USE M_Peoples;
CREATE TABLE Funcionarios(
IdFuncionario INT PRIMARY KEY IDENTITY
,Nome VARCHAR(100) NOT NULL
,Sobrenome VARCHAR(255) NOT NULL
);
INSERT INTO Funcionarios (Nome,Sobrenome)
VALUES ('Catarina','Strada')
,('Tadeu','Vitelli');
SELECT * FROM Funcionarios ORDER BY IdFunc... |
# -------------------------------------------
DROP TRIGGER IF EXISTS update_tcbb_gn_by_mh;
delimiter $$
CREATE TRIGGER update_tcbb_gn_by_mh after update on monhoc for each row
begin
if old.SoTinChi <> new.SoTinChi then
update gomnhom gn
inner join (
select ctgn.ID_GomNhom, COALESCE(sum(mh.soTinChi),0) as TongTC... |
<gh_stars>0
INSERT INTO `recetas` (`id`, `nombre`,`nacionalidad`, `ingredientes`, `explicacion`, `tiempo`, `ruta`) VALUES
(1, 'Tortilla de patata', 'Española', '5 huevos, 500 g patatas, 1 cebolla, sal y aceite de oliva', 'Pelamos y lavamos las patatas, las cortamos en rodajas finas al igual que la cebolla. Ponemos amba... |
<filename>mysql/rebuild.sql
-- noinspection SqlNoDataSourceInspectionForFile
use `invoice_app`;
-- Build the tables
source /scripts/schema/status.sql
source /scripts/schema/customer.sql
source /scripts/schema/invoice.sql
source /scripts/schema/invoice_item.sql
-- Insert data
source /scripts/data/status.sql
|
drop table if exists staging.context;
CREATE TABLE staging.context (
release_group text,
title character varying,
headliner character varying,
headliner_id text,
artist character varying,
artist_id text,
instrument text,
begin_date date,
age int,
cover_url text,
fulltext tsve... |
<gh_stars>10-100
----------------- News on PostgreSQL 10 -----------------
pgbench=# select pg_current_logfile() ;
pg_current_logfile
------------------------
log/postgresql-Sun.log
(1 row)
|
if exists (select * from INFORMATION_SCHEMA.ROUTINES where ROUTINE_NAME = 'fnCamelCase' and ROUTINE_TYPE = 'FUNCTION')
Drop Function dbo.fnCamelCase;
GO
/**********************************************************************************************************************
* Copyright (C) 2005-2022 SplendidC... |
<gh_stars>10-100
-- file:rangefuncs.sql ln:500 expect:true
select array_to_set(array['one', 'two'])
|
-- file:numeric.sql ln:301 expect:true
INSERT INTO num_exp_sub VALUES (6,9,'25020705.622677680')
|
<reponame>svetasmirnova/mysqlcookbook
# exec_stmt.sql
# Given a statement as a string, prepares and executes it.
# The statement does not permit placeholders. It'd be possible
# to define exec_stmt{1,2,3,...} that permit 1,2,3,... data values.
# Uses a user-defined variable (@_stmt_str) because PREPARE cannot
# prepa... |
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 14, 2022 at 02:17 AM
-- Server version: 8.0.28-0ubuntu0.20.04.3
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
-- Code generated by build_sql.awk; DO NOT EDIT.
insert into users
(id, email, password_hash, created_at, updated_at)
values
(:id, :email, :password_hash, :created_at, :updated_at)
|
<filename>src/main/sql/dml-populate-user-auth-data.sql
use followapp;
/* Populate user_role Table */
INSERT INTO user_role(role)
VALUES ('USER');
INSERT INTO user_role(role)
VALUES ('ADMIN');
INSERT INTO user_role(role)
VALUES ('DBA');
/**
* clear text password is admin
*/
INSERT INTO user (username, password, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.