sql stringlengths 6 1.05M |
|---|
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--
-- RESYNC Heap Part Table 1
--
CREATE TABLE resync_heap_alter_part_drop_col1 (id int, name text,rank int, year date, gender char(1)) DISTRIBUTED BY (id, gender, year)
partition by list (gender)
subpartition by range (year)
subpartiti... |
/**
* A function to massively rename a column on a set of tables.
* This helps when the generation of a column has been done automatically but with the wrong name.
* The function performs a 'straight' rename, that is without any suffix or table related stuff.
*
* \param src_column the name of the column to be rena... |
-- @testpoint: 匿名块使用数字操作函数 round(x)
DROP TABLE IF EXISTS test_procedure_insert_122;
create table test_procedure_insert_122(id double precision,
name varchar2(20));
declare
sqlstr varchar(1024);
begin
sqlstr := 'insert into test_procedure_insert_122 (SELECT round(42.4),44)';
execute immediate sqlstr;
end;
/
select * ... |
CREATE TABLE `campaign_items` (
`gamespace_id` int(11) unsigned NOT NULL,
`campaign_id` int(11) unsigned NOT NULL,
`item_id` int(11) unsigned NOT NULL,
`campaign_item_private_data` json NOT NULL,
`campaign_item_public_data` json NOT NULL,
`campaign_item_tier` int(11) unsigned NOT NULL,
UNIQUE KEY `gamespa... |
<reponame>codigosanha/quicheladas<filename>BD/bd_quicheladas (5).sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 1172.16.58.3
-- Tiempo de generación: 11-05-2019 a las 21:41:27
-- Versión del servidor: 10.1.28-MariaDB
-- Versión de PHP: 7.0.25
SET SQL_MODE = "NO_AU... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 18, 2021 at 05:35 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<reponame>gemaantikahr/webmobile
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 21, 2019 at 05:02 PM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_z... |
SELECT DB_NAME(lsu.database_id) AS [Database Name]
, db.recovery_model_desc AS [Recovery Model]
, CAST(lsu.total_log_size_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Total Log Space (MB)]
, CAST(lsu.used_log_space_in_bytes/1048576.0 AS DECIMAL(10, 2)) AS [Used Log Space (MB)]
, CAST(lsu.used_log_space... |
<gh_stars>1-10
-- Write a query that prints a list of employee names (i.e.: the name attribute) for employees in Employee having a salary greater than $2000 per month who have been employees for less than 10 months. Sort your result by ascending employee_id.
-- Input Format
-- The Employee table containing employee d... |
ALTER TABLE assets ADD classified_at TIMESTAMP WITH TIME ZONE;
/*
Get asset_id and datetime for the assets which rolfp value
has been modified at a different time than the update performed
by migration V1.39.
For each one, update assets table's classified_at field.
*/
WITH last_classifieds AS (
SELECT (old_val ... |
alter table "public"."artworks" drop constraint "artworks_slug_key";
|
CREATE OR REPLACE VIEW "public"."collectors" AS
SELECT u.id,
u.created_at,
u.updated_at,
u.username,
u.avatar_url,
u.display_name,
u.location,
u.bio,
u.website,
u.email,
u.full_name,
( SELECT count(*) AS count
FROM artworks a
WHERE (u.id = a.owner_id)) ... |
-- 1. List the following details of each employee: employee number, last name, first name, gender, and salary.
SELECT e.emp_no, e.last_name, e.first_name, e.gender, s.salary
FROM "Employees" as e
JOIN "Salaries" as s
ON e.emp_no = s.emp_no;
-- 2. List employees who were hired in 1986.
SELECT e.emp_no, ... |
<reponame>afermon/TuBus
CREATE PROCEDURE [dbo].[RET_EMPRESA_BY_ID]
@P_CEDULA_JURIDICA int
AS
SELECT * from TBL_EMPRESA
where CEDULA_JURIDICA = @P_CEDULA_JURIDICA
RETURN 0
|
<filename>src/main/java/zsql/data/Petting - order_data.sql
/*
-- Query: SELECT * FROM pet_g3db_tfa105.ORDER
LIMIT 0, 1000
-- Date: 2022-02-23 20:55
*/
INSERT INTO `` (`ORDER_ID`,`MEMBER_ID`,`BUS_ID`,`ORDER_TIME`,`ORDER_SUM`,`PAYMENT_ID`,`SHIPPING_ID`,`TRACKING`,`ORDER_STATUS`,`INVOICE_ID`,`RECEIVER`,`RECEIVER_ADDR`,`R... |
-- MySQL dump 10.11
--
-- Host: localhost Database: dhome
-- ------------------------------------------------------
-- Server version 5.0.95
LOCK TABLES `theme` WRITE;
/*!40000 ALTER TABLE `theme` DISABLE KEYS */;
INSERT INTO `theme` VALUES (1,'简洁主题','单页简历式的主题,一目了然。'),(2,'传统菜单式主题','传统菜单式的主题,层次分明。'),(3,'名片主题','名片式首... |
<filename>migrations/app/0_20210804152140_init.sql
-- upgrade --
CREATE TABLE IF NOT EXISTS "usermodel" (
"id" UUID NOT NULL PRIMARY KEY,
"email" VARCHAR(255) NOT NULL UNIQUE,
"hashed_password" VARCHAR(255) NOT NULL,
"is_active" BOOL NOT NULL DEFAULT True,
"is_superuser" BOOL NOT NULL DEFAULT Fal... |
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
IF EXISTS (SELECT TOP 1 1 FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].spEIDSSUpdate_GetCurrentLanguage')) DROP PROCEDURE [dbo].spEIDSSUpdate_GetCurrentLanguage
GO
-- =============================================
-- Author: <NAME>.
-- Create date:
-- ... |
insert into task (name, dueDate, completed) values ("dishes", "Tomorrow", false );
insert into task (name, dueDate, completed) values ("hoover", "Today", false );
insert into task (name, dueDate, completed) values ("laundry", "Friday", false );
insert into task (name, dueDate, completed) values ("sweep", "monday", fals... |
<filename>schema.sql
CREATE DATABASE employees_db;
USE employees_db;
CREATE TABLE department (
id INTEGER AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE role (
id INTEGER AUTO_INCREMENT,
title VARCHAR (30) NOT NULL,
salary DECIMAL (8, 2) NOT NULL,
department_id INTEGER,
PRIMARY KEY (id),... |
SELECT
*
FROM
(
SELECT
ROW_NUMBER() OVER(PARTITION BY BCFech
ORDER BY
BCFech DESC) AS r
, BCFech AS BCFecha
, BCTasa AS BCTASA
FROM BANTOTAL..FSH012
WHERE BCEmp = 1
AND BCTOp = 3
AND BCMod = 21
... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.17.32
-- Generation Time: Nov 07, 2020 at 04:17 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... |
<filename>database_backup/workflow.sql<gh_stars>0
-- MySQL dump 10.16 Distrib 10.1.21-MariaDB, for Win32 (AMD64)
--
-- Host: localhost Database: localhost
-- ------------------------------------------------------
-- Server version 10.1.21-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... |
<filename>BootCamp Engenheiro de Dados/Modulo 1 - Materiais/MaterialComplementarVideoaulas_MOD1_EDD/ArquivosPraticasCapitulos_2a4/Script_carga_genero.sql
/*
Script prática linguagem DML
Curso bootcamp de Engenheiro de Dados IGTI
Professora: <NAME>
Carga na tabela genero.
Deve ser executado somente ANTES da carga na t... |
CREATE TABLE Manufacturers
(
ManufacturerID INT NOT NULL PRIMARY KEY IDENTITY,
[Name] NVARCHAR(20) NOT NULL,
EstablishedOn DATE NOT NULL,
)
CREATE TABLE Models
(
ModelID INT NOT NULL PRIMARY KEY,
[Name] NVARCHAR(20) NOT NULL,
ManufacturerID INT NOT NULL FOREIGN KEY REFERENCES Manufacturers(ManufacturerID)
)
INSERT INTO... |
<reponame>sebastienrichoz/sportbuddy
# --- !Ups
CREATE TABLE person (
id INT PRIMARY KEY AUTO_INCREMENT,
firstname VARCHAR(64) NOT NULL,
lastname VARCHAR(64) NOT NULL,
description TEXT,
email VARCHAR(128) NOT NULL,
birthdate DATE NOT NULL
);
CREATE TABLE activity (
id INT PRIMARY KEY AUTO_INCREMENT,
n... |
<filename>scripts/postgres/content/rule.sql
select regexp_replace(pg_get_ruledef($rule.id$, true), '(\s+)(on|where|do)\s+', E'\n\t\\2 ', 'ig') as script;
|
<filename>Assessment/Scripts/Netezza/_v_index_V1.sql
select * from admin._v_index;
|
-- file:alter_table.sql ln:697 expect:true
alter table atacc1 add column test2 int primary key
|
<reponame>smith750/kc<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/current_mysql/5.0.1/sequences/KC_SEQ_BUD_FRMLTD_COST_DETAIL_ID.sql<gh_stars>0
DELIMITER /
CREATE TABLE SEQ_BUD_FRMLTD_COST_DETAIL_ID (
id bigint(19) not null auto_increment, primary key (id)
) ENGINE MyISAM
/
ALTER TABLE... |
<gh_stars>0
-- This file and its contents are licensed under the Apache License 2.0.
-- Please see the included NOTICE for copyright information and
-- LICENSE-APACHE for a copy of the license.
-- create a now() function for repeatable testing that always returns
-- the same timestamp. It needs to be marked STABLE
CRE... |
<gh_stars>0
DROP VIEW roads_view;
ALTER TABLE roads_base alter major type varchar(32);
|
<reponame>dailos/heimdal
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
DROP SCHEMA IF EXISTS `heimdal` ;
CREATE SCHEMA IF NOT EXISTS `heimdal` DEFAULT CHARACTER SET utf8 ;
USE `heimd... |
INSERT IGNORE INTO pokemon (id, name) VALUES (001, "Bulbasaur");
INSERT IGNORE INTO pokemon (id, name) VALUES (002, "Ivysaur");
INSERT IGNORE INTO pokemon (id, name) VALUES (003, "Venusaur");
INSERT IGNORE INTO pokemon (id, name) VALUES (004, "Charmander");
INSERT IGNORE INTO pokemon (id, name) VALUES (005, "Charmeleon... |
delete from job;
delete from task;
INSERT INTO job
(id, uuid, created, input, output, finished, priority)
VALUES
(1, 'a', now() - INTERVAL '3 day', 'file://in', 'file://out', NULL, 0),
(2, 'b', now() - INTERVAL '2 day', 'file://in', 'file://out', NULL, 0),
(3, 'c', now() - INTERVAL '1 day', 'file://in', 'file://... |
insert into myreallylongtablename( a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p )
values ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'o', 'p'); |
<filename>examples/db.data/V002__create_users.sql<gh_stars>10-100
INSERT INTO users (id,business_id,username,subscription_type,last_login_at,created_at,modified_at,deleted_at) VALUES (1,202,'<NAME> iv','free','2020-04-07 22:23:53','2019-10-21 09:00:12','2019-10-19 05:51:37',null);
INSERT INTO users (id,business_id,user... |
SELECT * FROM STOCKS
WHERE DELETE_FLAG = 0
ORDER BY INSERT_DATETIME %s
LIMIT ? OFFSET ?;
|
-- 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.
host " doskey /history /exename=sqlplus.exe | grep -ni &1 | grep -iv ]@h "
|
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 17, 2018 at 07:11 PM
-- 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>lukasmartinelli/wwftiles
CREATE OR REPLACE VIEW place_label_z3 AS (
SELECT * FROM ne_10m_populated_places
WHERE scalerank = 0
);
CREATE OR REPLACE VIEW place_label_z4 AS (
SELECT * FROM ne_10m_populated_places
WHERE scalerank <= 2
);
CREATE OR REPLACE VIEW place_label_z5 AS (
SELECT * FR... |
<gh_stars>0
ALTER TABLE `tbl_banner`
ADD COLUMN `description` varchar(255) NULL AFTER `title`;
|
<gh_stars>0
/*
Notes:
1) First 2 attributes are included so lineage tracing and source primary key
identification is clearly contained in the prospective extract file.
2) The output IDENTITY_CONTEXT clearly indicates the primary source of the
extract file.
3) The output SOURCE_PK will always contain the... |
CREATE TABLE People
(
Id int NOT NULL PRIMARY KEY IDENTITY,
Name nvarchar(200) NOT NULL,
Picture image,
Height numeric(18, 2),
Weight numeric(18, 2),
Gender char(1) NOT NULL CHECK (Gender IN ('m', 'f')),
Birthday date NOT NULL,
Biography nvarchar(max)
)
INSERT INTO People (Name, Height, Weight, Gender, Bi... |
<filename>sql/libcachepin_waits.sql
-- libcachepin_waits.sql
-- <NAME> - <EMAIL>
-- if there are waits on Library Cache Pin in v$session_wait
-- this script will show what the waits are for, and which
-- session is causing them
-- keywords: v$session library cache pin x$kglob x$kglpn
-- inspired by info from OraFaq.... |
SET search_path TO fbkt_core_db, public;
--||--
DROP VIEW IF EXISTS log_entry_view CASCADE;
--||--
CREATE VIEW log_entry_view AS
SELECT
le.id
,le.message
,le.source
,lc.name as log_category
,ll.name as log_level
,le.log_timestamp
,le.attributes_json
,lc.id as log_category_id
,ll.id as log_level_id
FROM
log_e... |
<reponame>Khaloudinho/python-lesson-distributed-apps
INSERT INTO marks_system_examination (name, date) VALUES ('MathsExam', '2018-01-26 22:28:15');
INSERT INTO marks_system_examination (name, date) VALUES ('EnglishExam', '2018-01-27 22:30:37');
INSERT INTO marks_system_student (last_name, first_name, birth_date) VALUE... |
Create table If Not Exists request_accepted ( requester_id INT NOT NULL, accepter_id INT NULL, accept_date DATE NULL);
Truncate table request_accepted;
insert into request_accepted (requester_id, accepter_id, accept_date) values ('1', '2', '2016/06/03');
insert into request_accepted (requester_id, ... |
<filename>Aggregation/Japan Population.sql
# Author: <NAME>
SELECT SUM(POPULATION)
FROM CITY
WHERE COUNTRYCODE ='JPN' |
<reponame>jdkoren/sqlite-parser
-- minmax2.test
--
-- execsql {
-- SELECT min(x) FROM t1;
-- }
SELECT min(x) FROM t1; |
<filename>src/test/resources/sql/alter_aggregate/e70ec7f3.sql<gh_stars>10-100
-- file:alter_generic.sql ln:75 expect:true
ALTER AGGREGATE alt_agg3(int) RENAME TO alt_agg4
|
<filename>fixtures/ethblocks_mysql_truncate.sql<gh_stars>1-10
TRUNCATE block_uncles;
TRUNCATE blocks;
TRUNCATE transaction_log_topics;
TRUNCATE transaction_logs;
TRUNCATE transaction_receipts;
TRUNCATE transactions;
|
/* Schema for SQL database/table. */
DROP DATABASE IF EXISTS employee_trackerDB;
/* Create database */
CREATE DATABASE employee_trackerDB;
USE employee_trackerDB;
/* Create department, role and employee tables*/
CREATE TABLE department (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(30)
);
CREATE TABLE role (
id I... |
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/current/4.0/dml/KC_DML_31003_COMM_RESEARCH_AREAS_0TSD.sql<gh_stars>0
INSERT INTO COMM_RESEARCH_AREAS (ID,COMMITTEE_ID_FK,RESEARCH_AREA_CODE,UPDATE_USER,UPDATE_TIMESTAMP,OBJ_ID,VER_NBR)
VALUES (SEQ_COMMITTEE_ID.NEXTVAL,(SELECT ID FROM COMM... |
-- Solution to [Top Earners](https://www.hackerrank.com/challenges/earnings-of-employees/problem)
SELECT
salary * months AS total_earnings,
COUNT(*) as num_employees
FROM
Employee
GROUP BY
total_earnings
HAVING
total_earnings = MAX(total_earnings)
ORDER BY
total_earnings DESC
LIMIT 1
;
|
<gh_stars>1-10
update vm_static set numatune_mode ='preferred';
|
<gh_stars>1-10
UPDATE security_functions SET _execute = '' WHERE id = 1027;
DELETE FROM `db_patches` WHERE `issue` = 'POCOR-2465'; |
-- ----------------------------
-- Table structure for demo_excel
-- ----------------------------
DROP TABLE IF EXISTS `demo_excel`;
CREATE TABLE `demo_excel` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`username` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`birthday` datetime... |
-- *** BinaryObject (BLOBs) ***
CREATE TABLE BINARYOBJECT (
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
modificationCounter INT NOT NULL,
content LONGBLOB,
filesize BIGINT NOT NULL,
mimeType VARCHAR(255)
);
|
<reponame>ctdk/goiardi-schema
-- Revert role_insert_update
BEGIN;
DROP FUNCTION goiardi.merge_roles(m_name text, m_description text, m_run_list bytea, m_env_run_lists bytea, m_default_attr bytea, m_override_attr bytea);
COMMIT;
|
create table if not exists public.questions (
id uuid not null primary key DEFAULT uuid_generate_v4(),
question_text text not null,
challenge_pool uuid references public.challenge_pools on delete cascade not null,
owner uuid references auth.users on delete cascade not null,
created_at timestamp with... |
<reponame>florianoverkamp/safe<filename>sql/data.sql
-- phpMyAdmin SQL Dump
-- version 2.9.1.1-Debian-9
-- http://www.phpmyadmin.net
--
-- Host: toledo.simsplace.com
-- Generation Time: Jan 25, 2009 at 06:00 PM
-- Server version: 5.0.51
-- PHP Version: 5.2.0-8+etch13
--
-- Database: `safe-demo`
--
--
-- Dumping da... |
SELECT b.bouquetid,bouquetname,
NVL(TO_CHAR(amount),'No Order Placed')"amount"
FROM bouquet b LEFT OUTER JOIN bouquetorder bo
ON b.bouquetid=bo.bouquetid
GROUP BY b.bouquetid,bouquetname,
NVL(TO_CHAR(amount),'No Order Placed') |
-- upgrade --
CREATE TABLE IF NOT EXISTS "examples" (
"id" UUID NOT NULL PRIMARY KEY,
"created_at" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
"deleted_at" TIMESTAMPTZ,
"name" VARCHAR(40) NOT NULL
);
CREATE TABLE IF NOT EXISTS "aeri... |
CREATE TABLE link (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
source_id INT UNSIGNED NOT NULL,
target_id INT UNSIGNED NOT NULL,
PRIMARY KEY (id),
CONSTRAINT `fk_link_note_source`
FOREIGN KEY (source_id) REFERENCES note (id)
ON DELETE CASCADE,
CONSTRAINT `fk_link_note_target`
... |
<filename>bgg.sql
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 24, 2016 at 02:59 AM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_... |
COPY campaign (id, name, wiki, form, view, info_url, labels_per_task, tasks_per_assignment, active) FROM stdin;
1 Edit Quality -- 2014 10k sample enwiki damaging_and_goodfaith DiffToPrevious 1 10 t
2 Edit Type -- 2015 january sample enwiki edit_type DiffToPrevious 1 10 t
3 Qualidade das edições -- Amostra de 10k revi... |
CREATE TABLE shop.user
(
user_id INT PRIMARY KEY AUTO_INCREMENT,
user_name VARCHAR(255),
user_pass VARCHAR(255),
user_type INT
);
CREATE TABLE shop.good
(
good_id INT PRIMARY KEY AUTO_INCREMENT,
good_name VARCHAR(255),
good_price VARCHAR(255),
good_category INT
);
CREATE TABLE shop.cat... |
<gh_stars>10-100
create or replace
function update_contract_migrations_count_on_new () returns trigger as
$$
begin
if exists (select id from contracts c2 where address = new.address and network = new.network) THEN
update contracts set migrations_count = migrations_count + 1
where address = new.address and ne... |
<reponame>Shuttl-Tech/antlr_psql
-- file:numeric_big.sql ln:220 expect:true
INSERT INTO num_exp_add VALUES (4,6,'5329378275943663322215245.2962547320713754471928444611551997039471994633514577749257474599298697107573357032467906500980328140458161559772079838501594238976569276973998305444250354721156029724968628966579207... |
<gh_stars>10-100
-- file:rolenames.sql ln:140 expect:true
ALTER ROLE regress_testrol1 SET application_name to 'SLAM'
|
<filename>modoboa_installer/scripts/files/dovecot/install_modoboa_postgres_trigger.sql
CREATE OR REPLACE FUNCTION merge_quota() RETURNS TRIGGER AS $$
BEGIN
IF NEW.messages < 0 OR NEW.messages IS NULL THEN
-- ugly kludge: we came here from this function, really do try to insert
IF NEW.messages IS NULL THEN
... |
<reponame>Ambal/mangos
DELETE FROM `spell_affect` WHERE `entry` IN (34453,34454);
INSERT INTO `spell_affect` VALUES
(34453,1,0,0,0,0,0,0x0000000400000000,0),
(34454,1,0,0,0,0,0,0x0000000400000000,0);
DELETE FROM `spell_affect` WHERE `entry` IN (24348);
INSERT INTO `spell_affect` VALUES
(24348,0,0,0,0,0,0,0x00000000002... |
<reponame>asen477/trunksit.com
-- TableName pw_user_ban 用户禁止表
-- Fields id 禁止ID
-- Fields uid 用户ID
-- Fields typeid 禁言类型 禁言类型用按位与
-- Fields fid 禁言的类型ID 如 fid 版块ID
-- Fields ban_day 禁止天数
-- Fields created_userid 创建人
-- Fields created_time 状态创建时间
-- Fields reason 原因
-- Unique Key idx_uid_fid 由用户ID,禁止子类型ID号
-- Index idx... |
<gh_stars>0
/* Q15. Trusted connection paths through forums created in a given timeframe
\set person1Id 21990232564808
\set person2Id 26388279076936
\set startDate '\'2010-11-01\''::timestamp
\set endDate '\'2010-12-01\''::timestamp
*/
with recursive
qs(f, t) as (
select :person1Id, :person2Id
),
myForums(id) as (... |
CREATE TABLE IF NOT EXISTS pengerjaan (
id INT AUTO_INCREMENT PRIMARY KEY,
status VARCHAR(255) NOT NULL,
tanggal TIMESTAMP,
nama_spk VARCHAR(255) NOT NULL,
pengaduan VARCHAR(255) NOT NULL,
lokasi VARCHAR(255) NOT NULL,
detail VARCHAR(255) NOT NULL,
penanggung_jawab VARCHAR(255) NOT NULL,... |
<filename>database/migrations/mysql/1542107707_add_preembtible_column_to_google_gke_node_pools.up.sql
ALTER TABLE google_gke_node_pools ADD COLUMN `preemptible` tinyint(1) DEFAULT '0';
ALTER TABLE google_gke_profile_node_pools ADD COLUMN `preemptible` tinyint(1) DEFAULT '0';
|
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... |
ALTER TYPE user_tag_type ADD VALUE 'HasSuperHotAccess';
|
--
-- Base de datos: `db_general`
--
USE `db_general`;
-- --------------------------------------------------------
--
-- Volcado de datos para la tabla `persona_correo_institucional`
-- --------------------------------------------------------
INSERT INTO `persona_correo_institucional` (`pcin_id`, `per_id`, `pcin_corre... |
<gh_stars>10-100
-- PageTreeNode: parse a page tree node. Ensures that the page tree
-- actually forms a tree.
import Stdlib
import Pair
import Array
import Map
import Maybe
import GenPdfValue
import PdfDecl
import PdfValue
import ResourceDict
import Page
-- TODO: indirect deps
import FontDict
import Type1Font
import... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 11-Mar-2021 às 20:32
-- Versão do servidor: 10.4.13-MariaDB
-- versão do PHP: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
--Drop table dbo.AdobeSign_Direct_Deposit
CREATE TABLE dbo.AdobeSign_Direct_Deposit(
completed NVARCHAR(100),
email NVARCHAR(1000),
role NVARCHAR(100),
first NVARCHAR(100),
last NVARCHAR(100),
title NVARCHAR(100),
company NVARCHAR(100),
[% of Net Pay $ Amount 1] NVARCHAR(100),
[% of Net Pay $ Amount 2] NVARCH... |
<filename>scripts/help/createDbscript.sql<gh_stars>0
create tablespace MYSQL_DATA
datafile 'mysql_02.dbf' size 150M
extent management local autoallocate segment space management auto;
create user mysql identified by "mysql" default tablespace MYSQL_DATA;
GRANT CONNECT, RESOURCE, CREATE VIEW, CREATE PUBLIC... |
DROP TABLE IF EXISTS ALBUM;
CREATE TABLE IF NOT EXISTS ALBUM (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
nom VARCHAR2(100),
artiste VARCHAR2(100),
genre VARCHAR2(100),
description VARCHAR2(500),
url_Image VARCHAR2(1000)
); |
####################################################################################
#
#
# !WARNING! !WARNING! !WARNING! !WARNING! !WARNING! !WARNING! !WARNING! !WARNING!
#
#
# Those commands delete every entry of all participants of the first study.
# Make sure you have a backup
#
############################... |
INSERT INTO DIR_BATCH_REPORT(
NAME, STARTED, ENDED
)
VALUES(
?, NOW(), FROM_UNIXTIME(0)
);
|
CREATE MATERIALIZED VIEW mv_pool_profit_balances AS (
WITH
t_all AS (
SELECT
f_date,
SUM(f_balance_profit) AS f_balance_profit_all
FROM
mv_profit_balances_by_month
GROUP BY
f_date
),
bots AS (
SELECT
f_date,
SU... |
CREATE TABLE IF NOT EXISTS rel_entity_fileresources (
entity_uuid UUID NOT NULL,
fileresource_uuid UUID NOT NULL,
sortIndex SMALLINT,
PRIMARY KEY (entity_uuid, fileresource_uuid),
-- FOREIGN KEY (entity_uuid) REFERENCES entities(uuid),
FOREIGN KEY (fileresource_uuid) REFERENCES fileresources(uuid)
);
|
<reponame>ablack3/APCDtoOMOP
/***********************
params: database
***********************/
--Select database
USE @database@;
GO
--Drop raw.hgdx table
IF(OBJECT_ID('raw.hgdx') IS NOT NULL)
BEGIN
DROP TABLE raw.hgdx;
END
;
GO
--Create raw.hgdx table
IF(OBJECT_ID('raw.hgdx') IS NULL)
BEGIN
CREATE TA... |
ALTER TABLE `restaurant` ADD `fee_on_subtotal` TINYINT( 1 ) NOT NULL DEFAULT '0'; |
CREATE DATABASE /*!32312 IF NOT EXISTS*/`bk_house` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `bk_house`;
DROP TABLE IF EXISTS `house_info`;
CREATE TABLE `house_info` (
`maidian` varchar(32) NOT NULL COMMENT '卖点值(默认按该值降序)',
`title` varchar(256) DEFAULT NULL COMMENT '标题',
`href` varchar(256) DEFAULT NULL CO... |
<filename>jpa/stream/src/test/resources/META-INF/sql/insert.sql
INSERT INTO person (id, name, address) VALUES (1002, 'Arjan', 'abc')
INSERT INTO person (id, name, address) VALUES (1001, 'Gaurav', 'xyz')
|
/* 05. Намерете пълното име на всеки служител */
use soft_uni;
select first_name, middle_name, last_name from employees; |
<gh_stars>0
-- ========================================================================
-- Copyright (C) 2016 <NAME> <<EMAIL>>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either versi... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table diretor (
id bigint not null,
nome varchar(255),
constraint pk_diretor primary key (id))
;
create sequence diretor_seq;
# --- !... |
<reponame>kukimik/utPLSQL
create or replace package body ut_suite_cache_manager is
/*
utPLSQL - Version 3
Copyright 2016 - 2021 utPLSQL Project
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 Licen... |
--names of all persons that are NOT in the company with id = 5
SELECT name FROM person
WHERE company_id <> 5;
--company name for each person
SELECT company.name as company, person.name as name
FROM person LEFT JOIN company ON person.company_id = company.id
-- Retrieve in a single query:
-- names of all persons that a... |
SELECT n.nspname as "Schema",
p.proname as "Name",
pg_catalog.pg_get_function_result(p.oid) as "Result data type",
pg_catalog.pg_get_function_arguments(p.oid) as "Argument data types",
CASE
WHEN p.proisagg THEN 'agg'
WHEN p.proiswindow THEN 'window'
WHEN p.prorettype = 'pg_catalog.trigger'::pg_catalog.regt... |
<reponame>ZUCCzwp/chucai
-- phpMyAdmin SQL Dump
-- version 4.0.10.20
-- https://www.phpmyadmin.net
--
-- 主机:
-- 生成日期: 2018-03-08 14:51:09
-- 服务器版本: 5.7.12-log
-- PHP 版本: 5.3.29p1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.