sql stringlengths 6 1.05M |
|---|
CREATE OR REPLACE VIEW OSP$AWARD_SCIENCE_CODE(MIT_AWARD_NUMBER,
SEQUENCE_NUMBER,
SPECIAL_REVIEW_NUMBER,
SPECIAL_REVIEW_CODE,
APPROVAL_TYPE_CODE,
PROTOCOL_NUMBER,
APPLICATION_DATE,
APPROVAL_DATE,
COMMENTS,
UPDATE_USER,
UPDATE_TIMESTAMP)
AS SELECT
B.AWARD_NUMBER,
B.SEQUENCE_NUMBER,
A.SPECIAL_RE... |
-- gameobject_involvedrelation
-- By Mikadmin <NAME>
-- Quest Added in patch 4.3.0
DELETE FROM `gameobject_involvedrelation` WHERE (`quest`=29643); |
<reponame>Ambal/mangos<gh_stars>1-10
ALTER TABLE db_version CHANGE COLUMN required_10289_01_mangos_creature_template required_10289_02_mangos_creature_model_info bit;
ALTER TABLE creature_model_info ADD COLUMN modelid_alternative mediumint(8) unsigned NOT NULL default '0' AFTER modelid_other_gender;
ALTER TABLE creatu... |
<reponame>df7cb/postgresql-uctext<filename>sql/uctext.sql
create extension uctext;
select null::uctext;
select ''::uctext;
select 'abc123'::uctext;
select 'ABC123'::uctext;
select 'moo'::uctext = 'moo'::text, 'moo'::text = 'moo'::uctext;
select 'moo'::uctext = 'MOO'::text, 'MOO'::text = 'moo'::uctext;
create table l... |
<filename>src/main/db/procedures/START_CAMUNDA_PROCESS.sql
create or replace procedure start_camunda_process(proposalId IN number, budget IN number, category IN VARCHAR2, username IN VARCHAR2 ) is
l_body clob := '';
l_clob clob := '';
l_email VARCHAR2(240);
begin
l_email := APEX_UTIL.GET_EMAIL(p_username =... |
<gh_stars>0
delimiter $$
DROP PROCEDURE IF EXISTS ShowTickInfo $$
CREATE PROCEDURE ShowTickInfo(IN id VARCHAR(5))
BEGIN
IF EXISTS (SELECT tick FROM Prices WHERE tick = id) THEN
SELECT *
FROM Prices JOIN Volume ON Prices.tick = Volume.tick AND Prices.date = Volume.date
JOIN Misc ... |
drop table sec_user_authorities_AUD;
drop table sec_user_authorities;
drop table sec_user_roles_AUD;
drop table sec_user_roles;
drop table sec_user_groups_AUD;
drop table sec_user_groups;
drop table sec_user_tokens_AUD;
drop table sec_user_tokens;
drop table sec_users;
drop table sec_users_AUD;
drop table sec_group_au... |
INSERT INTO cluster_features
VALUES (
'00000020-0020-0020-0020-000000000300',
'libgfapi_supported',
'4.1',
1,
'Native Access on gluster storage domain'
);
|
<reponame>abdoulboubacar/maconso-api<filename>state.sql
INSERT INTO public.energie_state (id, value, diff, unit_price, deal_id, date) VALUES (1, 345, 345, 0.1494, 1, '2017-04-28 21:43:21.436000');
INSERT INTO public.energie_state (id, value, diff, unit_price, deal_id, date) VALUES (2, 350, 5, 0.1494, 1, '2017-04-29 21:... |
<gh_stars>1-10
INSERT INTO Configuration (Field, Value) VALUES ('CONHOST', 'CONvergence Dev');
INSERT INTO Configuration (Field, Value) VALUES ('ADMINEMAIL', '');
INSERT INTO Configuration (Field, Value) VALUES ('FEEDBACK_EMAIL', '');
INSERT INTO Configuration (Field, Value) VALUES ('SECURITY_EMAIL', '');
INSERT INTO C... |
<reponame>nipunn1313/crates.io
CREATE EXTENSION IF NOT EXISTS pgcrypto;
ALTER TABLE api_tokens
ALTER COLUMN token
TYPE bytea USING decode(token, 'escape');
CREATE UNIQUE INDEX ON api_tokens (token);
|
<filename>updates/mimeo--1.2.1--1.2.2.sql
-- New function "check_missing_source_tables()" can show tables that exist on the configured data sources that are not configured for replication.
-- Provides monitoring capability for situations where all tables on source should be replicated.
-- Optional parameter to ... |
select oid, gp_segment_id, conname from pg_constraint where conrelid = 'pg_part_table_1_prt_2_2_prt_usa'::regclass and conname ~'usa';
select oid, gp_segment_id, conname from gp_dist_random('pg_constraint') where conrelid = 'pg_part_table_1_prt_2_2_prt_usa'::regclass and conname ~'usa';
|
<filename>dbmyapp.sql
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.4.6-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 10.2.0.5599
-- --------------------------... |
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: csv_wi... |
-- @testpoint: opengauss关键字tstime非保留),作为索引名,部分测试点合理报错
--前置条件,创建一个表
drop table if exists explain_test;
create table explain_test(id int,name varchar(10));
--关键字不带引号-成功
drop index if exists tstime;
create index tstime on explain_test(id);
drop index tstime;
--关键字带双引号-成功
drop index if exists "tstime";
create index "tst... |
<filename>aryaEstructura.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 14-10-2021 a las 15:37:13
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "... |
SELECT x, SUM(z) AS zs FROM t1 WHERE zs > 0 GROUP BY x
|
<filename>Banco de dados/testesolusoftpopulado.sql
-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64)
--
-- Host: localhost Database: testesolusoft
-- ------------------------------------------------------
-- Server version 5.7.23-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... |
<reponame>Doarakko/otoko-banzuke<gh_stars>0
CREATE TABLE channels
(
channel_id text NOT NULL,
name text NOT NULL,
description text NOT NULL,
thumbnail_url text NOT NULL,
view_count int DEFAULT 0 NOT NULL,
video_count int DEFAULT 0 NOT NULL,
subscriber_count int DEFAULT 0 NOT NULL,
create... |
-- phpMyAdmin SQL Dump
-- version 4.2.3
-- http://www.phpmyadmin.net
--
-- Хост: localhost:3306
-- Время создания: Фев 27 2016 г., 14:59
-- Версия сервера: 5.5.34
-- Версия PHP: 5.5.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- База данных: `urlshortener_db`
--
CREATE DATABASE IF NOT EXIS... |
<reponame>ilyavovnenko/shops_categories_ms<gh_stars>0
-- +migrate Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE attributes (
id bigint unsigned auto_increment primary key,
category_id bigint unsigned not null,
type ... |
<reponame>premieregaming/ignyte-ux-sandbox
DROP TABLE IF EXISTS public.post_likes;
CREATE TABLE public.post_likes (
post_id uuid not null,
user_id uuid not null
);
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Nov 03, 2019 at 06:56 AM
-- Server version: 5.7.26
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
-- phpMyAdmin SQL Dump
-- version phpStudy 2014
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2015 年 01 月 24 日 17:14
-- 服务器版本: 5.5.40
-- PHP 版本: 5.3.29
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARA... |
<gh_stars>0
/*
Object: dbo.Query_100
Transaction: MAA:MAN
*/
CREATE PROCEDURE [dbo].[Query_100]
@HeaderID AS bigint
AS
SET NOCOUNT ON;
DECLARE @SQL AS nvarchar(MAX) = N'
INSERT INTO ipi.IPMembership
(RowID, ID, NID, SocietyCode, SocietyName, CCCode, RoleCode, RightCode, ValidFromDate, ValidFromTime, ValidToDa... |
SET DEFINE OFF;
ALTER TABLE AFW_13_MENU ADD (
CONSTRAINT AFW_13_MENU_PK
PRIMARY KEY
(SEQNC)
ENABLE VALIDATE)
/
|
INSERT INTO [dbo].[Users]
VALUES (N'35cbb28b-7c43-434a-8b01-37e5e33a7fad',N'<EMAIL>', N'<EMAIL>', N'<EMAIL>', N'<EMAIL>', 0, N'AQAAAAEAACcQAAAAEDUzfNdBpI8aCiJv9r/cYhGqRzU8JDzFQppvvYK1wnI5KztrBehCqUf1w0UUMz7Q4w==', N'AD3HHBFDFG752ZAYZ3NMXQQA33DR425H', N'cf3815f1-b8f5-4963-abbf-1ff9c90f927b', NULL, 0, 0, NULL, 1, 0),
(N... |
CREATE TABLE "public"."student_final_signups"("student_id" integer NOT NULL, "final_id" integer NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("student_id","final_id") , FOREIGN KEY ("student_id") REFERENCES "public"."students"("id") ON UPDATE ca... |
<filename>IP and Scripts/Azure DW Load Scripts/Azure SQL DW Load Script Files/CTASLoad-Example.sql
/***This Artifact belongs to the Data Migration Jumpstart Engineering Team***/
-- STEP 1: Create a master key. Only necessary if one does not already exist.
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '<PASSWORD>!';
GO
-... |
/*[[
Show current top activities
--[[
@ALIAS: TOP
@VERSION: 11.0={}
--]]
]]*/
-- db info
SET feed off digits 3
/* oratop s0a*/
PROMPT DB INFO:
PROMPT ========
SELECT /*+ OPT_PARAM('_optimizer_adaptive_plans','false') */ /*+ NO_MONITOR */*
FROM (SELECT sys_context('USERENV', 'DB_UNIQUE_NAME') dbnm FROM d... |
<gh_stars>10-100
CREATE TABLE Minions
(
Id int PRIMARY KEY,
[Name] nvarchar(50),
Age int
)
CREATE TABLE Towns
(
Id int PRIMARY KEY,
[Name] nvarchar(50),
) |
-- file:subscription.sql ln:66 expect:true
ALTER SUBSCRIPTION testsub SET (slot_name = 'newname')
|
<filename>Tools/Collect-QueryInfo/SQL/02.バッチ実行数/Result.sql
SELECT
*
FROM
(
SELECT
server_name,
db_name,
DATEADD(HOUR, 9, collect_date) AS [time],
counter_name,
FORMAT(
COALESCE((cntr_value - LAG(cntr_value) OVER(PARTITION BY server_name, object_name, counter_name,instance_name ORDER BY collect_date ASC)... |
<reponame>Syscrystal007/library<gh_stars>0
CREATE DATABASE library;
USE library;
SET NAMES utf8;
START TRANSACTION;
CREATE TABLE `admin` ( `admin_id` BIGINT NOT NULL PRIMARY KEY, `password` VARCHAR ( 15 ) NOT NULL, `username` VARCHAR ( 15 ) DEFAULT NULL ) ENGINE = INNODB DEFAULT CHARSET = utf8;
INSERT INTO `admin`
VAL... |
<reponame>bitapihub/api-optimization-engine
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
INSERT INTO `sjrv_accounts` (`id`, `consumer_key`, `consumer_secret`, `access_level`, `max_calls`, `reset_usage`, `free_account_on`, `can_run_inactive`, `acl_type`, `link_back`, `js_calls_allowed`, `store_cred... |
<gh_stars>0
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
-- =============================================
-- Responsable: <NAME>
-- Ultima Modificación: 2018-07-18
-- Descripción: Obtener Seguridad por Usuario y Modulo
-- =============================================
CREATE FUNCTION [CNF].[fnSeguridadUsuarioMod... |
<gh_stars>0
CREATE TABLE ?SCHEMA?.XMLCUSTOMER
(
CID INT NOT NULL PRIMARY KEY,
INFO XML
);
INSERT
INTO ?SCHEMA?.XMLCUSTOMER VALUES
(
1000,
XMLPARSE (DOCUMENT '<?xml version="1.0" encoding="UTF-8"... |
<gh_stars>0
-- Databricks notebook source
-- MAGIC %md
-- MAGIC # Numbers for manuscript
-- MAGIC
-- MAGIC **Description**
-- MAGIC
-- MAGIC This notebook runs a list of `SQL` queries to extract the numbers (%) of each text entry in the `CCU013: COVID-19 Event Phenotypes` manuscript *"Understanding COVID-19 traject... |
alter table subgraphs.subgraph_manifest
add column new_id int
references subgraphs.subgraph_deployment(id) on delete cascade;
update subgraphs.subgraph_manifest m
set new_id = d.id
from subgraphs.subgraph_deployment d
where d.manifest = m.id;
alter table subgraphs.subgraph_manifest
drop co... |
<gh_stars>1000+
/* contrib/seg/seg--1.1.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION seg" to load this file. \quit
-- Create the user-defined type for 1-D floating point intervals (seg)
CREATE FUNCTION seg_in(cstring)
RETURNS seg
AS 'MODULE_PATHNAME'
L... |
<reponame>geophile/sql-layer
SELECT name, state, order_date, sku, ship_date, referral
FROM customers
INNER JOIN addresses ON customers.cid = addresses.cid
INNER JOIN orders ON customers.cid = orders.cid
INNER JOIN items ON orders.oid = items.oid
INNER JOIN shipments ON orders.oid = shipments.oid
INNER JOIN refe... |
<filename>scripts/schema.sql
-- "name" is stored as varchar to support variable length string with
-- no upper limit. "password" is stored as bytea to support the bcrypt implementation.
-- The Go implementation outputs the hash in base64 format which makes varchar an alternative
-- to bytea in our case. I still choos... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 23, 2018 at 09:56 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 19 Jun 2021 pada 08.32
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<reponame>pradeepkumarcm-egov/DIGIT-Dev
alter table eg_applicationindex add column sla integer;
alter table eg_applicationindex add column slagap integer;
--alter table eg_applicationindex drop column sla;
--alter table eg_applicationindex drop column slagap; |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 26, 2019 at 02:50 PM
-- Server version: 5.7.26-0ubuntu0.16.04.1
-- PHP Version: 7.0.33-0ubuntu0.16.04.4
CREATE DATABASE IF NOT EXISTS smart_home;
USE smart_home;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"... |
-- analyze2.test
--
-- execsql {
-- DROP TABLE IF EXISTS t4;
-- CREATE TABLE t5(a, b); CREATE INDEX t5i ON t5(a, b);
-- CREATE TABLE t6(a, b); CREATE INDEX t6i ON t6(a, b);
-- }
DROP TABLE IF EXISTS t4;
CREATE TABLE t5(a, b); CREATE INDEX t5i ON t5(a, b);
CREATE TABLE t6(a, b); CREATE INDEX t6i ON t6(a, b)... |
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 80012
Source Host : 127.0.0.1:3306
Source Database : tp_layim
Target Server Type : MYSQL
Target Server Version : 80012
File Encoding : 65001
Date: 2020-11-21 09:46:02
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... |
<reponame>tbolis/spring-oauth2-gateway
-- Initial Data
-- @formatter:off
-- Authorities
INSERT INTO auth_authority (NAME, DESCRIPTION) VALUES ('ROLE_ADMIN', 'System Administrator');
INSERT INTO auth_authority (NAME, DESCRIPTION) VALUES ('ROLE_USER', 'Authorized User');
-- Users
INSERT INTO auth_user (id, login, pass... |
<filename>source/exercises.sql<gh_stars>0
@exercises/exercise_1.sql
@exercises/exercise_2.sql
|
<reponame>zzsoszz/MyPaper<filename>database/oracle/plsql-utils-v170/ora/rss_util_pkg.pkb
create or replace package body rss_util_pkg
as
/*
Purpose: Package handles web feeds (RSS/Atom)
Remarks:
Who Date Description
------ ---------- -------------------------------------
MBR 22.01... |
<filename>migrations/2018-04-08-160446_audit_log/down.sql
DROP TABLE audit_log;
|
/*
Table that creates a debit record to Discounts Refunds Given and a credit record to the specified income account.
*/
--To disable this model, set the using_credit_memo variable within your dbt_project.yml file to False.
{{ config(enabled=var('using_credit_memo', True)) }}
with credit_memos as (
select *
fr... |
<gh_stars>1000+
select if(number>1, true, false) from numbers(3) order by number;
select if(number>1, number, 1) from numbers(3) order by number;
select if(number<1, 2, number) from numbers(3) order by number;
select if(number>0, 'Z+', 'zero') from numbers(3) order by number;
select if(number<1, true, null) from number... |
<reponame>germanohaus/crud-api-pets
/***************************** owner ****************************/
INSERT INTO [dbo].owner (name) values ('<NAME>')
go
INSERT INTO [dbo].owner (name) values ('<NAME>')
go
INSERT INTO [dbo].owner (name) values ('<NAME>')
go
/***************************** cats ***********************... |
<reponame>Pacotreflip/salonesupiicsa.com.mx
-- MySQL Script generated by MySQL Workbench
-- 03/31/16 12:03:24
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @... |
<reponame>nitikornearthcm/create_qrcode_url<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 100422
Source Host : localhost:3306
Source Schema : url_db
Target Server Type : MySQL
Target Server Version : 100... |
CREATE TABLE [dbo].[InvoiceLinks]
(
[Id] INT IDENTITY (1, 1) NOT NULL,
[LinkId] NVARCHAR(50) NOT NULL,
[InvoiceId] INT NOT NULL,
[Expired] BIT NOT NULL,
CONSTRAINT [PK_InvoiceLinkss] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_InvoiceLinks_Invoices] FOREIGN KEY ([InvoiceId]) REFERE... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 16, 2020 at 01:52 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
CREATE TABLE [dbo].[Keys] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Active] BIT NOT NULL,
[Code] NVARCHAR (64) NOT NULL,
[Group] NVARCHAR (32) NULL,
[Name] NVARCHAR (64) NOT NULL,
[Tags] NVARCHAR (MAX) NULL,
[TeamId] INT NOT NULL,
[Notes]... |
use employee_db;
INSERT INTO department(department_name) VALUES
INSERT INTO roles(title, salary, department_id) VALUES ('IT Director', 120000, 1), ('App Manager', 80000, 1), ('App Admin', 65000, 2), ('App Developer', 75000, 2), ('App Analyst', 55000, 3), ('Senior Software Developer', 90000, 3), ('Office Assistant', 63... |
<filename>databanjarsurabya.sql
/*
SQLyog Enterprise - MySQL GUI v7.02
MySQL - 5.5.5-10.1.9-MariaDB : Database - databanjarsurabaya
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREI... |
<filename>db/DMS_INSERT_ROLES_MIGRATION.sql
INSERT INTO `roles` (`name`)
VALUES ('admin');
INSERT INTO `roles` (`name`)
VALUES ('user'); |
#设置客户端连接的编码
SET NAMES UTF8;
#丢弃数据库
DROP DATABASE IF EXISTS yijia;
#创建数据库
CREATE DATABASE yijia CHARSET=UTF8;
#进入数据库
USE yijia;
#创建保存用户数据的表
CREATE TABLE yijia_user(
uid INT PRIMARY KEY AUTO_INCREMENT,
uname VARCHAR(50),
upwd VARCHAR(32),
gender BOOL,
birthday DATE,
user_name VARCH... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.4
-- Dumped by pg_dump version 12.3
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', fal... |
CREATE DEFINER=`root`@`localhost` PROCEDURE `prc_getActiveCronJobCommand`(IN `p_CompanyID` INT, IN `p_CronJobID` INT)
BEGIN
SELECT
tblCronJobCommand.Command,
tblCronJob.CronJobID
FROM tblCronJob
INNER JOIN tblCronJobCommand
ON tblCronJobCommand.CronJobCommandID = tblCronJob.CronJobCommandID
WHERE tblCronJob.... |
<filename>samples/features/sql-big-data-cluster/data-virtualization/hadoop/product-reviews-hdfs-orc.sql<gh_stars>1-10
USE sales
GO
-- Create data source for HDFS inside SQL big data cluster using the HADOOP type.
-- The HADOOP data source type was introduced in SQL Server 2016 to query data in
-- Hadoop clusters and r... |
<gh_stars>1-10
/*
titulo: costo_segmento.sql
descripción: calcula el costo de un segmento
como la distancia absoluta de la cantidad de viviendas
al valor deseado
autor: -h
fecha: 2019-05-01 Mi
*/
drop function costo_segmento;
create or replace function costo_segmento (
segmento bigint,
deseado integer)
retur... |
INSERT INTO tweb_apbd(`lembaga_id`, `lembaga_kode`, `wilayah_kode`,`tahun`, `rekening_kode`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `updated_by`) VALUES
('37','1.15.01.','34','2014','1.15.1.15.01.00.00.4.','Pendapatan','321000000','0... |
--
-- Copyright (c) Microsoft Corporation. All rights reserved.
-- Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
--
--run this manually on Commerce DB in INT environment
use master
go
-- login should be created in master db
--sys.server_principals does not wor... |
INSERT INTO "Estudiante_U_Representante" ("id", "estudianteID", "representanteID") VALUES (1, 1, 1);
INSERT INTO "Estudiante_U_Representante" ("id", "estudianteID", "representanteID") VALUES (2, 2, 1);
INSERT INTO "Estudiante_U_Representante" ("id", "estudianteID", "representanteID") VALUES (3, 3, 1);
|
<filename>prisma/migrations/20220127030343_correction_field_company_id_is_required/migration.sql
/*
Warnings:
- Made the column `company_id` on table `accounts` required. This step will fail if there are existing NULL values in that column.
*/
-- AlterTable
ALTER TABLE "accounts" ALTER COLUMN "company_id" SET NOT... |
CREATE TABLE `pri_price` (
`price_id` int(11) NOT NULL AUTO_INCREMENT,
`route_id` varchar(50) DEFAULT NULL,
`vehicle_type_id` varchar(50) DEFAULT NULL,
`price` float(13) DEFAULT NULL,
`group_price_per_person` float(15) DEFAULT NULL,
`group_size` int(15) DEFAULT NULL,
PRIMARY KEY (`price_id`)
) E... |
-- job history
SET NOCOUNT ON;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
DECLARE @StartDate datetime;
SET @StartDate = CONVERT(datetime, '{0}', 120);
--SET @StartDate = CONVERT(datetime, '2016-11-02 05:28:00', 120);
WITH cteJobHistory AS (
SELECT
CONVERT(nvarchar(128), SERVERPROPERTY('ServerNam... |
CREATE TABLE IF NOT EXISTS `pre_setting` (
`name` VARCHAR(50) PRIMARY KEY,
`value` LONGTEXT NOT NULL
) ENGINE=InnoDB CHARSET=utf8mb4;
INSERT INTO `pre_setting` (`name`, `value`) VALUES
('appid', ''),
('appsecret', ''),
('promotion', '[{"k":50,"v":10}]'),
('img_swiper', '["\\/static\\/uploads\\/default\\/banner_1.... |
DELETE FROM partner_proof WHERE proof_template_id IN (SELECT id FROM bpa_proof_template);
DELETE FROM bpa_proof_template; |
DROP TABLE IF EXISTS `shuyang_book_reply`;
|
Use hospital;
Create Table WardDetails(
Ward_no int primary key auto_increment,
Ward_Type varchar(50) not null,
Ward_Contact varchar(20) not null
) ;
Insert into warddetails(Ward_Type,Ward_Contact) values ('General', '0731-6789023');
Insert into warddetails(Ward_Type,Ward_Contact) values ('Private', '0731-6789045');
... |
ALTER TABLE `team_accounts`
DROP FOREIGN KEY `FK_account_id`;
ALTER TABLE `team_accounts`
ADD CONSTRAINT `FK_account_id`
FOREIGN KEY (`account_id`)
REFERENCES `account` (`id`)
ON DELETE CASCADE;
|
<reponame>raster-foundry/raster-foundry
ALTER TABLE public.annotation_label_classes
ADD COLUMN "is_active" BOOLEAN NOT NULL DEFAULT TRUE;
ALTER TABLE public.annotation_label_class_groups
ADD COLUMN "is_active" BOOLEAN NOT NULL DEFAULT TRUE; |
delete from user_permissions;
delete from users;
delete from apps;
delete from permissions;
-- Default apps
-- TODO: This could be broken up into a file for each app, and live
-- in the app's directory.
insert into apps (app_name) values ('UserAdmin');
insert into apps (app_name) values ('PosdaCuration');
insert... |
ALTER TABLE `processes` DROP `resource_type`;
|
<reponame>WeilerWebServices/PostgreSQL<filename>pgAdmin/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/msql_create_domain_numeric.sql
CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
AS numeric(5,2)
DEFAULT 3
NOT NULL;
ALTER DOMAIN public."Dom1_$%{}[]()&*^!@""... |
<filename>contrib/babelfishpg_tsql/sql/sys_procedures.sql
CREATE PROCEDURE sys.sp_unprepare(IN prep_handle INTEGER)
AS 'babelfishpg_tsql', 'sp_unprepare'
LANGUAGE C;
GRANT EXECUTE ON PROCEDURE sys.sp_unprepare(IN INTEGER) TO PUBLIC;
CREATE PROCEDURE sys.sp_prepare(INOUT prep_handle INTEGER, IN params varchar(8000),
... |
/*
First derived from View "mgd.mgi_note_allele_view"
~ 2 ninutes
*/
SELECT
nav._note_key,
nav._object_key as mgi_internal,
--n._mgitype_key,
--n._notetype_key,
--n._createdby_key,
--n._modifiedby_key,
--n.creation_date,
--n.modification_date,
nav.notetype,
nav.note,
--c.sequ... |
<gh_stars>1-10
-- create class using Constraints null,Unique and DEFAULT
create table t1 (
c1 int DEFAULT 9 null Unique
);
drop t1; |
<reponame>ervinne13/wof_erp_reports<filename>dump/20160408 JO - Table Script.sql<gh_stars>0
/*
Created: 4/5/2016
Modified: 4/7/2016
Model: JO
Database: PostgreSQL 9.2
*/
-- Create tables section -------------------------------------------------
-- Table tblCOM_JO
CREATE TABLE "tblCOM_JO"(
"JO_DocNo" Character var... |
<gh_stars>0
CREATE USER jtb_user;
CREATE DATABASE cities;
CREATE DATABASE university;
GRANT ALL PRIVILEGES ON DATABASE cities TO jtb_user;
GRANT ALL PRIVILEGES ON DATABASE university TO jtb_user; |
--adds a column with the frequency of each post across multiple reddits
drop table if exists scored_posts;
create table scored_posts as
select *,
count(id)over(partition by url) as Frequency
from posts;
--filters down to only the posts on more than one subreddit
drop table if exists duplicate_posts;
create table dup... |
-- --------------------------------------------------
-- Generated by Enterprise Architect Version 9.3.931
-- Created On : Wednesday, 07 October, 2015
-- DBMS : MySql
-- --------------------------------------------------
SET FOREIGN_KEY_CHECKS=0;
-- Drop Tables, Stored Procedures and Views
DR... |
<reponame>quantum13/mlbootcamp7<gh_stars>1-10
CREATE TABLE `qml_models` (
`model_id` int(11) NOT NULL AUTO_INCREMENT,
`cls` varchar(100) NOT NULL DEFAULT '',
`params` varchar(4000) NOT NULL DEFAULT '',
`descr` varchar(1000) NOT NULL DEFAULT '',
`predict_fn` varchar(200) NOT NULL DEFAULT 'predict',
`level` i... |
<filename>cinefx.sql
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : jeu. 13 juin 2019 à 22:31
-- Version du serveur : 5.7.21
-- Version de PHP : 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
<gh_stars>10-100
use master
GO
alter database [DatabaseName] set single_user with rollback immediate
GO
RESTORE DATABASE [DatabaseName] FROM DISK = N'd:\SQL-BACKUPS\DatabaseName.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10
GO
alter database [DatabaseName] set multi_user
GO |
-- Gets RRT Patients
SELECT DISTINCT stay_id FROM `physionet-data.mimic_derived.rrt` where dialysis_present = 1
|
/* Formatted on 12-20-2018 1:38:29 PM (QP5 v5.126.903.23003) */
/*
"C:\Program Files (x86)\pgAdmin 4\v3\runtime\pg_dump" --host localhost --port 5432 --username postgres --verbose --table=WKF.WKF_APPS --data-only --column-inserts psdc_live > WKF.WKF_APPS.sql
*/
set define off;
TRUNCATE TABLE WKF.WKF_APPS CASCADE;
INS... |
<reponame>ponekbladh/d365fo.blog
DROP workload GROUP AX_BATCH_WORKGROUP ON DATABASE
GO
DROP workload GROUP AX_ONLINE_WORKGROUP ON DATABASE
GO
ALTER workload GROUP "default" ON DATABASE
WITH (MIN_CPU_PERCENT = 100
,MAX_CPU_PERCENT = 100
,MIN_LOG_RATE_PERCENT = 100
,MAX_LOG_RATE_PERCENT = 100
,MIN_IOPS_PERC... |
<filename>res/sysbench/bulk_insert.sql<gh_stars>10-100
CREATE TABLE sbtest1 (
id INTEGER NOT NULL,
/*{{ rownum }}*/
k INTEGER DEFAULT '0' NOT NULL,
/*{{ rownum }}*/
PRIMARY KEY (id)
);
|
<gh_stars>0
CREATE schema `movies3`;
use `movies3`;
CREATE TABLE `Actor`(
`id` int NOT NULL AUTO_INCREMENT,
`name` nvarchar(50) NOT NULL,
PRIMARY KEY (`id`)
)ENGINE=InnoDB;
CREATE TABLE `Director`(
`id` int NOT NULL AUTO_INCREMENT,
`name` nvarchar(50) NOT NULL,
PRIMARY KEY (`id`)
)ENGINE=Inn... |
<reponame>franchb/ClickHouse
DROP TABLE IF EXISTS test.t;
create table test.t(d Date) engine MergeTree(d, d, 8192);
insert into test.t values ('2018-02-20');
select count() from test.t where toDayOfWeek(d) in (2);
DROP TABLE test.t;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.