sql stringlengths 6 1.05M |
|---|
<reponame>abitmore/hivemind<filename>hive/db/sql_scripts/bridge_get_account_posts_by_payout.sql
DROP FUNCTION IF EXISTS bridge_get_account_posts_by_payout;
CREATE FUNCTION bridge_get_account_posts_by_payout( in _account VARCHAR, in _author VARCHAR, in _permlink VARCHAR, in _limit SMALLINT )
RETURNS SETOF bridge_api_po... |
<reponame>AbhishekMali21/VTU-CSE-ISE-LAB-SOLUTIONS
INSERT INTO LIBRARY_BRANCH VALUES(10,'RR NAGAR','BANGALORE');
INSERT INTO LIBRARY_BRANCH VALUES(11,'RNSIT','BANGALORE');
INSERT INTO LIBRARY_BRANCH VALUES(12,'RAJAJI NAGAR','BANGALORE');
INSERT INTO LIBRARY_BRANCH VALUES(13,'NITTE','MANGALORE');
INSERT INTO LIBRARY... |
<gh_stars>100-1000
CREATE FUNCTION array_unique(anyarray)
RETURNS anyarray
stable
returns null on null input
parallel safe
language sql
AS $$
SELECT array_agg(DISTINCT x ORDER BY x) FROM unnest($1) t(x);
$$;
|
-- 2019-10-28T09:53:36.966Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAdvancedText,Is... |
--
-- NOTE: if you have temporary stored data in table `script_localized_texts` make sure to make backup of this before running this update!
-- Also note if you have any texts in current script_texts and they are not using entries valid for *_texts table, you _will_ get error messages on startup.
--
-- drop obsolete t... |
CREATE TABLE warehouseshop (
id CHAVE NOT NULL,
id_shop CHAVE NOT NULL,
id_warehouse CHAVE NOT NULL,
CONSTRAINT pk_warehouseshop PRIMARY KEY (id)
); |
<filename>install/protected/install.sql
DROP TABLE IF EXISTS `ExternalLogin`;
CREATE TABLE `ExternalLogin` (
`externalLoginID` int(10) unsigned NOT NULL auto_increment,
`publisherPlatformID` int(10) unsigned default NULL,
`platformID` int(10) unsigned default NULL,
`username` varchar(45) default NULL,
... |
<reponame>jitendrapatidar/ShopBridge
CREATE TABLE [dbo].[tblUserMaster](
[Id] [int] IDENTITY(1,1) NOT NULL,
[FullName] [nvarchar](150) NULL,
[UserName] [nvarchar](50) NULL,
[Password] [nvarchar](18) NULL,
[HasPassword] [nvarchar](max) NULL,
[IsActive] [bit] NULL,
[OnDate] [datetime2](7) NULL,
CONSTRAINT [PK_t... |
<reponame>rakam-io/segment<gh_stars>0
{% macro concat(fields) %}
{{ adapter_macro('segment.concat', fields) }}
{% endmacro %}
{% macro default__concat(fields) -%}
concat({{ fields|join(', ') }})
{%- endmacro %}
{% macro alternative_concat(fields) %}
{{ fields|join(' || ') }}
{% endmacro %}
{% macro reds... |
-- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Waktu pembuatan: 14. Desember 2021 jam 14:25
-- Versi Server: 5.1.36
-- Versi PHP: 5.3.0
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `warnasol`
--
-- --------------------------------------------------------
--
... |
<reponame>piraz/intrac
-- Nutrac database
DROP DATABASE IF EXISTS <NUTRAC_DB>;
CREATE DATABASE <NUTRAC_DB> WITH
OWNER = <NUTRAC_USER>
TEMPLATE = template0
ENCODING = 'UTF-8';
GRANT ALL ON DATABASE <NUTRAC_DB> TO <NUTRAC_USER>;
ALTER SCHEMA public OWNER TO <NUTRAC_USER>;
|
<reponame>jianbingfang/xhf
CREATE TABLE BPM_CATEGORY(
ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL,
NAME VARCHAR(200),
PRIORITY INTEGER,
CONSTRAINT PK_BPM_CATEGORY PRIMARY KEY(ID)
);
|
create or replace
PACKAGE INGEST as
PROCEDURE updateStorage(totalSize in NUMBER, lastMod in NUMBER, engineId in NUMBER);
FUNCTION getEngine(engineType in VARCHAR2, totalSize in NUMBER) return Integer;
END INGEST;
/
create or replace
PACKAGE BODY INGEST AS
procedure updateStorage(totalSize in NUMBER, lastMod in... |
-- *****************************************************************************
-- *** ***** CreateParameterMenu Tables ***
-- *****************************************************************************
CREATE TABLE F_HOSTGROUP_VAR
(
ROW_ID %INT% ... |
DROP TABLE service;
DROP TABLE service_group;
DROP TABLE supervisor;
DROP TABLE deployment;
|
CREATE OR REPLACE FUNCTION jobcenter.retry_job(a_job_id bigint, a_reason text DEFAULT ''::text)
RETURNS text
LANGUAGE plpgsql
SECURITY DEFINER
SET search_path TO jobcenter, pg_catalog, pg_temp
AS $function$DECLARE
v_workflow_id int;
v_task_id int;
v_job_finished timestamp with time zone;
v_state job_state;
BEGI... |
<reponame>lol768/tabula
--- TAB-1787
alter table Member add assistantsgroup_id nvarchar2(255);
create index idx_StaffMember_assistants on Member (assistantsgroup_id); |
use civi;
SELECT id, do_not_email, is_opt_out, preferred_language,first_name,last_name,gender_id,birth_date,created_date,modified_date
FROM civicrm_contact WHERE CONTACT_TYPE='Individual' AND is_deleted = 0 |
CREATE TABLE IF NOT EXISTS tempo (
tempo_key SERIAL PRIMARY KEY,
mes INT,
ano INT
);
CREATE TABLE IF NOT EXISTS lugar (
lugar_key SERIAL PRIMARY KEY NOT NULL,
latitude character varying(50),
longitude character varying(50),
cidade character varying(50),
logradouro character varying(256)... |
BEGIN TRANSACTION;
CREATE TABLE [AdviseSets] (
[Id] INTEGER NOT NULL,
[Name] ntext NOT NULL,
CONSTRAINT [sqlite_master_PK_AdviseSets] PRIMARY KEY ([Id]),
CONSTRAINT [sqlite_master_UC_AdviseSets] UNIQUE ([Name])
);
ALTER TABLE [Discs] ADD [AdviseSet_Id] REFERENCES [AdviseSets] ([Id]) ON DELETE NO ACTI... |
SELECT name, order_date
FROM customers INNER JOIN orders ON customers.cid = orders.cid
WHERE name = SUBSTR(name, NULL, 10)
|
<reponame>PRAKASHBOSCO/travel-booking
INSERT INTO `gmz_page` (`id`, `post_title`, `post_slug`, `post_content`, `thumbnail_id`, `status`, `author`, `created_at`, `updated_at`) VALUES
(7, '[:en]Lorem Ipsum is simply dummy[:vi]New page 1612168759[:]', 'lorem-ipsum-is-simply-dummy', '[:en]<h2>What is Lorem Ipsum?</h2><p cl... |
<reponame>anasmisbah/kasir
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 06 Feb 2020 pada 04.17
-- Versi server: 10.4.8-MariaDB
-- Versi PHP: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00"... |
USE [ZEUS]
GO
-------------------------------------------------------------------------------
PRINT 'Debut PROCEDURE'
GO
-------------------------------------------------------------------------------
/****** Object: StoredProcedure [ssis].[PackageRunTime] Script Date: 01/06/2020 19:29:04 ******/
DROP PROCEDU... |
CREATE TABLE [dbo].[Transactions] (
[id] INT IDENTITY (1, 1) NOT NULL,
[ItemId] INT NOT NULL,
[TransactionDate] DATETIME NOT NULL,
[IsActive] BIT CONSTRAINT [DF_Transactions_IsActive] DEFAULT ((1)) NOT NULL,
[C... |
/*
DROP FUNCTION [dbo].[hlsyscal_fn_calculate_difference_formatted]
*/
CREATE FUNCTION [dbo].[hlsyscal_fn_calculate_difference_formatted]
(
@caseid_casedefid INT = 0,
@calendarid INT,
@fromtime_utc DATETIME,
@totime_utc DATETIME
)
RETURNS TABLE AS RETURN
(
-- ==========================================
--... |
<reponame>AphgaDesign/programmation-app-web-transactionnelle<filename>SQL/Contacts.sql
CREATE TABLE contacts (
id INTEGER PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
nom TEXT NOT NULL,
prenom TEXT NOT NULL
);
CREATE TABLE types_adresse (
code CHAR(3) PRIMARY KEY,
description TEXT NOT NULL
);
INSERT INTO types_adres... |
-- alter2.test
--
-- execsql {
-- CREATE TABLE abc2(a, b, c);
-- INSERT INTO abc2 VALUES(1, 2, 10);
-- INSERT INTO abc2 VALUES(3, 4, NULL);
-- INSERT INTO abc2 VALUES(5, 6, NULL);
-- CREATE VIEW abc2_v AS SELECT * FROM abc2;
-- SELECT * FROM abc2_v;
-- }
CREATE TABLE abc2(a, b, c);
... |
<gh_stars>10-100
-- file:numeric.sql ln:193 expect:true
INSERT INTO num_exp_sub VALUES (4,2,'42137953.627297047')
|
<filename>test/fixtures/cli/passing_b.sql
SELECT
tbl.name,
b.value,
/*
This is a block comment
*/
d.something, -- Which a comment after it
tbl.foo,
c.val + b.val / -2 AS a_calculation
FROM tbl
INNER JOIN b ON (tbl.common_id = b.common_id)
JOIN c ON (tbl.id = c.id)
LEFT JOIN d ON (tbl.... |
<filename>tests/datetime.test/t04.sql
select cast('20170816 qqqqqqq' as datetime)
select cast('20170816 qqqqqqq' as datetime)
select cast('20170816 qqqqqqq' as datetime)
select cast('20170816 qqqqqqq' as datetime)
select cast('20170816 qqqqqqq' as datetime)
|
--------------------------------------------------------------------------------
--
-- 2016-07-14, NV - rest.jva.sql
--
--
prompt ... running rest.jva.sql
--
alter session set current_schema = ws;
--
set define off
create or replace and compile java source named "rest" as
package oracle.mti.ws;
//
import java.io.... |
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 23, 2016 at 07:19 AM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
USE BonFoodTracker19
Go
-- eliminate dupe foods quickly with a new cte thingy i just learned...
-- http://www.sqlservertutorial.net/sql-server-basics/delete-duplicates-sql-server/
-- https://stackoverflow.com/questions/26908234/how-to-assign-cte-value-to-variable
WITH cte AS (
SELECT Food_ID AS Food_ID,
ROW_... |
<gh_stars>0
SELECT DISTINCT CITY
FROM STATION
WHERE CITY REGEXP '^[a,e,i,o,u]';
/* regexp means "regular expression"
^ etar mane "matches beginning of the string"
jodi ^ bracket er vitore thakto e.g, [^abc] eta mane "any characted not listed between the brackets" */ |
<reponame>uhhernadez/procesamientoDeDatos2022A
SELECT first_name FROM contacts WHERE first_name>'B' AND first_name < 'C' ORDER BY first_name; |
<reponame>Alexandra-Penner/DScourseS18
CREATE TABLE "FL_insurance" (
PolicyID int,
statecode char(2),
county varchar(100)
eq_site_limit int,
hu_site_limit int,
fl_site_limit int,
fr_site_limit int,
tiv_2011 decimal,
tiv_2012 decimal,
eq_site_deductible decimal,
hu_site_deduct... |
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `test` CASCADE;
CREATE TABLE `test` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(32) DEFAULT NULL,
`status` bigint(20) unsigned NOT NULL DEFAULT '0',
`datecreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQ... |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 23 Apr 2019 pada 06.59
-- Versi server: 10.1.34-MariaDB
-- Versi PHP: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
CREATE TABLE IF NOT EXISTS contacts(
id CHAR(36) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL,
customers_id CHAR(36) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL,
contactdetails_id CHAR(36) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL,
loginemail VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_swe... |
INSERT INTO Products (Name,Price,Description,MeasureUnit) VALUES ('test1',NULL,NULL,'');
INSERT INTO Products (Name,Price,Description,MeasureUnit) VALUES ('test2',NULL,NULL,'');
INSERT INTO Products (Name,Price,Description,MeasureUnit) VALUES ('test3',NULL,NULL,'');
INSERT INTO Products (Name,Price,Description,MeasureU... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 13, 2018 at 10:13 PM
-- 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";
/*!40101 SET @OL... |
<gh_stars>1-10
WITH neueUeberschreitungen AS (
SELECT device_id, BIN(time, 10m) AS zeitfenster,
ROUND(AVG(measure_value::bigint), 2) AS co2wert
FROM "iot-device-simulator"."air_quality"
WHERE time between ago(10m) and now() AND measure_name = 'co2'
AND measure_value::bigint > 500
GROUP BY device_id,... |
<filename>src/test/resources/sql/drop_access_method/d43c7ec4.sql
-- file:create_am.sql ln:67 expect:true
DROP ACCESS METHOD gist2
|
<reponame>hhudson/code_standard_tracking<filename>apex/f130/application/pages/page_00016.sql<gh_stars>0
prompt --application/pages/page_00016
begin
-- Manifest
-- PAGE: 00016
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2021.10.15'
,p_release=>'21.2.2'
,p_default_workspace_id=>96909789... |
CREATE TABLE `bookcopy` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`book_author` VARCHAR(255) NULL DEFAULT NULL,
`book_name` VARCHAR(255) NULL DEFAULT NULL,
PRIMARY KEY (`id`)
)
;
|
INSERT INTO solarnode.sn_general_node_datum
(created, source_id, jdata)
VALUES (?,?,?)
|
<reponame>endeavourhealth/DBPatcher<filename>src/main/resources/postgresql/drop-function.sql
drop function {0}; |
CREATE TYPE nw.deposit_revert_status AS ENUM ('pending', 'succeeded', 'failed');
CREATE TYPE nw.deposit_adjustment_status AS ENUM ('pending', 'succeeded');
CREATE TABLE nw.deposit_revert (
id BIGSERIAL NOT NULL,
event_created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL,
... |
<reponame>davelush/slack-bot-sandbox
CREATE SCHEMA IF NOT EXISTS kudosbot;
-- Create read-write role and grant rights
DO $$
BEGIN
CREATE ROLE r_kudosbot_rw NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
EXCEPTION
WHEN OTHERS THEN
RAISE NOTICE 'not creating role r_kudosbot_rw -- it alrea... |
<gh_stars>10-100
#tags: kwc
CREATE TABLE IF NOT EXISTS `kwc_box_select` (
`component_id` VARCHAR( 200 ) NOT NULL ,
`component` VARCHAR( 100 ) NOT NULL ,
PRIMARY KEY ( `component_id` )
);
|
--[er]the number of subquery's selected columns and alias columns are not equal(3)
create class DML_0001 (
int_col integer,
var_col varchar(20),
set_col set (int, varchar(10)) );
create class DML_0002 (
int_col integer,
var_col varchar(20),
set_col set(int) );
insert into DML_0001 values (1,'test1', {1,'test1'});
... |
CREATE DATABASE IF NOT EXISTS `tradiction` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `tradiction`;
-- MySQL dump 10.13 Distrib 8.0.17, for macos10.14 (x86_64)
--
-- Host: localhost Database: tradiction
-- ------------------------------------------------------
-- Server version 5.7.30-0ubuntu0.18.04.1
/*!40101 S... |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : sam. 06 avr. 2019 à 22:31
-- Version du serveur : 10.1.32-MariaDB
-- Version de PHP : 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!401... |
create table "trello_data"."analytics"."trello_users__dbt_tmp"
as (
with select_source as (
select * from "trello_data"."analytics"."users"
),
renamed as (
select board_id, full_name, "id", username from select_source
)
select * from renamed
); |
CREATE TABLE IF NOT EXISTS Accounts (
username text PRIMARY KEY,
password text NOT NULL
);
|
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 29, 2019 at 11:27 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 5.6.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
DELIMITER ;;
DROP PROCEDURE IF EXISTS SetPersonaRelation;;
CREATE PROCEDURE SetPersonaRelation( IN `in_account_id` int(11), IN `in_persona_guid` varchar(64), IN `in_related_guid` varchar(64),
IN `in_follows` char(1), IN `in_muted` char(1), IN `in_blocked` char(1), IN `in_starred` ch... |
select sku, nombre, genero, count (genero) as conteo
from semana_i.datos_rfid inner join semana_i.datos_camara on (datos_camara.id_sesion=datos_rfid.id_sesion)
group by genero, nombre, sku;
select sku, nombre, edad, count (edad) as conteo, datos_rfid.ts
from semana_i.datos_rfid inner join semana_i.datos_camara on (dat... |
-- Use DISTINCT to test if there are any accounts associated with more than one region.
-- Have any sales reps worked on more than one account?
select distinct a.id as "account id",
r.id as "region id"
from accounts a
join sales_reps s
on a.sales_rep_id = s.id
join region r
on r.id = s.region_id
SELECT s.id, s.na... |
CREATE DATABASE IF NOT EXISTS memorize;
USE DATABASE memorize;
CREATE TABLE reviews (
cod INT NOT NULL AUTO_INCREMENT,
streak INT NOT NULL DEFAULT 0,
interval_time INT NOT NULL DEFAULT 0,
easiness_factor DECIMAL(5, 2) NOT NULL DEFAULT 1.30,
PRIMARY KEY (cod)
);
CREATE TABLE users (
cod INT NOT... |
-- CreateEnum
CREATE TYPE "TaskStatus" AS ENUM ('Pending', 'InProgress', 'Done');
-- CreateTable
CREATE TABLE "tasks" (
"id" SERIAL NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
"name" TEXT NOT NULL,
"status" "TaskStatus" NOT NULL DEFAULT ... |
-- file:rangefuncs.sql ln:298 expect:true
SELECT setval('foo_rescan_seq1',1,false),setval('foo_rescan_seq2',1,false)
|
-- file:hs_standby_disallowed.sql ln:25 expect:true
update hs1 set col1 = NULL where col1 > 0
|
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.10
-- Dumped by pg_dump version 10.10
-- Started on 2019-09-17 16:58:27 CEST
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... |
<gh_stars>0
# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0;
use phpdraft;
DROP TABLE IF EXISTS `depth_chart_positions`;
ALTER TABLE `draft` DROP COLUMN `using_depth_charts`;
DROP INDEX `depth_chart_idx` ON `players`;... |
<filename>kernel/kernel-impl/src/main/sql/mysql/sakai_locks.sql<gh_stars>10-100
-----------------------------------------------------------------------------
-- SAKAI_LOCKS
-----------------------------------------------------------------------------
CREATE TABLE SAKAI_LOCKS
(
TABLE_NAME VARCHAR (64),
RECORD_ID VARC... |
CREATE TABLE vehicle (
vehicle_id integer identity NOT NULL,
vin varchar(17) NOT NULL, -- Vehicle Title
model varchar(50) NOT NULL, -- Vehicle Description
days int(4) NOT NULL, -- Vehicle landing page link
CONSTRAINT pk_vehicle_vehicle_id PRIMARY KEY (vehicle_id)
); |
use mansi
create table SaleData(ProductId varchar(5), Month int)
insert into SaleData values('P1', 4)
insert into SaleData values('P2', 4)
insert into SaleData values('P3', 5)
select Distinct ProductId, LAST_VALUE(Month) over(partition by ProductId order by Month Rows Between Current Row and Unbounded
following) as 'Re... |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id
= OBJECT_ID(N'[dbo].[sp_PharmacyModule_GetPatientProfile]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].sp_PharmacyModule_GetPatientProfile
GO
CREATE PROCEDURE [dbo].sp_PharmacyModule_GetPatientProfile(@patientId int, @drugPrescriptionId int)
AS
BEGIN
... |
<filename>migration/2.3.0.sql
-- Update the Database schema from 2.2.0 to 2.3.0
ALTER TABLE equipment ADD in_service INT(1) UNSIGNED;
UPDATE equipment SET in_service = 1;
ALTER TABLE equipment MODIFY in_service INT(1) UNSIGNED NOT NULL;
INSERT INTO schema_versioning(version, comment) VALUES ("2.3.0", "Migration Compl... |
-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.5.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
... |
select
e.id as id1_0_,
e.location as location2_0_,
e.name as name3_0_
from Event e
where st_within(e.location, 'POLYGON ((1 1, 20 1, 20 20, 1 20, 1 1))') = true |
--
-- 表的结构 `smpss_tempsales`
--
CREATE TABLE IF NOT EXISTS `smpss_tempsales` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`order_id` varchar(14) NOT NULL,
`goods_id` int(10) NOT NULL,
`goods_name` varchar(100) NOT NULL,
`goods_sn` varchar(16) NOT NULL,
`stock` int(10) NOT NULL,
`cat_id` int(10) NOT NULL,
`o... |
--
-- Table structure for table `ext_project_project`
--
CREATE TABLE `ext_project_project` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`date_create` int(10) unsigned NOT NULL DEFAULT '0',
`date_update` int(10) unsigned NOT NULL DEFAULT '0',
`id_person_create` int(10) unsigned NOT NULL DEFAULT '0',
`deleted`... |
--
-- See all processes in SQL Server and kill one
--
-- See all processes
EXEC sp_who2
-- Kill process 56
kill 56 |
-- mysqldump-php https://github.com/ifsnop/mysqldump-php
--
-- Host: localhost Database: jo_ta
-- ------------------------------------------------------
-- Server version 5.5.5-10.3.17-MariaDB-0ubuntu0.19.04.1
-- Date: Mon, 02 Sep 2019 09:28:53 +0700
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
<reponame>sugengfransrisk/Apotek-DrugstoreCI<filename>teds_apotik.sql
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 1192.168.3.11
-- Generation Time: Sep 21, 2017 at 04:27 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 29, 2021 at 09:13 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
INSERT INTO tunnelto_auth(auth_key_hash, account_id) VALUES('<KEY>', 'be536b2e-a039-4e13-b3a2-7eb50ee82ad7');
|
<filename>mikasa/schema.sql
DROP TABLE IF EXISTS ropa;
CREATE TABLE ropa (
id INTEGER PRIMARY KEY AUTOINCREMENT,
tipo text NOT NULL,
descripcion TEXT UNIQUE NOT NULL,
costo INTEGER NOT NULL,
veces INTEGER default 1,
uso NUMERIC,
modificado datetime default current_timestamp,
dt datetime default curren... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 24-11-2021 a las 00:33:09
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
DROP VIEW IF EXISTS `user_authorities_view`;
|
exec [**SEARCHADMIN**].[dbo].[proc_MSS_GetCrawlStatistics] @Count = 100 |
SELECT *
FROM Sales.Customer
WHERE (TerritoryID != 1) and
(TerritoryID != 5) and
(AccountNumber LIKE '%000000%')
-- and (not PersonID is NULL)
|
INSERT INTO Users (Username, Avatar, TotalTouchesCount) SELECT 'alice', NULL, 0 WHERE NOT EXISTS (SELECT * FROM Users WHERE Username = 'alice');
INSERT INTO Users (Username, Avatar, TotalTouchesCount) SELECT 'bob', NULL, 0 WHERE NOT EXISTS (SELECT * FROM Users WHERE Username = 'bob');
INSERT INTO Users (Username, Avata... |
<gh_stars>1-10
-- Up
ALTER TABLE chart MODIFY COLUMN metadata json NOT NULL;
-- Down
ALTER TABLE chart MODIFY COLUMN metadata longtext NOT NULL; |
<reponame>rpr-ableton/sqlfluff<gh_stars>100-1000
CREATE TRIGGER reminder1
ON Sales.Customer
AFTER INSERT, UPDATE
AS RAISERROR ('Notify Customer Relations', 16, 10);
GO
CREATE TRIGGER reminder2
ON Sales.Customer
AFTER INSERT, UPDATE, DELETE
AS
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'AdventureWorks2012 ... |
-- Having a table with columns
-- id: a unique field IDing an object
-- name a friendly named linked to the ID (optional)
-- data_value: the data value your recording for the unique_object_id over time
-- recorded_at_utc : your date time field (optionally in UTC) acting as timestamp
-- e.g.
-- ID Name recorded... |
<reponame>ChristopherWilks/snaptron<filename>deploy/snaptron_schema.sql<gh_stars>10-100
CREATE TABLE intron (snaptron_id int(11) NOT NULL,chrom varchar(20) DEFAULT NULL,start int(11) DEFAULT NULL,end int(11) DEFAULT NULL,length int(11) DEFAULT NULL,strand char(1) NOT NULL,annotated tinyint(1) DEFAULT 0,donor char(2) DE... |
INSERT INTO config (config_lastedited, config_lasteditedby, config_key, config_value, config_category, config_description, config_type, config_options, config_editable, config_required, config_added_to_dictionary)
VALUES
(Now(), -1, 'OVERRIDE_BRAND_LOGO', '', 'JAM_SETTINGS', "Overrides the brand logo to this URL. Lea... |
-- file:int8.sql ln:33 expect:true
SELECT * FROM INT8_TBL WHERE q2 = 456
|
<reponame>alexgalkin/odin<gh_stars>1-10
INSERT INTO odin.migration VALUES('opts/facebook', '005-facebook-credentials-insert.blue.sql');
DROP TRIGGER odin_facebook_credentials_ledger_insert_trigger ON odin.facebook_credentials_ledger;
CREATE OR REPLACE FUNCTION odin.facebook_credentials_ledger_insert() RETURNS TRIGGER... |
CLUSTER fmp.areas_benefiting USING areas_benefiting_wkb_geometry_geom_idx;
|
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2012 年 05 月 17 日 01:50
-- 服务器版本: 5.5.8
-- PHP 版本: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 16, 2019 at 09:43 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_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;
DROP INDEX public.signersaccount;
DROP INDEX public.pricei... |
<filename>analysis/05.2015/dump_13.05.2015.sql
-- SQL Manager 2011 for PostgreSQL 5.0.0.3
-- ---------------------------------------
-- Хост : 192.168.0.53
-- База данных : webcam
-- Версия : PostgreSQL 9.3.6 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2, 64-bit
SET sear... |
-- MySQL dump 10.13 Distrib 5.7.20, for Linux (x86_64)
--
-- Host: localhost Database: admin
-- ------------------------------------------------------
-- Server version 5.7.20-0ubuntu0.17.10.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_... |
<filename>2.tools/core/src/main/java/com/octopus/tools/dataclient/ds/isp_dictionary_field.sql
/*
SQLyog Ultimate v8.4
MySQL - 5.6.10-log : Database - mysql
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.