sql stringlengths 6 1.05M |
|---|
<filename>src/olympia/migrations/1127-add-obsolete-guids-to-denied-guid.sql
INSERT INTO `denied_guids`
(guid, created, modified, comments)
SELECT `guid`, NOW(), NOW(), 'Hard-deleted xul-theme/addon-lang-pack. See #12212' from `addons` WHERE addontype_id in (2, 6) AND `guid` IS NOT NULL
ON DUPLICATE KEY UP... |
<reponame>agir2000/Cotonti<gh_stars>10-100
/* 0.9.13-01 remove the obsolete version/revision config */
DELETE FROM `cot_config` WHERE config_owner = 'core' AND `config_cat` = 'version'; |
--TEST: test with tables with triggers
--+ holdcas on;
set system parameters 'dont_reuse_heap_file=yes';
create table rank_trigger(
col1 bit(20),
col2 bit varying,
col3 blob,
col4 clob
);
create table rank_action(
id int auto_increment,
str varchar
);
--create trigger
create trigger bef_ins before insert o... |
SELECT department,first_name ,salary,
AVG(salary) OVER(PARTITION BY department) AS avg
FROM employee;
|
Insert INTO word_data (word_id, word_surah, word_ayah, word_page, word_number_in_quran, word_number_in_surah, word_number_in_ayah, word_type, word_arabic, word_transliteration, word_translation) VALUES
(3282, 2, 172, 26, 3088, 3059, 7, 'word', 'ู
ูุง', 'ma', 'what'),
(3283, 2, 172, 26, 3089, 3060, 8, 'word', 'ุฑูุฒูููููุงูู... |
<gh_stars>0
-- ----------------------------
-- Table structure for bc_user
-- ----------------------------
CREATE TABLE bc_user (
`id` VARCHAR (32) NOT NULL COMMENT 'ไธป้ฎid',
`username` VARCHAR (64) NOT NULL COMMENT '็จๆทๅ',
`password` VARCHAR (64) NOT NULL COMMENT 'ๅฏ็ MD5(MD5(passๆๆ+ๅบๅฎsalt) + salt)',
`salt` VARCHAR (1... |
<filename>sql/ddl/questions_sqlite.sql
--
-- Table Questions
--
DROP TABLE IF EXISTS Questions;
CREATE TABLE Questions (
"id" INTEGER PRIMARY KEY NOT NULL,
"userId" INTEGER NOT NULL,
"title" TEXT NOT NULL,
"text" TEXT NOT NULL,
"created" DATETIME,
"updated" DATETIME,
"deleted" DATETIME,
... |
<filename>cadastro-participante-previdencia/src/main/resources/db/migration/V1.00__InicializaBanco.sql
create table participante(
cpf varchar(11) not null,
data_nascimento date,
email varchar(255) not null,
... |
<gh_stars>0
DO
$$
BEGIN
IF NOT EXISTS (SELECT 1 FROM photo.gain_control) THEN
INSERT INTO photo.gain_control (id, name) VALUES (0, 'None');
INSERT INTO photo.gain_control (id, name) VALUES (1, 'Low gain up');
INSERT INTO photo.gain_control (id, name) VALUES (2, 'High gain up');
... |
DECLARE
employees_cursor SYS_REFCURSOR;
l_token apex_jwt.t_token;
V_IS_USER_EXIST NUMBER;
V_ID NUMBER;
USER_OBJECT apex_json.t_values;
BEGIN
IF :Authorization IS NULL
THEN
APEX_JSON.open_object;
APEX_JSON.write ('message', 'Error');
... |
<filename>datos.sql
INSERT INTO tasks(name,description,completed) VALUES ('Tarea 1','1',false);
INSERT INTO tasks(name,description,completed) VALUES ('Tarea 2','2',false);
INSERT INTO tasks(name,description,completed) VALUES ('Tarea 3','3',false);
INSERT INTO tasks(name,description,completed) VALUES ('Tarea 4','4',fals... |
-- Generated by Oracle SQL Developer Data Modeler 18.1.0.082.1035
-- at: 2018-05-06 23:17:33 CDT
-- site: Oracle Database 11g
-- type: Oracle Database 11g
CREATE TABLE facility (
facility_id NUMBER(10) NOT NULL,
facility_name VARCHAR2(255) NOT NULL,
address_1 VARCHAR2(6... |
create or replace function notification.test_find_user_by_telegram_username() returns void as $$
declare
_user_id int;
begin
_user_id = users.add('login', 'password', '<PASSWORD>', '<EMAIL>', true);
IF assert.true(EXISTS(SELECT null FROM postgres_ci.user_notification_method WHERE use... |
<reponame>BugsUK/FindApprenticeship<filename>src/SFA.Apprenticeships.Data.AvmsPlus/dbo/Stored Procedures/uspApplicationSelectByStatusandVacIdCount.sql
๏ปฟCREATE PROCEDURE [dbo].[uspApplicationSelectByStatusandVacIdCount]
@vacancyId INT,
@status INT,
@firstName VARCHAR (70)=NULL,
@surname VARCHAR (70)=NULL,
@candidate... |
<reponame>gparent/localthreat<filename>api/schema.sql
CREATE TABLE IF NOT EXISTS reports (
id text NOT NULL PRIMARY KEY,
data text[]
);
ALTER TABLE reports ADD IF NOT EXISTS time timestamptz NOT NULL DEFAULT now();
|
<filename>01-initial/src/main/postgres/reset.sql
DELETE TABLE item;
DELETE SEQUENCE item_id_seq;
|
<gh_stars>1-10
WITH RECURSIVE c0(src, trg) AS ((SELECT edge.src, edge.src FROM edge UNION SELECT edge.trg, edge.trg FROM edge UNION SELECT s0.src, s2.trg FROM edge s0, (SELECT trg as src, src as trg, label FROM edge) as s1, (SELECT trg as src, src as trg, label FROM edge) as s2 WHERE s0.trg = s1.src AND s1.trg = s2.src... |
-- 2018-01-23T17:19:37.370
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543782,0,'C_ReferenceNo_Type_Table_ID',TO_TIMESTAMP('2018-01-23 17:19:37'... |
CREATE TABLE `Address` (
`addrID` int(11) NOT NULL auto_increment,
`addrStreet` varchar(50) NOT NULL default '',
`addrCity` varchar(25) NOT NULL default '',
`addrState` char(2) NOT NULL default '',
`addrZIP` char(10) NOT NULL default '',
PRIMARY KEY (`add... |
<reponame>n-okonek/foolery<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 06, 2020 at 04:47 PM
-- Server version: 10.3.27-MariaDB-log-cll-lve
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRA... |
<reponame>pir8aye/conduit
INSERT INTO "conduit_db"."BOOKS"
VALUES (1, 'World News');
INSERT INTO "conduit_db"."BOOKS"
VALUES (2, 'Local News');
INSERT INTO "conduit_db"."BOOKS"
VALUES (3, 'Doggo News');
INSERT INTO "conduit_db"."BOOKS_STATUS"
VALUES (2, '1');
INSERT INTO "conduit_db"."BOOKS_STATUS"
VALUES (3, '1')... |
-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 31, 2015 at 10:46 AM
-- Server version: 5.6.16
-- PHP Version: 5.5.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
<filename>framework/resources/Functional/table_schema/data/07_double_default.sql
CREATE OR REPLACE SCHEMA (
nullable_double_col DOUBLE NOT NULL default '1.0'
) FOR TABLE dfs.drillTestDir.`table_schema/nullable_double_7`;
SET `store.table.use_schema_file` = true;
--@test
SELECT
nullable_double_col,
sqlTypeOf(nulla... |
-- table: race
-- DROP TABLE race;
-- COPY race TO 'race.csv'
-- COPY race FROM 'race.csv' DELIMITER ',' CSV;
CREATE TABLE race (
raceid bigserial PRIMARY KEY,
raceName varchar(50),
raceType varchar(7) check (raceType in ('trail', 'relay')),
raceDate date,
raceWebsite varchar(25),
createdById... |
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
PRINT N'Creating primary key [ParentInternationalA... |
<filename>funcs/sql/query_fr/FTP_DL.sql
select
f.CollectionName as SOURCE,
n.CId as CID ,
n.LAC ,
n.MCC,
n.MNC ,
n.HomeOperator Operator ,
n.CGI ,
n.technology Technology,
p.longitude Lon,
p.latitude Lat,
p.SessionId,
p.TestId,
n.NetworkId,
f.Zone SystemName,
f.ASideDevice ADevice,
p.MsgTime Time,
p.PosId,
n.FileId,... |
SET SESSION sql_mode = '';
LOAD DATA INFILE '@BASEPATH@taxa.txt' REPLACE INTO TABLE `@TABLEPREFIX@taxon` IGNORE 1 LINES;
LOAD DATA INFILE '@BASEPATH@distribution.txt' REPLACE INTO TABLE `@TABLEPREFIX@distribution` IGNORE 1 LINES;
LOAD DATA INFILE '@BASEPATH@description.txt' REPLACE INTO TABLE `@TABLEPREFIX@descripti... |
#standardSQL
# 14_19b: Lighthouse PWA scores by CMS
SELECT
app,
APPROX_QUANTILES(CAST(JSON_EXTRACT_SCALAR(report, "$.categories.pwa.score") AS NUMERIC), 1000)[OFFSET(501)] AS median_pwa_score,
COUNT(0) AS pages
FROM
`httparchive.lighthouse.2019_07_01_mobile`
LEFT JOIN
`httparchive.technologies.2019_07_01_mobi... |
/****** Object: StoredProcedure [dbo].[UpdateInstrumentUsageAllocations] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[UpdateInstrumentUsageAllocations]
/****************************************************
**
** Desc:
** Update requested instrument usage allocation ... |
<filename>docker_images/full_components/dcs_dv/files/script_db.sql<gh_stars>1-10
create database dashboards;
create database pipelines;
create user eve with encrypted password '<PASSWORD>';
grant all privileges on database dashboards to eve;
grant all privileges on database pipelines to eve;
|
<gh_stars>10-100
CREATE KEYSPACE if not exists test WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '3' } AND DURABLE_WRITES = true;
CREATE table test.string_only (
id text,
date text,
value text,
PRIMARY KEY (id, date)
);
CREATE table test.rdd_row (
... |
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE oauth_access_tokens (
access_token VARCHAR(40) NOT NULL,
client_id VARCHAR(80) NOT NULL,
user_id VARCHAR(255),
expires TIMESTAMP NOT NULL,
scope VARCHAR(2000),
CONSTRAINT access_token_pk PRIMARY KEY (access_token)
);
INSERT INTO oauth_acce... |
<filename>Exam Preparation/October 2016/section 1.sql<gh_stars>0
USE october_exam;
CREATE TABLE flights(
flight_id INT PRIMARY KEY,
departure_time DATETIME NOT NULL,
arrival_time DATETIME NOT NULL,
status VARCHAR(9) CHECK (status='Departing' OR status='Delayed' OR status='Arrived' OR status='Cancelled'),
origin_ai... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 18 Jan 2016 pada 11.56
-- Versi Server: 10.1.8-MariaDB
-- PHP Version: 5.6.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... |
<filename>tokobuah.sql
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 11, 2019 at 12:36 AM
-- Server version: 5.7.28-0ubuntu0.18.04.4
-- PHP Version: 7.2.24-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
... |
BEGIN;
CREATE DATABASE navicorpus;
CREATE TABLE docs(
corpus character varying(100) NOT NULL,
title text,
url text,
id_doc text NOT NULL,
CONSTRAINT docs_pkey PRIMARY KEY (corpus, id_doc));
CREATE TABLE europarl___add_docs(
id_doc text PRIMARY KEY,
date text,
policy text,
url_votewatch text);
COPY... |
--------------------------------------------------------------------------------
-- Up
--------------------------------------------------------------------------------
CREATE TABLE Category (id INTEGER PRIMARY KEY, name TEXT);
INSERT INTO Category (id, name) VALUES (1, 'Business');
INSERT INTO Category (id, name) VALU... |
create table delivery (
id bigserial not null,
client_id bigint not null,
tax decimal(10,2) not null,
status varchar(20) not null,
request_date timestamp not null,
completion_date timestamp,
receiver_name varchar(60) not null,
receiver_street varchar(255) not null,
receiver_number varchar(30) not null,
receiv... |
<reponame>suthishan/htmltopdf
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 05, 2021 at 03:06 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
USE DBA_Util
GO
/*** TABLES ***/
IF NOT EXISTS (SELECT 1 FROM sys.tables WHERE name = 'DbFileSizeLog')
BEGIN
CREATE TABLE DbFileSizeLog
(all_dbfiles_id INT
,used_space_mb FLOAT
,total_space_mb FLOAT
,record_date_time DAT... |
-- CreateTable
CREATE TABLE "Users" (
"id" SERIAL NOT NULL,
"email" TEXT NOT NULL,
"password" TEXT NOT NULL,
"name" TEXT NOT NULL,
"telephone" TEXT NOT NULL,
"address" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONS... |
<filename>Database/supplier.sql
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 08 Agu 2019 pada 06.28
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
DO $$
BEGIN
BEGIN
ALTER TABLE schema_migrations ADD COLUMN description varchar(1024);
EXCEPTION
WHEN duplicate_column THEN RAISE NOTICE 'column description already exists in schema_migrations.';
END;
END;
$$
--;;
DO $$
BEGIN
BEGIN
ALTER TABLE schema_migrations ADD COLUMN applied timestamp;
EXC... |
USE [TriceraDB]
GO
/****** Object: Table [dbo].[RESPONSE] Script Date: 6/18/2019 6:29:28 PM ******/
DROP TABLE [dbo].[RESPONSE]
GO
/****** Object: Table [dbo].[RESPONSE] Script Date: 6/18/2019 6:29:28 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RESPONSE](
[parent_reqid] ... |
<reponame>jhajagos/CommonDataModelMapper
/*********************************************************************************
# Copyright 2017-11 Observational Health Data Sciences and Informatics
#
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with th... |
-- tablas POR CRUD'S
-- PERFILES
CREATE TABLE Perfil(
correo VARCHAR2(30) NOT NULL,
nombre VARCHAR2(20) NOT NULL,
bloqueado NUMBER(1) NOT NULL
);
CREATE TABLE Opinion(
numero NUMBER(5) NOT NULL,
fecha DATE NOT NULL,
tipo VARCHAR2(1) NOT NULL,
justificacion VARCHAR2(20),
detalle VARCHA... |
DROP TABLE IF EXISTS t01;
CREATE TABLE t01 (id int, val int);
INSERT INTO t01 (id, val) SELECT i, i FROM generate_series(1, 20) i;
10: BEGIN;
20: BEGIN;
10: UPDATE t01 SET val=val WHERE id=segid(0,1);
20: UPDATE t01 SET val=val WHERE id=segid(1,1);
-- seg 0: con20 ==> con10, xid lock
20&: UPDATE t01 SET val=val WHER... |
<filename>postgresql/src/pl/plpgsql/test/views.sql
-- ************************************************************
-- * Describe the backside of a patchfield slot
-- ************************************************************
create function pslot_backlink_view(bpchar)
returns text as '
<<outer>>
declare
rec reco... |
<reponame>TheDigitalPhoenixX/MOOC_DB
DELETE FROM section
WHERE
section.wid = 4;
DELETE FROM week
WHERE
week.wid = 4;
-- Remove a student
SET
@StudentToDelete = "Student Username 1";
DELETE FROM enrolls
WHERE
username = @StudentToDelete;
DELETE FROM Takes
WHERE
username = @StudentToDelete;
DELETE FROM stu... |
-- For each movie that has at least one rating, find the highest number of stars that movie received.
-- Return the movie title and number of stars. Sort by movie title.
SELECT m.title, max(r.rating as stars1)
-- max is aggregate function -- meta function on the results without result: min, count, avg
from Movies m
... |
-- -----------------------------------------------------------------------------------
-- File Name : https://oracle-base.com/dba/monitoring/parameter_diffs.sql
-- Author : <NAME>
-- Description : Displays parameter values that differ between the current value and the spfile.
-- Requirements : Access to the V... |
<gh_stars>0
-- Table definitions for the tournament project.
--
-- Put your SQL 'create table' statements in this file; also 'create view'
-- statements if you choose to use it.
--
-- You can write comments in this file by starting them with two dashes, like
-- these lines here.
-- Initialize and select the Database
... |
<filename>sources/test/cg_test_test_helpers.sql
/*
* Copyright (c) Meta Platforms, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-- test helpers generation tests
create table Aaa
(
dl real not null primar... |
<gh_stars>0
\c postgres
DROP DATABASE IF EXISTS app_tenant_1;
DROP DATABASE IF EXISTS app_tenant_2;
CREATE DATABASE app_tenant_1;
\c app_tenant_1;
\i schema.sql;
\i values/values_1.sql;
CREATE DATABASE app_tenant_2;
\c app_tenant_2;
\i schema.sql;
\i values/values_2.sql;
CREATE USER test_user WITH PASSWORD 'passw... |
/*
Navicat Premium Data Transfer
Source Server : Mysql
Source Server Type : MySQL
Source Server Version : 100408
Source Host : localhost:3306
Source Schema : rental_mobil
Target Server Type : MySQL
Target Server Version : 100408
File Encoding : 65001
Date: 14/11/2019... |
<gh_stars>0
/*
-- Query: SELECT * FROM empleo.tbl_alerts
LIMIT 0, 1000
-- Date: 2019-05-28 12:46
*/
INSERT INTO `tbl_alerts` (`id`,`code`,`description`,`type`) VALUES (1,'1123','Se ha registrado correctamente','success');
INSERT INTO `tbl_alerts` (`id`,`code`,`description`,`type`) VALUES (2,'4568','Ocurriรณ un error al... |
<filename>db/0010 - Added Problem.ExternalId field.sql
DECLARE @targeDBVersion INT = 0009 --Required version of the database
DECLARE @numberOfRecordsInVersionTable INT
DECLARE @currenDBVersion INT
set @numberOfRecordsInVersionTable = (select count(*) from DBVersion)
set @currenDBVersion = (select max(DBVersion) from ... |
--------------------------------------------------------------------------------
-------- 2 - ZAPYTANIE WYSWIETLA DANE ZAWODNIKOW W MECZU O PODANYM ID ----------
--------------------------------------------------------------------------------
SELECT
ID_MECZU,
DATA_MECZU,
CZAS_MECZU,
(SELECT KLUB.NAZWA FROM DRU... |
<filename>monitoring-kecamatan.sql
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 14, 2021 at 01:49 PM
-- Server version: 8.0.26-0ubuntu0.20.04.2
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSA... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 11, 2019 at 04:31 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
/*
Navicat PGSQL Data Transfer
Source Server : local
Source Server Version : 90608
Source Host : localhost:5432
Source Database : dataman_storage
Source Schema : public
Target Server Type : PGSQL
Target Server Version : 90608
File Encoding : 65001
Date: 2018-03... |
<reponame>hangnadi/go-api-basic
create function create_movie(p_id uuid, p_extl_id character varying, p_title character varying, p_rated character varying, p_released date, p_run_time integer, p_director character varying, p_writer character varying, p_create_client_id uuid, p_create_username character varying)
retu... |
<reponame>godbobo/Admin
CREATE TABLE IF NOT EXISTS g_param (
id int(11) NOT NULL AUTO_INCREMENT COMMENT 'ๅๆฐ่กจไธป้ฎ',
label varchar(64) NOT NULL COMMENT 'ๅๆฐๅ',
zh varchar(64) NOT NULL COMMENT 'ๅๆฐไธญๆๅ',
val varchar(255) NOT NULL COMMENT 'ๅๆฐๅผ',
PRIMARY KEY (id) USING BTREE,
UNIQUE KEY lab... |
<reponame>unaio/Jot<gh_stars>1-10
SET @sName = 'bx_messenger';
-- SETTINGS
UPDATE `sys_options` SET `order` = `order` + 1 WHERE `order` > 15;
DELETE FROM `sys_options` WHERE `name` LIKE 'bx_messenger_max_drop_down_select';
SET @iCategId = (SELECT `id` FROM `sys_options_categories` WHERE `name`=@sName LIMIT 1);
INSE... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Waktu pembuatan: 23 Jul 2021 pada 07.06
-- Versi server: 5.7.33
-- Versi PHP: 7.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
ALTER TABLE `autounarchive`
ADD COLUMN IF NOT EXISTS `id` CHAR(12) NOT NULL,
ADD COLUMN IF NOT EXISTS `guild_id` VARCHAR(21) NOT NULL,
ADD COLUMN IF NOT EXISTS `thread_id` VARCHAR(21) NOT NULL,
-- Indexes
ADD UNIQUE INDEX IF NOT EXISTS `id` (`id`),
ADD UNIQUE INDEX IF NOT EXISTS `guild_... |
<reponame>bhojpur/piro<filename>pkg/store/postgres/migrations/20200119172146_did_execute.up.sql
UPDATE job_status SET data=jsonb_set(data::jsonb, '{conditions, didExecute}', 'true') WHERE data::jsonb->'conditions'->'didExecute' IS NULL;
|
drop table Person if exists;
drop table Address if exists;
create table Person (
id int not null,
first_name varchar(30) not null,
last_name varchar(30) not null,
birth_date date not null,
employed varchar(3) not null,
occupation varchar(30) null,
address_id int not null,
parent_id int null,
... |
-- file:insert.sql ln:85 expect:true
drop table inserttest
|
create type detection_type AS ENUM ('background', 'person', 'car', 'bicycle');
create type detection_class AS ENUM ('Unknown', 'Compacts', 'Sedans', 'SUVs', 'Coupes', 'Muscle', 'SportsClassics', 'Sports', 'Super', 'Motorcycles', 'OffRoad', 'Industrial', 'Utility', 'Vans', 'Cycles', 'Boats... |
<filename>SQL/1212. Team Scores in Football Tournament.sql<gh_stars>1-10
/*
1212. Team Scores in Football Tournament
Table: Teams
+---------------+----------+
| Column Name | Type |
+---------------+----------+
| team_id | int |
| team_name | varchar |
+---------------+----------+
team_id is the ... |
<gh_stars>0
insert into im_views (view_id, view_name, visible_for, view_type_id)
values (3, 'company_csv', 'view_companies', 1400);
---------------------------------------------------------
-- Companies CSV
--
delete from im_view_columns where column_id >= 300 and column_id <= 399;
--
insert into im_view_columns... |
<gh_stars>0
metadata :name => "actionpolicy",
:description => "Action Policy simplerpc authorization plugin",
:author => "P.Loubser <<EMAIL>>",
:license => "ASL 2.0",
:version => "2.1.0",
:url => "https://github.com/puppetlabs/mcollective-actionpo... |
alter table ACT_RE_DECISION_DEF
drop CONSTRAINT ACT_UNIQ_DECISION_DEF;
drop table ACT_RE_DECISION_DEF;
|
CREATE TABLE `tb_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`create_time` datetime DEFAULT CURRENT_TIMESTAMP,
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
);
CREATE TABLE `tb_role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varch... |
<gh_stars>1-10
select * from actor limit 50 |
BEGIN EXCLUSIVE TRANSACTION;
PRAGMA user_version = 4;
COMMIT TRANSACTION;
|
<filename>sql/020_convert.sql
SET timezone TO 'Zulu';
\x
-- conversion
SELECT pg_typeof(uuid_v1_convert('edb4d8f0-1a80-11e8-98d9-e03f49f7f8f3'::uuid)) AS from_std;
SELECT pg_typeof(uuid_v1_convert('edb4d8f0-1a80-11e8-98d9-e03f49f7f8f3'::uuid_v1)) AS to_std;
WITH data AS (
SELECT
uuid_v1_convert('607ad07c-f... |
<reponame>usnistgov/F4DE
-- y Targ
INSERT OR ABORT INTO System ( TrialID, Score, Rank, Decision)
SELECT detection.TrialID, Score, Rank, 'y' FROM detection INNER JOIN TrialIndex, threshold
WHERE (detection.TrialID == TrialIndex.TrialID AND TrialIndex.EventID==threshold.EventID AND Rank < threshold.RankThreshold);
... |
CREATE TABLE IF NOT EXISTS upload (
`ID` int(11) NOT NULL AUTO_INCREMENT
,`FILE_ID` int(11)
,`FILE_PATH` varchar(50)
,`FILE_NAME` varchar(50)
,`FILE_SIZE` varchar(50)
,`APPLICATION_ID` int(11)
,`APPLICATION_LABELTEXT` varchar(50)
,`CREATED_BY` varchar(50)
,`CREATED_AT` varchar(50)
,PRIMARY KEY... |
-- Copyright 2021 The Go Authors. All rights reserved.
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file.
BEGIN;
CREATE TABLE new_documentation (
id bigint PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
unit_id INTEGER NOT NULL,
goos goos NOT NULL,
goarc... |
<reponame>Arnab-Developer/Lesson1Scripts
USE [master]
GO
CREATE DATABASE Lesson1Database ON PRIMARY
(
NAME = N'Lesson1Database',
FILENAME = N'C:\Lesson1\Lesson1Database.mdf',
SIZE = 3MB,
MAXSIZE = UNLIMITED,
FILEGROWTH = 10%
)
LOG ON
(
NAME = N'Lesson1DatabaseLog',
FILENAME = N'C:\Lesson1\L... |
<gh_stars>0
drop function if exists fda_dbs.trigger_fn_put_object;
|
CREATE TABLE IF NOT EXISTS `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicod... |
CREATE TABLE `sap_position_management_regular_temporary_nav_data`
(
`ExternalCode` varchar(20) NOT NULL,
`PickListV2EffectiveStartDate` varchar(80) DEFAULT NULL,
`PickListV2ID` varchar(20) DEFAULT NULL,
`LabelNlNL` varchar(20) DEFAULT NULL,
`LastM... |
<filename>target/classes/import.sql
INSERT INTO USER ( USERNAME, PASSWORD, ROLES ) VALUES ('string','string','string'),('username','password','roles');
|
<filename>pargres/contrib/pg_buffercache/uninstall_pg_buffercache.sql
/* $PostgreSQL: pgsql/contrib/pg_buffercache/uninstall_pg_buffercache.sql,v 1.3 2007/11/13 04:24:28 momjian Exp $ */
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP VIEW pg_buffercache;
DROP FUNCTION... |
insert into product VALUES(1, 'Apple IPhone 6s', 'mobile', 'A very good build phone');
insert into product VALUES(2, 'Apple IPhone 7', 'mobile', 'A very good build phone');
insert into product VALUES(3, 'Apple IPhone 8', 'mobile', 'A very good build phone');
insert into product VALUES(4, 'Apple IPhone 8 plus', 'mobile'... |
<filename>kmserver-core/migrations/20190403085321.undo.matchKMApp25Schema.sql<gh_stars>1-10
DROP MATERIALIZED VIEW all_karas;
DROP MATERIALIZED VIEW all_kara_series;
DROP MATERIALIZED VIEW all_tags;
DROP MATERIALIZED VIEW all_years;
DROP MATERIALIZED VIEW all_series;
DROP MATERIALIZED VIEW all_kara_serie_langs;
DROP MA... |
INSERT INTO tinypg.customer (
first_name,
last_name
)
VALUES (
:first_name,
:last_name
)
RETURNING *; |
with step1 as (
select
tbl.oid tblid,
ns.nspname as schema_name,
tbl.relname as table_name,
tbl.reltuples,
tbl.relpages as heappages,
coalesce(toast.relpages, 0) as toastpages,
coalesce(toast.reltuples, 0) as toasttuples,
coalesce(substring(array_to_string(tbl.reloptions, ' ') from '%fillfactor=#"__#"%... |
<filename>data/test/sql/525744ee188c24b8a9d6908238305627448a8e56mysql.sql<gh_stars>10-100
ALTER TABLE `sizes` CHANGE `size_title` `size_title` varchar(255) default NULL;
ALTER TABLE `sizes` CHANGE `size_label` `size_label` varchar(255) default NULL;
ALTER TABLE `sizes` CHANGE `size_height` `size_height` smallint(5) UNS... |
-- tkt-8454a207b9.test
--
-- db eval {
-- ALTER TABLE t1 ADD COLUMN g DEFAULT -9223372036854775808;
-- SELECT g, typeof(g) FROM t1;
-- }
ALTER TABLE t1 ADD COLUMN g DEFAULT -9223372036854775808;
SELECT g, typeof(g) FROM t1; |
<filename>Chapter10/r3/01_scalar_javascript_UDF.sql
--start by creating a database, in which we will create our JavaScript based scalar UDFs.
CREATE DATABASE C10_R3;
--create a very simple UDF that squares the value that is provided as the input. we must capitalize the parameter name when used in the function definiti... |
<gh_stars>0
DELIMITER /
UPDATE KRIM_PERM_T set NM = 'Submit IACUC Protocol' WHERE NM = 'Submit IACUC protocol for Review'
/
UPDATE KRIM_PERM_T SET DESC_TXT='Submit an IACUC Protocol to committee for review' WHERE NM = 'Submit IACUC Protocol'
/
UPDATE KRIM_PERM_T set NM = 'Add IACUC Protocol Notes' WHERE NM = 'Add IACUC... |
<reponame>uk-gov-mirror/defra.water-abstraction-service
-- Stop reduce notification
UPDATE "water"."task_config"
SET modified = NOW(),
config = '{
"prefix" : "HOF-",
"content" : {
"email": "# {{ taskConfig.config.title }}\nWater Resources Act 1991 \nOur reference: {{ ref }}\n\nDear licence holder,\n\n#... |
CREATE TABLE `CONFIG` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`CONFIG_GROUP` varchar(100) DEFAULT NULL COMMENT '็ป',
`CONFIG_KEY` varchar(100) DEFAULT NULL COMMENT '้ฎ',
`CONFIG_VALUE` varchar(1000) DEFAULT NULL COMMENT 'ๅผ',
`REMARK` varchar(500) DEFAULT NULL COMMENT 'ๅคๆณจ',
`CREATE_TIME` datetime DEFAULT NULL ... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versi server: 5.6.25 - MySQL Community Server (GPL)
-- OS Server: Win32
-- HeidiSQL Versi: 9.1.0.4867
-- --------------------------------------------------------
/*... |
INSERT INTO t_config (conf_name, conf_value, comment)
VALUES ("last_block_height","1","last block height in sync");
INSERT INTO t_config (conf_name, conf_value, comment)
VALUES ("last_tx_page","1","last transaction page number");
INSERT INTO t_config (conf_name, conf_value, comment)
VALUES ("last_token_page","1","las... |
CREATE TABLE IF NOT EXISTS items (
id serial primary key,
name VARCHAR(50) NOT NULL,
description VARCHAR(350) NOT NULL,
create_time TIMESTAMP NOT NULL
); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.