sql stringlengths 6 1.05M |
|---|
DROP VIEW IF EXISTS view_daftar_barang_blhk;
CREATE VIEW view_daftar_barang_blhk AS
SELECT
*
FROM
view_daftar_barang_kabupaten
WHERE
1 = 1;
GRANT ALL PRIVILEGES ON view_daftar_barang_blhk TO lap_blhk;
REVOKE INSERT, UPDATE, DELETE ON view_daftar_barang_blhk FROM lap_blhk;
|
CREATE TABLE `langpacks_langpack` (
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`uuid` char(32) NOT NULL PRIMARY KEY,
`language` varchar(10) NOT NULL,
`fxos_version` varchar(255) NOT NULL,
`version` varchar(255) NOT NULL,
`filename` varchar(255) NOT NULL,
`hash` varchar(25... |
SET client_encoding TO 'UTF8';
CREATE OR REPLACE FUNCTION ag_insert_login (
email_ text,
name_ text,
address_ text,
city_ text,
state_ text,
zip_ text,
country_ text
)
RETURNS VOID AS $body$
BEGIN
insert into ag_login
(email, name, address, city, state, zip, countr... |
CREATE TABLE `transfer_agencies` (
`id` bigint PRIMARY KEY NOT NULL AUTO_INCREMENT,
`name` VARCHAR(120) NULL DEFAULT NULL COMMENT 'Name transfer agency',
`active` TINYINT(1) NULL DEFAULT NULL COMMENT 'Whether the agency is active in the system or not',
`website` VARCHAR(120) NULL DEFAULT NULL COMMENT 'Website of th... |
INSERT INTO transaction VALUES
(999, 1, 'Tamoad Bank', NOW(), 'Payment', 5000.50);
DELETE FROM transaction WHERE transactionID = 999;
SELECT * FROM deletedTransaction;
|
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE IF NOT EXISTS users
(
id UUID DEFAULT uuid_generate_v4() NOT NULL
CONSTRAINT users_pk PRIMARY KEY,
login VARCHAR(50) NOT NULL,
first_name VARCHAR(50) ... |
<reponame>winseros/DropSchema.SqlServer<filename>DropSchema.SqlServer/Scripts/100_DropTableForeignKeys.sql
if not exists(select *
from sys.schemas
where name = 'maintance')
exec ('create schema maintance')
if (exists(select 1
from [sys].[procedures]
where name = '... |
DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers (
id INT(11) NOT NULL AUTO_INCREMENT,
burger_name VARCHAR(50) NOT NULL,
devoured BOOLEAN DEFAULT false,
PRIMARY KEY(id)
) |
INSERT INTO battle values(
1, Bremah , Boston, Hero, 10, 15
);
|
<reponame>antuniooh/exercises-computer-tech-ETEC
USE [master]
GO
/****** Object: Database [Cadastro] Script Date: 10/17/2017 15:23:36 ******/
CREATE DATABASE [Cadastro] ON PRIMARY
( NAME = N'Cadastro', FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\Cadastro.mdf' , SIZE = 23... |
REM Parameterized.sql
REM Chapter 6, Oracle9i PL/SQL Programming by <NAME>
REM This block illustrates the declaration of a parameterized cursor.
DECLARE
CURSOR c_Classes(p_Department classes.department%TYPE,
p_Course classes.course%TYPE) IS
SELECT *
FROM classes
WHERE department = p_Depa... |
<filename>po-includes/database/popoji.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Waktu pembuatan: 18 Apr 2021 pada 06.11
-- Versi server: 5.7.31
-- Versi PHP: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
# ************************************************************
# SQL dump
# MySQL Version: 5.7.26
# Database: redpacket
# Generation Time: 2019-05-05 09:44:01 +0000
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARAC... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 19 Jul 2020 pada 09.23
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
PRAGMA foreign_keys = ON;
CREATE TABLE Users (
UserID INTEGER NOT NULL PRIMARY KEY,
Username VARCHAR(40) NOT NULL,
Password VARCHAR(200) NOT NULL
);
CREATE TABLE Rank (
RankID INTEGER NOT NULL PRIMARY KEY,
UserID INTEGER NOT NULL UNIQUE,
GamesPlayed INTEGER NOT NULL DEFAULT(0),
GamesW... |
create or alter procedure web.get_trainingsessionsync
@json nvarchar(max)
as
declare @fromVersion int = json_value(@json, '$.fromVersion')
declare @userId varchar(32) = json_value(@json, '$.userId')
set xact_abort on
set transaction isolation level snapshot;
begin tran
declare @reason int
declare @curVer... |
create index _dta_index_store_sales_6_1333579789__k1_k23_k14_k6_k8_k5_k7_3_4_9_10_11_12_13_16_17_20 on store_sales
(
ss_sold_date_sk asc,
ss_net_profit asc,
ss_sales_price asc,
ss_hdemo_sk asc,
ss_store_sk asc,
ss_cdemo_sk asc,
ss_addr_sk asc
)
include(ss_item_sk,ss_customer_sk,ss_promo_sk,ss_ticket_number,ss_qu... |
-- file:tsearch.sql ln:355 expect:false
Water, water, every where,
Nor any drop to drink.
<NAME> (1772-1834)
', to_tsquery('english', 'ocean'), 'MaxFragments=1')
|
IF EXISTS (SELECT * FROM [tempdb].[sys].[objects]
WHERE [name] = N'##TempSpinlockStats1')
DROP TABLE [##TempSpinlockStats1];
IF EXISTS (SELECT * FROM [tempdb].[sys].[objects]
WHERE [name] = N'##TempSpinlockStats2')
DROP TABLE [##TempSpinlockStats2];
GO
-- Baseline
SELECT * INTO [##TempSpinlockStats1... |
-- Пусть в таблице users поля created_at и updated_at оказались незаполненными. Заполните их текущими датой и временем.
ALTER TABLE users ADD COLUMN created_at TIMESTAMP NULL;
ALTER TABLE users ADD COLUMN updated_at TIMESTAMP NULL;
UPDATE users SET created_at = CURRENT_TIMESTAMP WHERE created_at IS NULL;
UPDATE users S... |
<filename>conf/META-INF/import.sql
INSERT INTO users (USER_ID,USERNAME,PASSWORD) Values (1,'admin','<PASSWORD>');
|
insert into test_entity_1(id, data_c) values (0, 'data1');
insert into test_entity_1(id, data_c) values (1, 'data2');
|
<gh_stars>1-10
create table if not exists categories (
id integer not null constraint categories_pkey primary key,
description varchar(255),
name varchar(255) not null,
position integer not null,
slug varchar(255) not null constraint uk_category_slug... |
-- FK, Index 는 별도 파일로 분리. 맨 마지막에 작업 예정
drop table if exists data_info_log cascade;
drop table if exists data_info_log_2020 cascade;
drop table if exists data_info_log_2021 cascade;
drop table if exists data_info_log_2022 cascade;
drop table if exists data_info_log_2023 cascade;
drop table if exists data_info_log_2024 c... |
<reponame>sweetnsaltybot/schedulebot<gh_stars>10-100
ALTER TABLE public.config ADD COLUMN settings JSON;
ALTER TABLE public.config ADD COLUMN db_version VARCHAR(6) NULL;
UPDATE public.config SET db_version = '2.0.0'; |
--------------------------------------------------------------------------
-- .export excel test
--------------------------------------------------------------------------
.run ../common/postgresql_setup.sql
CREATE TABLE MyTable(a INTEGER, b DATE, c TIME, d TIMESTAMP, e BOOL, f REAL);
INSERT INTO MyTable VALUES (1, '... |
<gh_stars>100-1000
SELECT 'This is an init-migration task' |
<gh_stars>1000+
-- Database: mssql
-- Change Parameter: columnName=id
-- Change Parameter: tableName=person
DECLARE @sql [nvarchar](MAX)
SELECT @sql = N'ALTER TABLE person DROP CONSTRAINT ' + QUOTENAME([df].[name]) FROM [sys].[columns] AS [c] INNER JOIN [sys].[default_constraints] AS [df] ON [df].[object_id] = [c].[def... |
--
-- FOREIGN KEY
--
-- MATCH FULL
--
-- First test, check and cascade
--
CREATE TABLE PKTABLE ( ptest1 int PRIMARY KEY, ptest2 text );
CREATE TABLE FKTABLE ( ftest1 int REFERENCES PKTABLE MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE, ftest2 int );
-- Insert test data into PKTABLE
INSERT INTO PKTABLE VALUES (1, 'Te... |
CREATE OR REPLACE FUNCTION array_sort_unique (ANYARRAY) RETURNS ANYARRAY
LANGUAGE SQL
AS $body$
SELECT ARRAY(
SELECT DISTINCT $1[s.i]
FROM generate_series(array_lower($1,1), array_upper($1,1)) AS s(i)
ORDER BY 1
);
$body$;
|
<reponame>Roragok/rl4d2l-stats
CREATE TABLE IF NOT EXISTS `bet` (
`id` INT NOT NULL auto_increment,
`createdAt` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`name` varchar(128),
`choices` varchar(256),
`winner` varchar(64),
`status` INT,
`createdTimestamp` INT,
`endTimestamp` INT,
`lockTimestamp` INT,
`closeTimestamp... |
<reponame>devcharleneg/cictpracticum
DROP DATABASE cictpracticum;
CREATE DATABASE cictpracticum;
USE cictpracticum;
CREATE TABLE Account
(
account_no INT NOT NULL AUTO_INCREMENT,
user_id VARCHAR(20) NOT NULL UNIQUE,
lastname VARCHAR(30) NOT NULL,
firstname VARCHAR(30) NOT NULL,
middle_initial VARC... |
<filename>TestAutomationDB/dbo/Stored Procedures/ag_test_method_context_chain_by_subtest_id_sel.sql<gh_stars>0
/*
??????????????????????????????????????????????????????????????????????
?|
?| Procedure Name: ag_test_method_context_chain_by_subtest_id_sel
?|
?| Description: Selects data from table test_method_context_ch... |
<gh_stars>0
DROP TABLE public.participant;
DROP TABLE public.vote;
DROP TABLE public.queue;
DROP TABLE public."user";
INSERT INTO public."user"(id, username, email, password) VALUES
('b<PASSWORD>30-a898-fec<PASSWORD>', 'user1', '<EMAIL>', '$2b$10$ACwn<PASSWORD>rxne5nvlJkY.puSG0AjALBtuGx74JQ0s4ygEQlIO8tKlW');
INS... |
<gh_stars>0
CREATE SCHEMA IF NOT EXISTS gns;
CREATE TABLE IF NOT EXISTS gns.global_props(
latest_block_num BIGINT DEFAULT 0,
latest_hive_rowid BIGINT DEFAULT 0,
latest_gns_op_id BIGINT DEFAULT 0,
latest_block_time TIMESTAMP,
sync_enabled BOOLEAN DEFAULT true
);
CREATE TABLE IF NOT EXISTS gns.ops(
... |
-- Sakila Spatial Sample Database Data
-- Version 0.9
-- Copyright (c) 2014, Oracle Corporation
-- All rights reserved.
-- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-- * Redistributions of source code must retain th... |
<gh_stars>0
-- Project Name : Uruluk
-- Date/Time : 2020/08/08 9:46:22
-- Author : Candle
-- RDBMS Type : MySQL
-- Application : A5:SQL Mk-2
/*
BackupToTempTable, RestoreFromTempTable疑似命令が付加されています。
これにより、drop table, create table 後もデータが残ります。
この機能は一時的に $$TableName のような一時テーブルを作成します。
*/
-- アクセスカウント
--* ... |
<reponame>ga-chicago/ga-chicago.github.io<filename>darth-vader/05_full_stack_sinatra/d01/Brad_Bolander/migrations.sql<gh_stars>0
#1 Create database
CREATE DATABASE todo_items;
#2 Connect to database
\c todo_items
#3 Create table
CREATE TABLE todo_list (id SERIAL PRIMARY KEY,
name varchar(255), description varchar(255... |
use Observations
-- Observation
print 'Observation'
go
Declare @BatchSize Int = 1000000
Declare @RowCount Int = @BatchSize
Declare @BatchStart DateTime
Declare @StartDate DateTime
Declare @LastDate DateTime
Declare @GroupCount Int = 1
Declare @BatchNum Int = 0
Declare @Msg VarChar(100)
Select
@RowCount = Count(*)
fro... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 14, 2020 at 01:37 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>e-commerce/database_eshop_export/eshop_oc_pavoblog_post_to_category.sql
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: eshop
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
<reponame>jyogu-i/spring-boot-rest-example
select * from public."Scale_number" where scale_number_id=/* scalenumber.getScaleNumberId() */'1'; |
<filename>Exams/Databases MSSQL Server Exam - 20 Oct 2019/03. Update.sql
UPDATE Reports
SET CloseDate = GETDATE()
WHERE CloseDate IS NULL |
USE employees_db;
INSERT INTO department(name)
VALUES
('Sales'),
('Engineering'),
('Finance'),
('Legal');
INSERT INTO role(title, salary, department_id)
VALUES
('Sales Lead', 100000.00, 1),
('Salesperson', 80000.00, 1),
('Lead Engineer', 150000.00, 2),
('Software Engineer', 120000.00, ... |
<gh_stars>0
CREATE TABLE `access_groups` (
`access_groupsid` int(11) NOT NULL AUTO_INCREMENT,
`password` char(40) NOT NULL,
`username` varchar(255) NOT NULL,
`salt` varchar(255) NOT NULL,
primary key(access_groupsid)
);
CREATE TABLE `admin_session` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11)... |
INSERT INTO [dbo].[Staffs] ([StaffGuid], [PersonGuid], [Matricule], [PositionPrincipale], [DepartementPrincipale], [Division], [Qualification], [Diploma], [DiplomaLevel], [Experiences], [FormerJob], [Grade], [HiredDate], [Statut]) VALUES (N'39690a52-3685-4c78-bf7a-0e1588323f71', N'6d26fe5c-c26f-450e-8481-ec46bb112042',... |
SET DEFINE OFF;
create or replace package body afw_13_opert_pkg
as
procedure creer_opert (pva_code_prodt in varchar2
,pva_code in varchar2
,pva_nom in varchar2
,pva_descr in varchar2
,pnu_ref_fonc... |
alter table multicast_group
drop column f_cnt; |
BEGIN;
CREATE TABLE sessions(
id serial PRIMARY KEY,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
active BOOLEAN NOT NULL DEFAULT FALSE,
join_id char(8)
);
COMMIT;
|
select customer.custkey, sum(lineitem.extendedprice * (1 - lineitem.discount)) as revenue, customer.acctbal, nation.name, customer.address, customer.phone, customer.comment
from customer, orders, lineitem, nation
where customer.custkey = orders.custkey
and lineitem.orderkey = orders.orderkey
and orders.orderdate >= dat... |
<filename>mssql/schema/002.AbpBackgroundJobs.sql
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [AbpBackgroundJobs](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[JobArgs] [nvarchar](max) NOT NULL,
[JobType] [nvarchar](512) NOT NULL,
[Priority] [tinyint] NOT NULL,
[IsAbandoned] [bit] NOT NUL... |
/*
Usage:
DECLARE
@P_NVP_SeqID int = 1,
@P_Debug INT = 1
exec ZGWSystem.Get_Name_Value_Pair_Details
@P_NVP_SeqID,
@P_Debug
*/
-- =============================================
-- Author: <NAME>
-- Create date: 08/19/2011
-- Description: Returns name value pair details
-- Note:
-- This not the most effecien... |
-- file:macaddr.sql ln:20 expect:true
INSERT INTO macaddr_data VALUES (13, '08:00:2c:01:02:03')
|
select distinct StudentId, StudentName, GroupName
from Students, Groups, Courses, Plan
where Students.GroupId = Groups.GroupId
and Plan.CourseId = Courses.CourseId
and Plan.GroupId = Students.GroupId
and CourseName = :CourseName
and not exists (
select Mark
from Marks
where Marks.CourseId = Courses.... |
<gh_stars>1-10
CREATE TABLE B_WORKFLOW_DOCUMENT
(
ID NUMBER(18) NOT NULL,
STATUS_ID NUMBER(18) NOT NULL,
DATE_ENTER DATE,
DATE_MODIFY DATE,
DATE_LOCK DATE,
ENTERED_BY NUMBER(18),
MODIFIED_BY NUMBER(18),
LOCKED_BY NUMBER(18),
FILENAME VARCHAR2(255 CHAR) NOT NULL,
SITE_ID CHAR(2 CHAR),
TITLE VARCHAR2(255 CHAR)... |
<reponame>it-academyproject/ita-directory-frontend
-- CreateTable
CREATE TABLE "user_role" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
"admin" BOOLEAN NOT NULL,
"manager" BOOLEAN NOT NULL,
"registered" BOOLEAN NOT NULL,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "user_status" (
"i... |
-- Migrationscripts for ebean unittest
-- drop dependencies
drop trigger if exists migtest_e_history_history_upd on migtest_e_history cascade;
drop function if exists migtest_e_history_history_version();
drop view migtest_e_history_with_history;
drop table migtest_e_history_history;
-- apply changes
drop trigger if e... |
insert into session.t1
select * from transactions |
<gh_stars>0
use gap_local;
select top 200 * from logging.bericht
--where adnummer=172157
order by berichtid desc
--select * from log.berichten where id >= 942043 and id <= 942077
|
<reponame>stumelius/adwords
{{
config(
enabled = var('etl') == 'stitch' and var('adapter_value') == 'criteria'
)
}}
{{ stitch_adwords_criteria_performance() }} |
<gh_stars>1-10
## start naming files to reference the release version and git tag at which point the code will require the changes in this file
update CHROMOSOME_FEATURE set class = "GeneProduct" where class = "GeneProductImpl";
alter table TAXON drop COLUMN `UNIGENE_PREFIX`, drop COLUMN `SWISS_PROT_SUFFIX`; |
<reponame>scossin/CatalogueExport
-- 1800 Number of persons with at least one measurement occurrence, by measurement_concept_id
--HINT DISTRIBUTE_ON_KEY(stratum_1)
select 1800 as analysis_id,
CAST(m.measurement_CONCEPT_ID AS VARCHAR(255)) as stratum_1,
cast(null as varchar(255)) as stratum_2,
cast(null as varchar(... |
#standardSQL
# % of pages having skip links
CREATE TEMPORARY FUNCTION getEarlyHash(payload STRING)
RETURNS INT64 LANGUAGE js AS '''
try {
const almanac = JSON.parse(payload);
return almanac['seo-anchor-elements'].earlyHash;
} catch (e) {
return 0;
}
''';
SELECT
_TABLE_SUFFIX AS client,
COUNTIF(getEarlyHash(J... |
<filename>oci-test/tests/oci_core_local_peering_gateway/test-turbot-query.sql
select title, tenant_id
from oci.oci_core_local_peering_gateway
where id = '{{ output.resource_id.value }}'; |
/* Copyright 2018 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
USE SoftUni
GO
CREATE PROC usp_EmployeesBysalaryLevel(@Level VARCHAR(50))
AS
SELECT FirstName,
LastName
FROM Employees
WHERE dbo.ufn_GetSalaryLevel(Salary) = @Level |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.58.3
-- Generation Time: Nov 30, 2020 at 08:03 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mer. 13 jan. 2021 à 16:57
-- Version du serveur : 5.7.31
-- Version de PHP : 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
SELECT acc.location, count(*)
FROM
site as s,
so_user as u1,
question as q1,
answer as a1,
tag as t1,
tag_question as tq1,
badge as b,
account as acc
WHERE
s.site_id = q1.site_id
AND s.site_id = u1.site_id
AND s.site_id = a1.site_id
AND s.site_id = t1.site_id
AND s.site_id = tq1.site_id
AND s.site_id = b.site_id
AND q1... |
INSERT INTO Usuario
(idUsuario, nombreUsuario, nombrePilaUsuario, apellidosUsuario, correoElectronicoUsuario, contrasenaUsuario, lenguaje, rolUsuarioSistema, cuentaEliminada)
VALUES
(1, "Maximiliano", "maximiliano", "Lucrecio", "<EMAIL>", "$2a$10$MOTlWknMV4VImu6vTQ9gq.yNIY37MJW4uM1wvBMsf.jRO0oviGyeq", 1, 0, 0);
INSERT... |
INSERT INTO `user` VALUES (1, 'sdfsd', 12);
INSERT INTO `user` VALUES (2, 'sdfsdaasd', 0);
INSERT INTO `user` VALUES (3, 'sdfsdaasda', 21);
INSERT INTO `user` VALUES (4, '张三', 2);
|
USE `bitel_ecommerce` ;
ALTER TABLE tbl_product MODIFY COLUMN product_processor_name VARCHAR(80) NULL; |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 26, 2018 at 05:04 AM
-- 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_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 22, 2015 at 09:31 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<filename>+usados/Export - Import/nt/startup_n_nt.sql<gh_stars>0
set termout off
set heading off
set feedback off
set pagesize 0
startup;
exit;
|
<reponame>meeprakash25/sportsventures
DROP TABLE IF EXISTS admin_languages;
CREATE TABLE `admin_languages` (
`id` int(191) NOT NULL AUTO_INCREMENT,
`is_default` tinyint(1) NOT NULL DEFAULT '0',
`language` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`file` varchar(100) CHARACTER SET ... |
<filename>test/sql/push_should_work.test.sql<gh_stars>1-10
--init sqlsn
@sqlsnrc.sql
--require stack module from path (relative to sqlsn-core)
@&&sqlsn_require_from_path "../.."
prompt create stack stack1
@&&stack_create stack1
--case
prompt
prompt * case [stack push]
prompt --* @&&stack_push stack1 value1
prompt --... |
DROP TRIGGER task_tr_delete;
CREATE TRIGGER task_tr_delete
DELETE ON task
BEGIN
UPDATE thread
SET task_count = task_count - 1
WHERE id = old.thread_id;
UPDATE thread
SET task_sum_cost = task_sum_cost - coalesce(old.cost, 0)
WHERE id = old.thread_id;
DELETE FROM task_comment WHERE task... |
<reponame>cmoussalli/DynThings
CREATE TABLE [dbo].[UserNotifications] (
[ID] BIGINT IDENTITY (1, 1) NOT NULL,
[UserID] NVARCHAR (128) NULL,
[IsRead] BIGINT NULL,
[Txt] NVARCHAR (512) NULL,
[NotificationTypeID] BIGINT NUL... |
<filename>modules/boonex/directory/install/sql/install.sql
-- TABLE: entries
CREATE TABLE IF NOT EXISTS `bx_directory_entries` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`author` int(11) NOT NULL,
`added` int(11) NOT NULL,
`changed` int(11) NOT NULL,
`category` int(11) NOT NULL,
`thumb` int(11) NOT NU... |
<filename>data/test/sql/71dd045cc5cec2c578f87e84aa7152a6e31ef572dbo.SwitchDetailsTemp.Table.sql
USE [NavIntegrationDB]
GO
/****** Object: Table [dbo].[SwitchDetailsTemp] Script Date: 02/13/2012 17:15:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SwitchDetailsTemp](
[ClientID] [nv... |
<filename>src/test/resources/sql/insert/10949d00.sql<gh_stars>10-100
-- file:create_index.sql ln:83 expect:true
INSERT INTO POINT_TBL(f1) VALUES (NULL)
|
drop function if exists "de.metas.handlingunits".get_All_TUs(p_M_HU_ID numeric);
create or replace function "de.metas.handlingunits".get_All_TUs(p_M_HU_ID numeric)
returns setof M_HU
as $$
declare
v_HU_UnitType varchar;
begin
--
-- Fetch HU infos for given HU
select piv.HU_UnitType
into v_HU_UnitType
from M_HU hu... |
<reponame>DEFRA/prsd-iws
DECLARE @id uniqueidentifier
DECLARE @orgid uniqueidentifier
DECLARE @getid CURSOR
SET @getid = CURSOR FOR
SELECT
u.Id,
u.OrganisationId
FROM [Identity].AspNetUsers u
LEFT OUTER JOIN [Identity].AspNetUserClaims c
ON c.UserId = u.Id
WHERE NOT EXISTS (SELECT
*
FROM [Identity].AspNetUser... |
<reponame>henrikhasell/comdb2<filename>tests/upsert.test/t00_upsert.sql
# Simple cases
CREATE TABLE t1(i INT) $$
INSERT INTO t1 VALUES(1), (1);
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(i INT PRIMARY KEY) $$
INSERT INTO t1 VALUES(1), (1);
SELECT * FROM t1;
DROP TABLE t1;
# Test with non-unique (dup) key
CREATE... |
<reponame>MarvinHsu/EASPortal
/*==============================================================*/
/* DBMS name: PostgreSQL 9.x */
/* Created on: 2020/3/1 06:04:27 */
/*==============================================================*/
drop table TB_... |
/*
sql卸载文件
*/
DROP TABLE IF EXISTS `hisiphp_plugins_sms`;
DROP TABLE IF EXISTS `hisiphp_plugins_sms_log`;
DROP TABLE IF EXISTS `hisiphp_plugins_sms_template`;
DROP TABLE IF EXISTS `hisiphp_plugins_sms_template_index`; |
<reponame>seeyoui/kensite_cms<gh_stars>10-100
--DROP TABLE BO_DEMO CASCADE CONSTRAINTS;
CREATE TABLE BO_DEMO (
ID CHAR(32) not null ,
CREATE_DATE DATE,
CREATE_USER VARCHAR2(50),
UPDATE_DATE DATE,
UPDATE_USER VARCHAR2(50),
REMARKS VARCHAR2(255),
DEL_FLAG CHAR(1),
TREE_ID VARCHAR2(100),
EXPRESSION VARCHAR2(100),
USER_NAM... |
# Copyright 2021 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
<reponame>lizhichao/ClickHouse
DROP TABLE IF EXISTS low_cardinality;
DROP TABLE IF EXISTS low_cardinality_all;
CREATE TABLE low_cardinality (d Date, x UInt32, s LowCardinality(String)) ENGINE = MergeTree(d, x, 8192);
CREATE TABLE low_cardinality_all (d Date, x UInt32, s LowCardinality(String)) ENGINE = Distributed(tes... |
CREATE OR REPLACE PROCEDURE SP1 ()
LANGUAGE SQL DYNAMIC RESULT SETS 1
BEGIN ATOMIC
DECLARE OPC CURSOR WITH RETURN FOR
SELECT * FROM TABLE_A;
OPEN OPC;
END
GO |
DROP TABLE astarte_schema;
|
<reponame>nenadnoveljic/tpt-oracle<filename>segstatint.sql
-- 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.
SELECT
o1.NAME,
s.fts_statnam,
s.fts_staval,
s.fts_preval
FROM
x$ksol... |
<reponame>CUBRID/cubrid-testcase
--- number - number = number (native)
create table t1 (d1 double, i1 int, n1 numeric(10,3));
insert into t1 values (2.00123e1,3,100.21);
--- table columns
select d1-i1 from t1;
select d1-n1 from t1;
select i1-n1 from t1;
--prepared statements
-- double column
prepare st from 'selec... |
SELECT hr.countries.COUNTRY_NAME AS 'País',
IF(hr.countries.REGION_ID = 1, 'incluído', 'não incluído') AS 'Status Inclusão'
FROM hr.countries
ORDER BY COUNTRY_NAME ASC;
|
<reponame>DeepSingh93/Grockart<filename>grockart/grockart/assets/database/storedProcedures/sp_getMenu.sql<gh_stars>0
DROP procedure IF EXISTS `sp_getMenu`;
DELIMITER $$
CREATE PROCEDURE `sp_getMenu`(
)
BEGIN
SELECT distinct categoryName, productName, productImage
FROM tbl_productByStore pbs
INNER JOIN tbl_cat... |
<reponame>dataventure-io/lift<filename>db/refresh_request_dates.sql
update requests set
last_action=dateadd(day, datediff( day,(select max(last_action) from requests), getdate()), last_action),
post_date=dateadd(day, datediff( day,(select max(last_action) from requests), getdate()), post_date)
where id > (select max(i... |
{%- func qryGetTokens() -%}
{%- collapsespace -%}
SELECT DISTINCT f.token
FROM fcmTokens f
JOIN users u ON f.user=u.id
WHERE topic=?
AND u.fcmEnabled=1
{%- endcollapsespace -%}
{%- endfunc -%} |
-- Watershed groups are arbitrary groupings (historically created as work units),
-- the watersheds do not necessarily drain to a single point. This is obvious
-- on the coast, but is also possible for interior groups. Therefore, it makes
-- sense that there are no watershed codes provided in the watershed group table,... |
INSERT INTO animaux_velages VALUES (2, 1);
INSERT INTO animaux_velages VALUES (4, 2);
INSERT INTO animaux_velages VALUES (6, 3);
INSERT INTO animaux_velages VALUES (8, 4);
INSERT INTO animaux_velages VALUES (10, 5);
INSERT INTO animaux_velages VALUES (12, 6);
INSERT INTO animaux_velages VALUES (14, 7);
INSERT INTO anim... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.