sql stringlengths 6 1.05M |
|---|
<reponame>thiagocleonel/pontocrato<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Tempo de geração: 11/10/2018 às 20:30
-- Versão do servidor: 10.1.32-MariaDB
-- Versão do PHP: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSAC... |
CREATE TABLE `categories` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `category_images` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`image_id` int(10) unsigned DEF... |
<gh_stars>0
SELECT CONCAT('n = ', CAST(? AS DOUBLE)) |
<reponame>agustinwalas/rapiautos
-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64)
--
-- Host: localhost Database: rapiautos
-- ------------------------------------------------------
-- Server version 5.7.23-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_C... |
CREATE OR REPLACE VIEW vw_psa_uat_sb1_csa_vs_bpu AS
WITH
-- 05-Jan-2021, O.Khaykin: created.
psl as
(
SELECT /*+ materialize*/ psuid
FROM vw_psa_plan_sponsor_list
),
new_data AS
(
SELECT --+ materialize
psl.psuid,
bpu.control_cd,
bpu.suffix_cd,
bpu.account_cd,
bpu.p... |
<filename>db/eapi.sql
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 100113
Source Host : localhost:3306
Source Database : eapi
Target Server Type : MYSQL
Target Server Version : 100113
File Encoding : 65001
Date: 2018-05-14 14:12:11
*/
SET FOREIGN_KE... |
<filename>tests/static_example.sql
-- Here is an example static SQL query that makes use of a predefined SQL block
CREATE PROCEDURE [dbo].[_staticExample]
AS
SELECT
('[SqlBlock_
MakeJsonIntArray(AU.Id,,AdminUsers AU (NOLOCK))
_SqlBlock]') AS Integers
FROM AdminUsers AU (NOLOCK) |
<filename>docs/concepto_old_working.sql
-- phpMyAdmin SQL Dump
-- version 4.0.10.15
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 22, 2016 at 04:49 PM
-- Server version: 5.5.37
-- PHP Version: 5.6.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
/* Replace with your SQL commands */
-- CREATE DOMAIN gender CHAR(1)
-- CHECK (VALUE IN ( 'M', 'F'));
CREATE TABLE IF NOT EXISTS users (
id VARCHAR(100) NOT NULL,
name VARCHAR,
username VARCHAR (50) NOT NULL,
password VARCHAR (255) NOT NULL,
email VARCHAR (255) NOT NULL,
telephone VARCHAR(... |
<reponame>gklundt/SQLServerScripts
with c (blocking_session_id, session_id) as (
select blocking_session_id, session_id
from sys.dm_exec_requests
)
, tails as (
select blocking_session_id, session_id
from c blockers
where blocking_session_id <> 0
and not exists(
select 1
from c
where c.blocking_session_... |
CREATE FUNCTION [dbo].[ufnGetDocumentStatusText](@Status [tinyint])
RETURNS [nvarchar](16)
AS
-- Returns the sales order status text representation for the status value.
BEGIN
DECLARE @ret [nvarchar](16);
SET @ret =
CASE @Status
WHEN 1 THEN N'Pending approval'
WHEN 2 THEN N... |
<reponame>chengwenxin/sqlite-parser<gh_stars>1-10
SELECT myfunc (col, 1.2, 'str') AS "Super Func"
|
<gh_stars>1-10
-- FILE: bathrooms.sql
-- TITLE: AveNest Listings
-- AUTHORS: <NAME>
-- LAST MODIFIED: OCT 30, 2019
DROP TABLE IF EXISTS bathrooms;
CREATE TABLE bathrooms(
value SMALLINT PRIMARY KEY,
property TEXT NOT NULL
);
INSERT INTO bathrooms (value, property) VALUES (1, '1 B... |
<gh_stars>1-10
ALTER TABLE REGISTRERING_TILSTAND MODIFY UUID varchar2(36) null; |
<gh_stars>1-10
create table order_line_item_adjustments (
id serial primary key,
cord_ref text not null references cords(reference_number) on update restrict on delete restrict,
promotion_shadow_id integer not null references object_shadows(id) on update restrict on delete restrict,
adjustment_type gene... |
USE testbugucms;
-- ------------------------------
-- Database
-- ------------------------------
-- 数据库和用户已经指定,不要创建
-- 数据库
-- CREATE DATABASE `testbugucms` DEFAULT CHARACTER SET utf8;
-- create database testbugucms default character set utf8 collate utf8_general_ci;
-- 测试用户
-- CREATE USER 'test'@'localhost' IDENTIFIED... |
CREATE TABLE MAP (
ID INT PRIMARY KEY,
VERSION INT NOT NULL,
NAME VARCHAR(255),
LAST_MODIFIED_DATE TIMESTAMP NOT NULL
); |
--
-- Copyright 2005-2015 The Kuali Foundation
--
-- Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
--
-- Unless requi... |
<reponame>kevin-at-datical/liquibase-test-harness
CREATE FUNCTION test_function(id IN NUMBER) RETURN VARCHAR2 AS BEGIN RETURN '2'; END
/
DROP FUNCTION "C##LIQUIBASE".test_function |
<filename>EdFi.Ods.Utilities.Migration/Scripts/MsSql/02Upgrade/v25_to_v31/11 Create Constraints/40450 Course [PK, IX, D].sql
-- 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.
-- Se... |
<reponame>qingxiaohua/kewei
/*
Navicat MySQL Data Transfer
Source Server : study
Source Server Version : 50553
Source Host : localhost:3306
Source Database : fastadmin
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-10-31 18:44:51
*/
SET F... |
/*
Navicat Premium Data Transfer
Source Server : local
Source Server Type : MySQL
Source Server Version : 50717
Source Host : localhost
Source Database : mybatis
Target Server Type : MySQL
Target Server Version : 50717
File Encoding : utf-8
Date: 11/26/2017 12:36:03 PM... |
<reponame>ankit-16/perfetto<gh_stars>1-10
--
-- Copyright 2021 The Android Open Source 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 License at
--
-- https://www.apache.org/licenses/LI... |
--
-- insert...on conflict do unique index inference
--
create table insertconflicttest(key int4, fruit text);
--
-- Test unique index inference with operator class specifications and
-- named collations
--
create unique index op_index_key on insertconflicttest(key, fruit text_pattern_ops);
create unique index collati... |
<reponame>seguracarlos/avianca
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 26-04-2018 a las 19:40:13
-- Versión del servidor: 10.1.26-MariaDB
-- Versión de PHP: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACT... |
<reponame>Tanzu-Solutions-Engineering/BigDataRoadshow-labs
--3. Load data into HAWQ table
\timing
\echo 'Inserting data from external table to internal table'
insert into stage.car_sample_data
select * from stage.car_sample_data_ext;
\echo 'Analyzing the internal table'
analyze stage.car_sample_data;
\echo 'Count of... |
-- @testpoint:openGauss保留关键字maxvalue作为视图名
--不带引号-合理报错
CREATE or replace VIEW maxvalue AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_default';
--加双引号-创建成功
CREATE or replace VIEW "maxvalue" AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_default';
--清理环境
drop VIEW "maxvalue";
--加单引... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 07 Jan 2017 pada 05.59
-- Versi Server: 10.1.13-MariaDB
-- PHP Version: 5.5.37
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT... |
<gh_stars>0
ALTER TABLE entries ADD title VARCHAR(60);
|
<reponame>phirasit/StudentLocation
-- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64)
--
-- Host: localhost Database: CUDStudentLocationDB
-- ------------------------------------------------------
-- Server version 5.7.18-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!401... |
<reponame>RizkaAgustin/klhk<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 28, 2020 at 02:50 PM
-- 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";... |
select distinct org_deo , porganizacionideo.naziv(org_deo)
from stavka_dok sd , dokument d , PROIZVOD P , GRUPA_PR GPR
--from dokument d , stavka_dok sd , PROIZVOD P , GRUPA_PR GPR
Where
-- veza tabela
sd.godina (+)= d.godina
and sd.vrsta_dok (+)= d.vrsta_dok
and sd.broj_dok (+)= d.broj_dok... |
<reponame>cizmiak/ContractManagement
CREATE TABLE [dbo].[Entities] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[TableName] NVARCHAR (128) NULL,
[ParentEntityId] INT NULL,
CONSTRAINT [PK_Entity] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_Entity_Parent] FOREIGN KEY ([ParentEnt... |
<reponame>MateuxLucax/Lixeira-Inteligente
USE `**`;
CREATE TABLE IF NOT EXISTS `log` (
`id` INT PRIMARY KEY AUTO_INCREMENT,
`data` DATE NOT NULL,
`horario` TIME NOT NULL
);
CREATE TABLE IF NOT EXISTS `contador` (
`id` INT PRIMARY KEY AUTO_INCREMENT,
`quantidade` INT
);
DELIMITER $$
CREATE TRIGGER adi... |
<filename>Services.Packages/DAL/mysql_database.sql
/** Services.Packages.Package DROP Relation SPs **/
DROP PROCEDURE IF EXISTS `PaGetByApKe`;
GO
DROP PROCEDURE IF EXISTS `PaGetByApKePaged`;
GO
DROP PROCEDURE IF EXISTS `PaGetByApKeCount`;
GO
DROP PROCEDURE IF EXISTS `PaGetByOw`;
GO
DROP PROCEDURE IF EXISTS `PaGetB... |
insert into token (id, access_token, account_id, account_username, expires_in, refresh_token, token_type)
values (1, '<PASSWORD>', 55073425, 'ant<PASSWORD>ocesar', 2419200, '<PASSWORD>', 'bearer')
|
CREATE TABLE "instructors" (
"id" SERIAL PRIMARY KEY,
"name" varchar(30) UNIQUE NOT NULL
);
|
<reponame>sreeni619/solveathon
-- Prior to runnning these queries make sure the destination folder is appropriate exists and has permissions for postgres user to write into. Run the queries.sql file using "sudo -u postgres psql -d sslcdata -f queries.sql"
-- Query to get basic govt vs. pvt pass percentage
COPY (select... |
<filename>PPoShSqlTools/Public/New-SqlLogin.sql
IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'$(Username)')
BEGIN
IF ($(WindowsAuthentication) = 0)
BEGIN
PRINT 'CREATING USER $(Username) WITH PASSWORD'
CREATE LOGIN [$(Username)] WITH PASSWORD=N'$(Password)', DEFAULT_DATABASE=... |
SET_CONNECTION_PROPERTY AsyncDdlOperations=true;
SET_CONNECTION_PROPERTY AutoBatchDdlOperations=true;
CREATE TABLE invoiceline (
id INT64 NOT NULL,
uuid BYTES(16) NOT NULL,
created TIMESTAMP NOT NULL,
updated TIMESTAMP NOT NULL,
lineNumber INT64 NOT NULL,
amount FLOAT64 NOT NULL,
description STRING(100) NOT NU... |
SELECT DISTINCT CITY
FROM STATION
WHERE RIGHT(CITY,1) NOT IN ('a','e','i','o','u');
|
CREATE OR REPLACE FUNCTION ts.deletepublicationtranslator(_translatorid integer)
RETURNS void
LANGUAGE sql
AS $function$
DELETE FROM ndb.publicationtranslators AS pts
WHERE pts.translatorid = _translatorid;
$function$
|
set SERVEROUTPUT ON;
DECLARE
VISIT_ID_IN visit_history.visit_id%TYPE;
DP_ID_IN visit_history.dp_id%TYPE;
DOCTOR_ID_IN visit_history.doctor_id%TYPE;
VISIT_NOTES_IN visit_history.visit_notes%TYPE;
PASSWORD_IN varchar2(150);
VACCINE_ID_IN vaccine_patient.vaccine_id%TYPE;
PATIENT_ID_... |
DROP FUNCTION "public"."block_history_by_producer_type";
|
<gh_stars>1-10
create view _airbyte_test_normalization.`dedup_cdc_excluded_ab3__dbt_tmp` as (
-- SQL model to build a hash column based on the values of this record
select
md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(`name` as char), ''), '-', coalesce(cast(_ab_cdc_lsn as char), ''), '... |
CREATE DATABASE tecla_mercadolibre;
USE tecla_mercadolibre;
CREATE TABLE RolModel(
rol_id INT NOT NULL IDENTITY(1,1),
name VARCHAR(25) NOT NULL,
PRIMARY KEY(rol_id),
);
INSERT INTO RolModel(name) VALUES('user'); /* Este rol puede listar sus productos en la tienda, agregar su dirección */
INSERT INTO RolM... |
-- Item damage status.
-- DELETE FROM authorised_values WHERE category='DAMAGED';
-- damaged status of an item
INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES
('DAMAGED','1','Пошкоджено');
-- INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('DAMAGED','0','Не ушкоджено... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.6.17 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 9.3.0.4999
-- --------------------------------------------------------
/*... |
CREATE OR REPLACE PACKAGE pkg_vote
AS
/**
* Backend for Votes demo.
*
* Copyright (c) 2013 Tavendo GmbH. Licensed under the Apache 2.0 license.
*/
/**
* RPC/Event URI prefix
*/
BASEURI CONSTANT VARCHAR2(200) := 'http://tavendo.de/webmq/demo/vote#';
/**
* Get votes.
*/
FU... |
CREATE TABLE ofUser (
username VARCHAR(64) NOT NULL,
storedKey VARCHAR(32),
serverKey VARCHAR(32),
salt VARCHAR(32),
iterations INTEGER,
plainPassword VARCHAR(32),
encryptedPassword VARCHAR(255),
name VARC... |
<reponame>au-research/ANDS-Online-Services
-- Function: dba.udf_get_harvest_method_count(character varying, character varying)
-- DROP FUNCTION dba.udf_get_harvest_method_count(character varying, character varying);
CREATE OR REPLACE FUNCTION dba.udf_get_harvest_method_count(_date_filter character varying, _type_filt... |
<filename>database/init.sql
CREATE TABLE vor_obl_settlements (
id integer primary key,
district_title text,
settlement_id integer,
settlement_title text
);
|
// ===========================================================================
// PART 1 - GETTING COMFORTABLE IN SNOWFLAKE
//
// get to know some basic parts of Snowflake and play with some demo data.
// ===========================================================================
// set context
USE ROLE OKC_MEETUP_ROLE... |
<reponame>lihkin213/dex<gh_stars>1-10
-- +migrate Up
ALTER TABLE session ADD COLUMN "nonce" text;
|
CREATE TABLE Person (
id BIGINT NOT NULL ,
PRIMARY KEY ( id )
)
CREATE TABLE Phone (
id BIGINT NOT NULL ,
number VARCHAR(255) ,
person_id BIGINT ,
PRIMARY KEY ( id )
)
ALTER TABLE Phone
ADD CONSTRAINT PERSON_ID_FK
FOREIGN KEY (person_id) REFERENCES Person |
--
-- PostgreSQL database dump
--
-- Dumped from database version 14.2 (Debian 14.2-1.pgdg110+1)
-- Dumped by pg_dump version 14.2
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_cat... |
ALTER TABLE fcp_proposal ADD COLUMN fcp_start TIMESTAMP WITHOUT TIME ZONE;
ALTER TABLE fcp_proposal ADD COLUMN fcp_closed BOOLEAN NOT NULL;
|
ALTER TABLE previews ADD COLUMN sizes longtext NOT NULL;
|
--SERVER
create table t1(i int);
insert into t1 values (1), (2), (3), (4), (5);
create table t2(i int);
insert into t2 values (1), (2), (3), (4), (5);
create table t3(i int);
insert into t3 values (1), (2), (3), (4), (5);
update t3 inner join (t1, t2) t on t3.i=t.i set t.i=t.i + 1;
select * from t1 order by 1;
selec... |
<gh_stars>1-10
--TEST: pass different formats of date/timestamptz/datetimetz arguments to the 1st parameter
--TEST: 1. pass different formats of date arguments
select addtime(date'2010-10-08', time'9:19:29');
select addtime(date'12-12-25', time'9:19:29');
select addtime(date'8/30/99', time'9:19:29');
select addtim... |
<reponame>arogachev/sett1<filename>forum/sql/hot-topics.sql
SELECT * FROM (
SELECT DISTINCT ON (posts.topic_id)
topics.name AS topic_name,
posts.content AS last_post_content,
users.name AS last_post_author,
topics.created_at AS topic_created_at
FROM forum_posts AS posts
LEFT JOIN forum_topics AS t... |
<reponame>Quebe/Mercury-Care-Management
/*
IF EXISTS (SELECT name FROM sysobjects WHERE (name = 'PopulationProcess_ServiceEvents_Compliance' AND type = 'P'))
DROP PROCEDURE dbo.PopulationProcess_ServiceEvents_Compliance
GO
*/
CREATE PROCEDURE dbo.PopulationProcess_ServiceEvents_Compliance
/* STORED PROCE... |
DROP TABLE IF EXISTS note_associate;
DROP TABLE IF EXISTS user_batch;
DROP TABLE IF EXISTS associate;
DROP TABLE IF EXISTS note;
DROP TABLE IF EXISTS batch;
DROP TABLE IF EXISTS users;
DROP TYPE IF EXISTS ROLE;
DROP TYPE IF EXISTS SCORE; |
UPDATE "#__categories" AS "c"
SET published = c2.newPublished
FROM (
SELECT c2.id, CASE WHEN MIN(p.published) > 0 THEN MAX(p.published) ELSE MIN(p.published) END AS newPublished
FROM "#__categories" AS "c2"
INNER JOIN "#__categories" AS "p" ON p.lft <= c2.lft AND c2.rgt <= p.rgt
GROUP BY c2.id) AS c2
WHERE c2.id = c.id... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 28, 2018 at 03:13 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<filename>lisk_pool_scheme_db.sql
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 08, 2017 at 07:23 PM
-- Server version: 10.0.29-MariaDB-0ubuntu0.16.04.1
-- PHP Version: 7.0.15-0ubuntu0.16.04.4
use lisk;
SET SQL_MODE = "NO_AUTO_VALUE_ON_Z... |
CREATE TABLE `instance` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`GuidID` char(36) DEFAULT 'UUID()',
`Name` varchar(250) DEFAULT NULL,
`Object` longtext,
`Repository` varchar(150) DEFAULT NULL,
PRIMARY KEY (`Id`),
UNIQUE KEY `Id_UNIQUE` (`Id`),
UNIQUE KEY `GuidID_UNIQUE` (`GuidID`)
) ENGINE=InnoDB AUTO_I... |
--ELABORADO EN POSTGRE SQL
-- Tabla de Tipo Mascota
CREATE TABLE public.tipo_mascota
(
id_tipo_mascota integer NOT NULL DEFAULT nextval('tipo_mascota_id_tipo_mascota_seq'::regclass),
descripcion character varying(45) COLLATE pg_catalog."default",
CONSTRAINT tipo_mascota_pkey PRIMARY KEY (id_tipo_mascota)
)... |
SELECT ROUND(MIN(Lat_N), 4)
FROM Station
WHERE Lat_N > 38.7780;
|
<gh_stars>0
use `travelling_agency`;
-- inserting company table
insert into `company` value ("Travelling1@localhost",1345, "Travelling1", "ahmed","ebrahem",01229337950,"Tagmoo3","Egypt","","");
insert into `company` value ("Travelling2@localhost",1345, "Travelling2", "Omar","ebrahem",01229445500,"Tagmoo3","Egypt","","... |
SELECT DATE(data_hora)
FROM intervencao
WHERE YEAR(data_hora)='2015';
|
CREATE PROCEDURE dbo.WebShortUrl_Get
(
@Id int = -1,
@PageId int = -1,
@Name nvarchar(500) = NULL
)
AS
SET NOCOUNT ON
SELECT Id, Name, PageId
FROM WebShortUrl
WHERE (@Id=-1 OR Id = @Id)
AND (@PageId = -1 OR PageId=@PageId)
AND (@Name IS NULL OR Name=@Name)
RETURN |
USE [master]
GO
/****** Object: Database [MyDeadlockedDb] Script Date: 02-04-2018 23:19:29 ******/
CREATE DATABASE [MyDeadlockedDb]
GO
ALTER DATABASE [MyDeadlockedDb] SET COMPATIBILITY_LEVEL = 120
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [MyDeadlockedDb].[dbo].[sp_fulltext_database] @ac... |
Use AdventureWorks2014
Declare @DatabaseName NVARCHAR(128) = DB_Name()
-- No of Pages in Database
SELECT
file_id,
size AS NoPages
FROM sys.master_files
where type = 0
AND database_id = DB_ID(@DatabaseName)
Select
@DatabaseName,
DB_ID() as Database_Id,
o.object_id,
o.schema_id,
i.index_id,
pages.allocation_un... |
SELECT
t_id,
ori,
hali,
vali,
groesse,
ortschaftsname_pos_von,
pos
FROM
agi_plz_ortschaften.plzortschaft_ortschaftsname_pos
; |
<reponame>iloveloveyou/sql-diaries
--
-- Query to get total, used and free usage of tablesapces
--
-- @tested on: 10g
--
--
SELECT
NVL(b.tablespace_name, NVL(a.tablespace_name, 'UNKNOWN')) tablespace_name,
kbytes_alloc total,
kbytes_alloc - NVL(kbyte... |
<filename>src/scripts/mssql/02 Northwind-Lite-data.sql
use Northwind
go
SET IDENTITY_INSERT Customer ON
INSERT INTO [Customer] ([Id],[FirstName],[LastName],[City],[Country],[Phone])VALUES(1,'Maria','Anders','Berlin','Germany','030-0074321')
INSERT INTO [Customer] ([Id],[FirstName],[LastName],[City],[Country],[Phone])... |
<reponame>CSCfi/antero
USE [VipunenTK_SA]
GO
/****** Object: View [dbo].[v_sa_2_4_Amm_koulutuksen_tutkinnot] Script Date: 9.7.2021 11:27:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dbo].[v_sa_2_4_Amm_koulutuksen_tutkinnot] AS
-- truncate table vipunentk_dw..sa_2_4_Amm_koulutuksen_tu... |
create table product(id serial primary key, name varchar(20), cat_id int not null);
begin;
insert into product(name, cat_id) values ('Apples', 1);
insert into product(name, cat_id) values ('Oranges', 1);
insert into product(name, cat_id) values ('Bananas', 1);
insert into product(name, cat_id) values ('Carrots', 2);
in... |
-- 2018-11-20T18:12:59.775
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHea... |
ALTER TABLE db_version CHANGE COLUMN required_7092_01_mangos_player_xp_for_level required_7097_01_mangos_spell_proc_event bit;
-- (35100) Concussive Barrage (Rank 1)
DELETE FROM `spell_proc_event` WHERE `entry` IN (35100);
INSERT INTO `spell_proc_event` VALUES (35100, 0x00, 9, 0x00003001, 0x00000000, 0x00000000, 0x000... |
<reponame>Arkania/ArkCORE
/*
SQLyog Community v10.3
MySQL - 5.5.24-0ubuntu0.12.04.1 : Database - 22dev_ark
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
... |
-- page compose pages
SET @iMaxOrder = (SELECT `Order` + 1 FROM `sys_page_compose_pages` ORDER BY `Order` DESC LIMIT 1);
INSERT INTO `sys_page_compose_pages` (`Name`, `Title`, `Order`) VALUES ('bx_gsearch', 'Google Search', @iMaxOrder);
-- page compose blocks
INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc... |
<reponame>ketozhang/astroAPIServer
CREATE TABLE IF NOT EXIST planets (name text primary key, distance DECIMAL(10, 5));
INSERT INTO planets VALUES
("Mercury", 0.39),
("Venus", 0.72),
("Earth", 1.00),
("Mars", 1.52),
("Jupiter", 5.20),
("Saturn", 9.58),
("Uranus", 19.20),
("Neptune", 30.0... |
<filename>guns-admin/src/main/resources/DB/Comment.sql
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1028965473067581441', 'comment', 'user', '[0],[user],', '用户评论', '', '/comment', '99', '2', '1', NULL, '1', '0');
I... |
<filename>SampleSqlScripts/Additional/Stored Procedures/MealCalc_GoodRemains_LoadList.sql
CREATE PROCEDURE MealCalc_GoodRemains_LoadList
AS
SELECT
GoodID,
dbo.MealCalc_Good.GoodCategoryID AS [GoodCategoryID],
dbo.MealCalc_Good.Name AS [GoodName],
SUM(Quantity) - SUM(QuantityWrittenOff) AS [QuantityLeft],
SU... |
BEGIN;
SELECT plan(4);
SELECT lives_ok($$SELECT randombytes_random()$$, 'randombytes_random');
SELECT lives_ok($$SELECT randombytes_uniform(10)$$, 'randombytes_uniform');
SELECT lives_ok($$SELECT randombytes_buf(10)$$, 'randombytes_buf');
SELECT randombytes_new_seed() bufseed \gset
SELECT lives_ok(format($$SELECT rand... |
<gh_stars>0
/* ==================== T_OPERACIONES ==================== */
set define off
declare
type t_clob is table of clob index by binary_integer;
l_clob t_clob;
type t_varchar2 is table of varchar2(64) index by binary_integer;
l_varchar2 t_varchar2;
begin
null;
-- start generation of rec... |
<gh_stars>0
ALTER TABLE representative ADD phone_numbers json;
ALTER TABLE representative ADD emails json; |
/*
Navicat MySQL Data Transfer
Source Server : local host
Source Server Version : 50726
Source Host : localhost:3306
Source Database : business_document
Target Server Type : MYSQL
Target Server Version : 50726
File Encoding : 65001
Date: 2019-10-11 18:01:38
*/
SET FOREIGN_KEY_CHEC... |
--CREATE TABLE #cb ( cb_ID INT IDENTITY(1,1),--sequence of entries 1..n
-- Et VARCHAR(10), --entryType
-- amount money)--quantity
--INSERT INTO #cb(et,amount) SELECT 'balance',465.00
-- INSERT INTO #cb(et,amount) SELECT 'sale',56.00
-- INSERT INTO #cb(et,amount) SELECT 'sale',434.30
--... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 20, 2022 at 11:59 AM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 8.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
USE CMS;
SELECT FirstName, LastName FROM Customers;
SELECT Email FROM Customers WHERE LastName IN ("Smith", "Gupta");
SELECT MIN(CustomerId) FROM Customers;
SELECT MIN(CustomerId) FROM Customers GROUP BY AddressLine3;
SELECT COUNT(AddressLine3), AddressLine3
FROM Customers
GROUP BY AddressLine3
HAVING COUNT(AddressL... |
<filename>BD/DumpBaseDados.sql
/*================================================================================*/
/* DDL SCRIPT */
/*================================================================================*/
/* Title : ... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 16, 2019 at 10:16 AM
-- Server version: 10.1.22-MariaDB
-- PHP Version: 7.1.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 26, 2022 at 06:40 AM
-- Server version: 5.7.34
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@... |
UPDATE actionexporter.template
SET content = '<#list actionRequests as actionRequest>' ||
'${(actionRequest.address.line1?trim)!}:' ||
'${(actionRequest.address.line2?trim)!}:' ||
'${(actionRequest.address.postcode?trim)!}:' ||
'${(actionRequest.address.townName?trim)!}:' ||
'${(actionRequest.address.locality?trim)!}:'... |
DELETE FROM AccountInformation WHERE email=$email |
<reponame>WeilerWebServices/PostgreSQL<filename>pgAdmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/grant_function.sql
{# ===== Grant Permissions on Database Objects Selected ==== #}
{% import 'macros/functions/privilege.macros' as PRIVILEGE_FUNCTION %}
{% for obj in data.objects -%}
{% for priv in data... |
<filename>core-services/egov-user/src/main/resources/db/migration/seed/V20170829142108__collection_role_collectionoperator.sql
INSERT INTO EG_ROLE (ID,NAME,DESCRIPTION,CREATEDDATE,CREATEDBY,LASTMODIFIEDBY,LASTMODIFIEDDATE, VERSION,CODE,TENANTID)
values(nextval('seq_eg_role'),'Collection Operator','Can Create, Search a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.