sql stringlengths 6 1.05M |
|---|
<gh_stars>1-10
CREATE TABLE MONTHS
(
MONTH_DISPLAY VARCHAR2(36)
, MONTH_VALUE VARCHAR2(2)
);
Insert into MONTHS (MONTH_DISPLAY,MONTH_VALUE) values ('ΙΑΝΟΥΑΡΙΟΣ','01');
Insert into MONTHS (MONTH_DISPLAY,MONTH_VALUE) values ('ΦΕΒΡΟΥΑΡΙΟΣ','02');
Insert into MONTHS (MONTH_DISPLAY,MONTH_VALUE) values ('ΜΑΡΤΙΟΣ','03')... |
-- randexpr1.test
--
-- db eval {SELECT (select count(distinct 11-17-11) from t1)-coalesce((select (abs(13)/abs(t1.b-c*11+coalesce((select max(f) from t1 where t1.a>t1.a),(e))*case when (abs(e)/abs(t1.b)) not between ~f and t1.e then c else (abs(t1.b)/abs(t1.d)) end | 13+b | b+t1.e)) from t1 where t1.c in (select t1.c... |
with top_partitioned_traces as (
select block_timestamp
from `{{params.internal_project_id}}.{{params.partitioned_dataset_name}}.traces_by_input_0xa90`
where date(block_timestamp) >= date_add('{{ds}}', INTERVAL -1 DAY)
union all
select block_timestamp
from `{{params.internal_project_id}}.{{params.partitione... |
<reponame>ArtemWolynski/scrabble-Play-Framework-
# --- !Ups
DROP TABLE IF EXISTS public.words;
CREATE TABLE public.words (
id INT NOT NULL,
word VARCHAR(100) NOT NULL UNIQUE,
PRIMARY KEY (id)
);
# --- !Downs
DROP TABLE public.words; |
select count(distinct c_integer), sum(c_integer), round(avg(c_integer)) from alltypes_with_nulls_v group by c_varchar order by c_varchar;
|
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_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
CREATE TABLE IF NOT EXIST... |
<reponame>allixender/gwml2-geoappschema-sql
-- ups CI_ResponsibleParty iso_ci_responsibleparty
CREATE TABLE public.iso_ci_responsibleparty
(
id SERIAL PRIMARY KEY NOT NULL,
gml_id VARCHAR(256) NOT NULL,
description TEXT,
gml_name VARCHAR(256)
);
CREATE UNIQUE INDEX iso_ci_responsibleparty_id_uindex ON ... |
-- 用户
insert into sys_user (user_name,password,sex,age) values ('admin','$<PASSWORD>FKyGkvKfo<PASSWORD>','0',20);
insert into sys_user (user_name,password,sex,age) values ('<PASSWORD>','<PASSWORD>','1',18);
insert into sys_user (user_name,password,sex,age) values ('李雷','<PASSWORD>','0',19);
-- 菜单
insert into sys_men... |
<filename>DMS5/GetResidueID.sql
/****** Object: StoredProcedure [dbo].[GetResidueID] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE GetResidueID
/****************************************************
**
** Desc: Gets ResidueID for given Residue Symbol
**
** Return values: 0: failure... |
/********************************************************************************
component-centric-snapshot-mrcm-attribute-range-unique-id
Assertion:
The current MRCM Attribute Range snapshot file has unique identifiers.
********************************************************************************/
insert i... |
DROP VIEW
IF EXISTS V_QRTZ_JOB;
DROP VIEW
IF EXISTS V_QRTZ_TRIGGER;
CREATE VIEW V_QRTZ_JOB AS (
SELECT
CAST(
CONCAT(
T.SCHED_NAME,
'-',
T.JOB_GROUP,
'-',
T.JOB_NAME
) AS CHAR (1000)
) id,
T.SCHED_NAME sched_name,
T.JOB_NAME job_name,
T.JOB_GROUP job_group,
T.JOB_CLASS_NAME job_c... |
SELECT COUNT(*) FROM SURVEY_ITEMS
WHERE DELETE_FLAG = 0;
|
<gh_stars>1000+
CREATE TABLE `processes` (
`id` varchar(255) NOT NULL,
`parent_id` varchar(255) DEFAULT NULL,
`org_id` int(10) unsigned NOT NULL,
`type` varchar(255) NOT NULL,
`log` text,
`resource_id` varchar(255) NOT NULL,
`status` varchar(255) NOT NULL,
`started_at` timestamp NOT NULL DEFAULT CURRENT... |
<gh_stars>100-1000
-- simple batch start
GO
CREATE VIEW v8159(c1, c2)
AS
SELECT
'a' AS c1
GO
DROP VIEW v8159
GO
SET XACT_ABORT ON;
GO
begin transaction
GO
GO
CREATE VIEW v8159(c1, c2)
AS
SELECT
'a' AS c1
GO
if (@@trancount > 0) select cast('Does not respect xact_abort flag' as text) else select cast('Re... |
-- MySQL dump 10.13 Distrib 5.5.25, for osx10.6 (i386)
--
-- Host: localhost Database: db_bbv
-- ------------------------------------------------------
-- Server version 5.5.25
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4... |
<filename>db_sim_pmb.sql
-- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64)
--
-- Host: localhost Database: sim_pmb
-- ------------------------------------------------------
-- Server version 5.7.29-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... |
<reponame>bbogin/sr2s
-- Create PostgreSql tables:
-- note: the "DROP" statement must be a comment with two dashes + one space + "DROP" in order to be activated by
-- the creation script, ie. the script will change "-- DROP" to "DROP" if the option to drop is selected.
-- Table: d_a00_organization
-- DROP TABLE d_a00... |
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... |
<filename>queries/stackoverflow/q16/19c88d271aaae162be2559dbfee71c67a8b59c10.sql
SELECT COUNT(*)
FROM site AS s,
so_user AS u1,
tag AS t1,
tag_question AS tq1,
question AS q1,
badge AS b1,
account AS acc
WHERE s.site_id = u1.site_id
AND s.site_id = b1.site_id
AND s.site_id = t1.site_id... |
<filename>src/main/resources/schema.sql
-- MySQL dump 10.13 Distrib 5.7.17, for Linux (x86_64)
--
-- Host: localhost Database: blog
-- ------------------------------------------------------
-- Server version 5.7.19-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD... |
<gh_stars>1-10
-- *** intervalID from 2000000000 and up is reserved for CORE ***
IF OBJECT_ID('zsystem.intervals') IS NULL
BEGIN
CREATE TABLE zsystem.intervals
(
intervalID int NOT NULL,
intervalName nvarchar(200) NOT NULL,
[description] nvarchar(max) NOT NULL,
minID b... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 13, 2019 at 02:54 AM
-- Server version: 5.5.57-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... |
<filename>conferences/migrations/4_add_conference_current.up.sql
BEGIN;
ALTER TABLE conference ADD current BOOLEAN;
UPDATE conference SET current = false;
UPDATE conference SET current = true WHERE slug='gc-2021';
COMMIT;
|
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80022
Source Host : localhost:3306
Source Schema : go_im
Target Server Type : MySQL
Target Server Version : 80022
File Encoding : 65001
Date: 12/01/2022 16:2... |
/*
* $Id: nullempty.sql 4649 2011-10-27 18:34:34Z unsaved $
*
* This test written verbosely to make it easier to partially share it with
* script sample/nullempty.sql.
* This tests differences between null and empty strings,
* and ? var vs. _/~ variables.
*/
\p At startup ? is equal to empty string. See betwee... |
-- Diagnostic DxgKrnlTelemetry.ClientRunningTime
-- from C:\ProgramData\Microsoft\Diagnosis\EventTranscript\EventTranscript.db
SELECT
--Timestamp from db field
json_extract(events_persisted.payload,'$.time') as 'UTC TimeStamp',
-- Timestamp from json payload
datetime((timestamp - 116444736000000000)/10000... |
<filename>src/test/resources/sql/select/38fbfd6a.sql<gh_stars>10-100
-- file:tsdicts.sql ln:162 expect:true
SELECT to_tsquery('hunspell_tst', 'footballyklubber:b & rebookings:A & sky')
|
-- The design criteria for this table are:
--
-- 1. It can contain arbitrary content serialized as binary, XML or JSON. These formats
-- are supported to allow one to take advantage of in-storage processing capabilities for
-- these types if required. This should not incur extra cost on storage.
--
-- 2. The table desi... |
-- 2019-03-26T16:27:37.221
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Process SET Name='List Available Fonts',Updated=TO_TIMESTAMP('2019-03-26 16:27:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=541083
;
-- 2019-03-26T16:27:37.241
-- I forgot to set the DICTIONARY_ID_C... |
CREATE TABLE AccessCode(
id BIGINT NOT NULL AUTO_INCREMENT,
modificationCounter INTEGER NOT NULL,
ticketNumber VARCHAR(5),
creationTime TIMESTAMP,
startTime TIMESTAMP,
endTime TIMESTAMP,
idVisitor BIGINT NOT NULL,
idQueue BIGINT NOT NULL,
CONSTRAINT PK_AccessCode PRIMARY KEY(id),
CONSTRAINT FK_Acces... |
/*
MySQL Data Transfer
Source Host: localhost
Source Database: odinms
Target Host: localhost
Target Database: odinms
Date: 2009-10-15 9:00:19
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for accounts
-- ----------------------------
DROP TABLE IF EXISTS `accounts`;
CREATE TABLE `accou... |
<reponame>scaubin/sw<gh_stars>1-10
-- --------------------------------------------------------
-- 主机: 192.168.56.101
-- 服务器版本: 5.5.56-log - MySQL Community Server (GPL)
-- 服务器操作系统: linux-glibc2.5
-- HeidiSQL 版本: 9.4.0.5125
-- --... |
/*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership.
*
* 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.apac... |
CREATE FUNCTION func625() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE199);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE479);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE130);val:=(SELECT COUNT(*)INTO MYCOU... |
<reponame>NCIP/cabio
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
create index ZSTG_INTIONS_SOURCE_NAM on ZSTG_INTERACTIONS(SOURCE_NAME) PARALLEL NOLOGGING tablespace CABIO_MAP_FUT;
create index ZSTG_INTIONS_... |
insert into versionhistory(patchnumber, patchlabel, patchdescription)
values (2, 'drop-geospot_id_sequence',
'Drop geospot_id_sequence');
drop sequence geospot_id_sequence;
|
<filename>tests/Database/files/sqlsrv-nette_test3.sql<gh_stars>100-1000
IF OBJECT_ID('types', 'U') IS NOT NULL DROP TABLE types;
IF OBJECT_ID('types2', 'U') IS NOT NULL DROP TABLE types2;
CREATE TABLE types (
[bigint] bigint,
[binary_3] binary(3),
[bit] bit,
[char_5] char(5),
[date] date,
[datetime] datetime,
... |
<filename>crates/aingle_sqlite/src/sql/wasm/schema.sql
-- Initial AIngle Wasm schema
CREATE TABLE IF NOT EXISTS Wasm (
hash BLOB PRIMARY KEY ON CONFLICT IGNORE,
blob BLOB NOT NULL
);
CREATE TABLE IF NOT EXISTS SafDef (
hash BLOB PRIMARY KEY ON... |
<reponame>opengauss-mirror/Yat
-- @testpoint: opengauss关键字exchange(非保留),作为游标名,部分测试点合理报错
--前置条件
drop table if exists exchange_test cascade;
create table exchange_test(cid int,fid int);
--关键字不带引号-成功
start transaction;
cursor exchange for select * from exchange_test order by 1;
close exchange;
end;
--关键字带双引号-成功
start t... |
-- @testpoint: opengauss关键字day(非保留),作为索引名,部分测试点合理报错
--前置条件,创建一个表
drop table if exists day_test;
create table day_test(id int,name varchar(10));
--关键字不带引号-成功
drop index if exists day;
create index day on day_test(id);
drop index day;
--关键字带双引号-成功
drop index if exists "day";
create index "day" on day_test(id);
drop in... |
-------------------------------------------------------------------------------
--
-- Script: active_cursors.sql
-- Purpose: to show all active cursor for each session
-- For: 8.0 and 8.1
--
-- Copyright: (c) Ixora Pty Ltd
-- Author: <NAME>
--
-- Description: This script is needed to associate top level curso... |
DROP table IF EXISTS transreport_user CASCADE;
CREATE TABLE IF NOT EXISTS transreport_user (
id bigint not null,
phone_number varchar(20) not null,
user_name varchar(100),
register_time timestamp without time zone,
login_time timestamp without time zone,
points bigint,
CONSTRAINT user_pkey PRIMARY KEY(i... |
CREATE TABLE product_review
(
id UUID NOT NULL,
creation_time_utc TIMESTAMP WITHOUT TIME ZONE,
product_rating INTEGER,
review_text TEXT,
product_id UUID NOT NULL,
user_id UUID NOT NULL,
CONSTRAINT pk_productreview PRIMARY KEY (id)
);
CREATE TABLE pro... |
film tablosunda bulunan title ve description sütunlarındaki verileri sıralayınız.
select title,description from film
film tablosunda bulunan tüm sütunlardaki verileri film uzunluğu (length) 60 dan büyük VE 75 ten küçük olma koşullarıyla sıralayınız.
select * from film where length>60 and length<75
film tablosunda bulun... |
<gh_stars>0
--criacao das tabelas normalizadas da RFB no oracle
CREATE TABLE RFB_ATIVIDADE_ECONOMICA
(
URI VARCHAR2(7 CHAR)
, CNAE VARCHAR2(7 CHAR)
)
LOGGING
TABLESPACE ts_norm_demais_tb
INITRANS 1
STORAGE
(
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS UNLIMITED
BUFFER_POOL DEFAULT
)
NO... |
SELECT random_seed(1);
SELECT random_permute('{}'::integer[]);
SELECT random_permute('{1,2,3,4,5,6}'::integer[]);
SELECT random_permute('{{1,2,3},{4,5,6}}'::integer[]);
-- Choice without replacement
SELECT random_choice('{}'::integer[], '{3}'::integer[], false);
SELECT random_choice('{1,2,3,4,5}'::integer[], '{3}'::i... |
/* Replace with your SQL commands */
CREATE INDEX idx_kara_created ON kara(created_at DESC);
CREATE INDEX idx_serie_name ON serie(name);
CREATE INDEX idx_kara_songorder ON kara(songorder);
CREATE INDEX idx_kara_title ON kara(title); |
CREATE TABLE TAB_IDENTITY
( ID INT IDENTITY (1,1) NOT NULL,
DESCRITOR VARCHAR(20) NULL)
INSERT INTO TAB_IDENTITY (DESCRITOR) VALUES ('CLIENTE X')
INSERT INTO TAB_IDENTITY (DESCRITOR) VALUES ('CLIENTE Y')
INSERT INTO TAB_IDENTITY (DESCRITOR) VALUES ('CLIENTE Z')
INSERT INTO TAB_IDENTITY (DESCRITOR) VALUES ('CLIENTE ... |
create or replace function pg_temp.create_subscription_table(tablePrefix varchar, schema varchar)
returns integer as
$body$
declare
tableNameNonQuoted varchar;
createTable text;
begin
tableNameNonQuoted := tablePrefix || 'SubscriptionData';
createTable = 'create table if not exi... |
<filename>src/Novosga/Install/sql/create/mysql.sql
-- @adapter=MySQL / MariaDB
-- @author=<NAME>
--
-- tables
--
CREATE TABLE contador (
unidade_id INT NOT NULL,
total INT NOT NULL DEFAULT 0,
PRIMARY KEY(unidade_id)
);
CREATE TABLE atend_codif (
atendimento_id bigint NOT NULL AUTO_INCREMENT,
serv... |
<reponame>toburger/Rezoom.SQL
create table Z
as select @x as k;
|
<filename>data/train/sql/784dc2b9b28c770224fee0dd5c36526fd15abcfcteprjinfo.sql
select xt.create_view('xt.teprjinfo', $$
select teprj.*,
case when teprj_curr_id is not null then true
else false
end as teprj_specified_rate
from te.teprj
$$, false);
create or replace rule "_INSERT" as on insert to xt... |
<reponame>paulissoft/oracle-build-tools
CREATE TYPE "ORACLE_TOOLS"."T_INDEX_OBJECT" authid current_user under oracle_tools.t_dependent_or_granted_object
( object_name$ varchar2(4000 char)
, column_names$ varchar2(4000 char)
, tablespace_name$ varchar2(30 char)
, constructor function t_index_object
( self in out nocop... |
<gh_stars>0
DELIMITER /
ALTER TABLE IACUC_PROTOCOL_NOTIFICATION ADD CREATE_USER VARCHAR(60)
/
DELIMITER ; |
<reponame>filipi86/horusec-platform
BEGIN;
ALTER TABLE companies
RENAME COLUMN company_id TO workspace_id;
ALTER TABLE companies
RENAME TO workspaces;
ALTER TABLE account_company
RENAME COLUMN company_id TO workspace_id;
ALTER TABLE account_company
RENAME TO account_workspace;
ALTER TABLE analysis
... |
-- koha to keyword mapping
-- id -- unique identifier assigned by Koha (auto_increment)
-- field -- keyword to be mapped to (ex. subtitle)
-- frameworkcode -- foreign key from the biblio_framework table to link this mapping to a specific framework (default '')
-- fieldcode -- marc field numbe... |
-- report views
DROP FUNCTION IF EXISTS public.text_time(integer);
|
<reponame>deka108/meas_deka<filename>db/mathdb_auth_user.sql
CREATE DATABASE IF NOT EXISTS `mathdb` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `mathdb`;
-- MySQL dump 10.13 Distrib 5.7.12, for osx10.9 (x86_64)
--
-- Host: localhost Database: mathdb
-- ------------------------------------------------------
-- Se... |
<reponame>elitenetwork-project/Distintivo_Police
/*
Creato da LuisDj#7467
Powered by EliteNetwork
www.elitenetwork.it
Vietata la diffusione senza autorizzazione da LuisDj#7467
Compatibile con versione 1.1.0 di es_extended
*/
INSERT INTO `items` (`name`, `label`, `limit`, `rare`, `can_re... |
SELECT EXTPOINT_LOCATION FROM DGB_EXTENSION_POINTS ORDER BY EXTPOINT_LOCATION |
INSERT INTO accounts (ACCT_NAME) VALUES
('Savings'),
('Current'),
('Fixed Deposit'),
('Recurring Deposit'),
('Loan'); |
CREATE TABLE `menu` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varbinary(128) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
<reponame>nrademacher/inv
/*
Warnings:
- Made the column `status` on table `invoices` required. This step will fail if there are existing NULL values in that column.
- Made the column `isDraft` on table `invoices` required. This step will fail if there are existing NULL values in that column.
*/
-- AlterTable
A... |
-- Deploy delivery:github_patchsets to pg
-- requires: patchsets
BEGIN;
CREATE TABLE IF NOT EXISTS github_patchsets(
id BIGSERIAL PRIMARY KEY,
patchset_id BIGSERIAL NOT NULL REFERENCES patchsets(id) ON UPDATE CASCADE ON DELETE CASCADE,
payload JSON NOT NULL
);
COMMIT;
|
<reponame>qaisersayyed/citibus
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Aug 16, 2020 at 12:00 PM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone... |
select rownum from (select 1 as dual) as dual connect by 1 = 1; |
where ProductName = @productname
order by ProductName desc
|
INSERT INTO department (name)
VALUES ('Intern'),
('Customer Service'),
('Accountant'),
('IT Representative'),
('IT Manager'),
('Operations Director'),
('CEO');
INSERT INTO role (title, salary, department_id)
VALUES ('Intern', 0.00, 01),
('Customer Service', 45000.00, 0... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 31, 2018 at 01:21 PM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
-- Creates the "Bamazon" database --
CREATE DATABASE Bamazon;
-- Makes it so all of the following code will affect animals_db --
USE Bamazon;
-- Creates the table "people" within animals_db --
CREATE TABLE products (
item_id INTEGER(11) AUTO_INCREMENT NOT NULL,
product_name VARCHAR(100) NULL,
department_name VA... |
<reponame>Utilka/Databases_and_information_systems_Univ_sem_6
insert into users (id, username, password, salt) values (1, '<NAME>', '<PASSWORD>', '<PASSWORD>');
insert into users (id, username, password, salt) values (2, '<NAME>', '<PASSWORD>', '<PASSWORD>');
insert into users (id, username, password, salt) values (3, ... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.7deb1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 05, 2021 at 02:05 PM
-- Server version: 8.0.26-0ubuntu0.21.04.3
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
INSERT INTO {{ new_db_table_name }} (
SELECT{% for column_name in new_column_names %}
{{ column_name }}{% if not forloop.last %},{% endif %}{% endfor %}
FROM {{ old_db_table_name }})
ON CONFLICT ({{ pk_name }}) DO
UPDATE
SET{% for column_name in new_column_names %}{% if column_name not in ne... |
alter table test.post add column foo varchar(30); |
<reponame>TarekElBarody/image-processing<gh_stars>0
CREATE VIEW user_view AS
SELECT
users.id,
users.first_name,
users.last_name,
users.birthday,
users.email,
users.mobile,
users.role,
users.created,
COALESCE((SELECT COUNT(*) FROM images WHERE ... |
DROP FUNCTION IF EXISTS delete_livestock_coordinates_for_map;
CREATE FUNCTION delete_livestock_coordinates_for_map
( IN user_id INT
, IN map_id INT
)
RETURNS VOID
AS
$body$
BEGIN
IF permission_check_livestock_map(set_user_id(delete_livestock_coordinates_for_map.user_id), delete_livestock_coordinates_for_map.map_i... |
<filename>sql/btc.sql
CREATE TABLE IF NOT EXISTS `txvin`(
`Txid` VARCHAR(40) not null,
`txHash` VARCHAR(40) NOT NULL,
`pretxid` VARCHAR(40) NOT NULL,
`Vout` int,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY ( `Txid`... |
SELECT name FROM people WHERE id IN (SELECT person_id FROM stars WHERE movie_id IN (SELECT id FROM movies WHERE year = 2004)) ORDER BY(birth); |
<reponame>madalinaeleonorag/CRUD-php
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 16, 2017 at 09:28 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.2
-- Dumped by pg_dump version 9.6.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;
SET check_function_bodies = false;
SET client_min... |
<filename>data/open-source/extracted_sql/feedbin_feedbin.sql
CREATE INDEX index_suggested_feeds_on_suggested_category_id ON suggested_feeds
CREATE INDEX index_supported_sharing_services_on_user_id ON supported_sharing_services
CREATE TABLE suggested_categories ( id integer NOT NULL, name text, created_at timestamp wi... |
CREATE TABLE [dbo].[UserPreference] (
[Id] NVARCHAR (128) NOT NULL,
[LanguageId] NVARCHAR (8) NULL,
[UpdatedOn] DATETIMEOFFSET (7) NOT NULL,
[Timestamp] ROWVERSION NOT NULL,
CONSTRAINT [PK_dbo.UserPreference] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_dbo... |
CREATE TABLE Customers(
Id INT IDENTITY(1,1) PRIMARY KEY,
Name VARCHAR(20) not null,
Zipcode INT,
Email VARCHAR(20) not null,
)
CREATE TABLE Logins(
Id INT IDENTITY(1,1) PRIMARY KEY,
CustomerId INT FOREIGN KEY REFERENCES Customers(Id)
,
Username VARCHAR(20) not null,
Password VARCHAR(30... |
ALTER TABLE CATGENOME.TASK ALTER COLUMN TITLE TYPE TEXT;
ALTER TABLE CATGENOME.TASK ALTER COLUMN STATUS_REASON TYPE TEXT;
ALTER TABLE CATGENOME.TASK ALTER COLUMN QUERY TYPE TEXT;
ALTER TABLE CATGENOME.TASK ALTER COLUMN DATABASE TYPE TEXT;
ALTER TABLE CATGENOME.TASK ALTER COLUMN OPTIONS TYPE TEXT;
|
-- STUDIO PAGE & WIDGET
UPDATE `sys_std_pages` SET `icon`='bx_profiler@modules/boonex/profiler/|std-icon.svg' WHERE `name`='bx_profiler';
UPDATE `sys_std_widgets` SET `icon`='bx_profiler@modules/boonex/profiler/|std-icon.svg' WHERE `module`='bx_profiler' AND `caption`='_bx_profiler'; |
IF OBJECT_ID('HekatonTest', 'U') IS NOT NULL
DROP TABLE HekatonTest
CREATE TABLE dbo.HekatonTest(
Col1 int NOT NULL PRIMARY KEY NONCLUSTERED ,
Col2 nchar(79) COLLATE Latin1_General_100_CI_AS NOT NULL ,
Col3 char(100) COLLATE Latin1_General_100_CI_AS NOT NULL ,
INDEX ix_Col2 NONCLUSTERED(Col2)
) WITH (MEMORY_OPTI... |
<gh_stars>1000+
--TRUNCATE_TARGET is Azure Synapse Analytics specific
ALTER TABLE [Facility].[PL_stage] SWITCH TO [Facility].[PL_BASE] WITH (TRUNCATE_TARGET = ON);
|
<reponame>18F/openFEC
SET search_path = auditsearch, pg_catalog;
--
-- Name: audit_case; Type: TABLE; Schema: auditsearch; Owner: fec
--
CREATE TABLE audit_case (
audit_case_id character varying(130) NOT NULL,
audit_id character varying(10) NOT NULL,
election_cycle numeric NOT NULL,
far_release_date t... |
<filename>src/main/resources/schema.sql
CREATE TABLE employee (id SERIAL PRIMARY KEY, name VARCHAR(255), email VARCHAR(255), phone VARCHAR(255), department INTEGER); |
/*
Navicat Premium Data Transfer
Source Server : MySql
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : cmsrc
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 30/07/2021 19:16:48... |
<filename>Week 01/employee_information_V2.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 27, 2021 at 08:07 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+0... |
/*
* Copyright (c) 2015-2018 LabKey Corporation
*
* 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 l... |
<filename>sql/2020/20_Caching/cache_ttl_lighthouse_score.sql
#standardSQL
# Distribution of cache TTL Lighthouse scores
SELECT
_TABLE_SUFFIX AS client,
JSON_EXTRACT_SCALAR(report, "$.audits.uses-long-cache-ttl.score") AS caching_score,
COUNT(0) AS num_pages,
SUM(COUNT(0)) OVER (PARTITION BY _TABLE_SUFFIX... |
use all_mode;
insert into t1 (id, name) values (10, '10'), (20, '20');
insert into t1 (id, name) values (30, '30');
|
-- Copyright (c) 2013-2021 Snowplow Analytics Ltd. All rights reserved.
--
-- This program is licensed to you under the Apache License Version 2.0,
-- and you may not use this file except in compliance with the Apache License Version 2.0.
-- You may obtain a copy of the Apache License Version 2.0 at http://www.apache.o... |
ALTER TABLE changes
ADD COLUMN parent_change_id TEXT; |
/*
Navicat Premium Data Transfer
Source Server : 云乐享车线上
Source Server Type : MySQL
Source Server Version : 50554
Source Host : 192.168.127.12
Source Database : cloud_car
Target Server Type : MySQL
Target Server Version : 50554
File Encoding : utf-8
Date: 08/24/2017 16:... |
-- @testpoint: 修改的表名带模式修饰,修改成功
--创建模式
drop schema if exists test_schema;
create schema test_schema;
--建表
drop table if exists test_schema.test_update002;
create table test_schema.test_update002(c_integer integer, c_varchar varchar(50));
--插入数据
insert into test_schema.test_update002 values(1,'aaaaa');
insert into test_s... |
<gh_stars>0
-- migrate:up
create table vet_status (
id uuid default gen_random_uuid() primary key,
vet uuid references vets(id),
last_updated timestamp,
status varchar(255),
created_at timestamp default now()
)
-- migrate:down
|
<reponame>Dinhtuan1999/testmodule3<filename>testmodule3.sql
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Máy chủ: localhost
-- Thời gian đã tạo: Th1 13, 2021 lúc 10:59 AM
-- Phiên bản máy phục vụ: 8.0.22-0ubuntu0.20.04.3
-- Phiên bản PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.