sql stringlengths 6 1.05M |
|---|
<filename>Database Backup/restaurantdb.sql
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 17, 2021 at 03:24 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:0... |
<filename>migrations/mysql/1_initial_passwordReset.sql
-- +migrate Up
CREATE TABLE IF NOT EXISTS resetrequests (id int NOT NULL AUTO_INCREMENT, userId int, email TEXT, token TEXT, issued DATE, type INT, PRIMARY KEY (id) );
-- +migrate Down
DROP TABLE resetrequests; |
<reponame>TodorovicNikola/SurveyDSL<filename>QueryIT.generator/rdbms/crebas_facultysystem.sql
DROP TABLE TeachesClasses;
DROP TABLE AssistsInLabs;
DROP TABLE Asistant;
DROP TABLE Teacher;
DROP TABLE Employee;
DROP TABLE TeachingStuff;
DROP TABLE Passes;
DROP TABLE... |
CREATE FUNCTION ufn_GetSalaryLevel(@salary DECIMAL(18,4))
RETURNS VARCHAR(7)
AS
BEGIN
DECLARE @result VARCHAR(7);
IF(@salary < 30000)
BEGIN
SET @result = 'Low';
END
ELSE IF(@salary BETWEEN 30000 AND 50000)
BEGIN
SET @result = 'Average';
END
ELSE
BEGIN
SET @result = 'High';
END
RETURN @result;
END |
<filename>helloworld.sql<gh_stars>1-10
CREATE TABLE HELLO (HELLO CHAR(12))
INSERT INTO HELLO
VALUES ('Hello World!')
SELECT * FROM HELLO
|
<gh_stars>1-10
drop database if exists `test`;
create database `test`;
use `test`;
-- ----------------------------
-- Table structure for t_permission
-- ----------------------------
DROP TABLE IF EXISTS `t_permission`;
CREATE TABLE `t_permission` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFA... |
-- Templated query aimed to stress the fixing templated sections.
SELECT
foo,
1 + 2 + 3 + 4 + 5 as bar1,
1 + {{test_expression_1}} + 3 as bar2,
1 {{test_expression_2}} 3 as bar3,
{% if 1 == 0 %}
{{test_expression_3}}
{% endif %}
foobar
FROM example_table
|
--------------------------------------------------------
-- File created - Wednesday-May-28-2014
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table HPER_ENTRYEXIT
--------------------------------------------------------
CREATE TABLE... |
{{ config({
"schema": "staging"
})
}}
with source as (
select *
from {{ var("database") }}.GITTER.GITTER_CLIENT_ACCESS_EVENTS
), renamed as (
select
-- id
_id as id,
-- data
d__env as env,
to_timestamp_tz(t) as event_at,
d__user_id as user_id,
d__client_id as client_id,
d__client_nam... |
<gh_stars>10-100
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50729
Source Host : localhost:3306
Source Schema : gea
Target Server Type : MySQL
Target Server Version : 50729
File Encoding : 65001
Date: ... |
<gh_stars>1-10
{%- macro n_weeks_away(n, tz=None) -%}
{{ deprecation_warning('n_weeks_away', 'dbt_date.n_weeks_away()') }}
{{ dbt_date.n_weeks_away(n, tz) }}
{%- endmacro -%} |
-- +migrate Up
update products set document = jsonb_set(document, '{type}', '"helmet"') where document->>'type' != 'helmet';
-- +migrate Down
select 1; |
<reponame>silvioalexandreos/RestAspNet5
CREATE TABLE `person` (
`id` bigint NOT NULL AUTO_INCREMENT,
`first_name` varchar(80) NOT NULL,
`last_name` varchar(80) NOT NULL,
`addres` varchar(100) NOT NULL,
`gender` varchar(10) NOT NULL,
PRIMARY KEY (`id`)
) |
<reponame>hongyuanChrisLi/Archive2015<filename>JSqlParser-master/src/test/resources/net/sf/jsqlparser/test/oracle-tests/bindvar03.sql
select count(*), max(scn)
from
(
(select sp.bo#, sp.pmoptype, sp.scn, sp.flags
from sumpartlog$ sp, sumdep$ sd
where sd.sumobj# = :1 and sd.p_obj# = sp.bo#
group by sp.bo#, sp.pmopt... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 06, 2018 at 06:07 AM
-- Server version: 5.7.19
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
<reponame>parbatpk/parbat
-- =============================================
-- Create basic stored procedure template
-- =============================================
-- Drop stored procedure if it already exists
IF EXISTS (
SELECT *
FROM INFORMATION_SCHEMA.ROUTINES
WHERE SPECIFIC_SCHEMA = N'dbo'
AND SP... |
<gh_stars>1-10
INSERT INTO atlas.views (id, created_at, updated_at, deleted_at, title, owner_email, description, legend_node_label, legend_edge_label, is_featured) VALUES ('356d5035-53ff-4e9c-9bd5-ab1984f50cf0', '2020-03-20 22:28:09.122197', '2020-03-20 22:37:52.122197', NULL, 'Family Trees', '<EMAIL>', 'This visualiza... |
SELECT * FROM AUTO_NO
;
|
<gh_stars>0
-- IOX_SETUP: TwoMeasurementsManyFieldsTwoChunks
-- validate we have access to information schema for listing system tables
-- IOX_COMPARE: sorted
SELECT * from h2o;
-- Plan will look like:
-- . Two overlapped chunks overlap, one parquet and one from ingester
-- . The parquet chunk already sorted -> no n... |
-- Convert schema 'lib/auto/Tapper/Schema/Tapper-Schema-TestrunDB-3.000003-MySQL.sql' to 'Tapper::Schema::TestrunDB v3.000004':;
BEGIN;
ALTER TABLE host ADD COLUMN is_deleted TINYINT DEFAULT 0;
ALTER TABLE message CHANGE COLUMN message message text,
CHANGE COLUMN type type VARCHAR(255);
ALTER TA... |
-- Episodes table
CREATE TABLE episodes (
ep_id SERIAL PRIMARY KEY,
number INTEGER NOT NULL UNIQUE,
name VARCHAR(100) NOT NULL UNIQUE,
date DATE NOT NULL
);
-- Artists table
CREATE TABLE artists (
artist_id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL UNIQUE
);
CREATE INDEX... |
IF NOT EXISTS(SELECT [schema_id] FROM sys.schemas WHERE [name]='Payments')
BEGIN
EXEC('CREATE SCHEMA Payments')
END
GO
-----------------------------------------------------------------------------------------------------------------------------------------------
-- Payments
-----------------------------------... |
USE LearningSQL
INSERT INTO Users
(FNAME, LNAME, DOB)
VALUES
('John', 'Doe', '09/14/1975'),
('Jane', 'Doe', '07/21/1976')
--find userID
SELECT USER_ID FROM Users
WHERE FNAME like '%John'
AND DOB = '09/14/1975'
SELECT GETDATE()
INSERT INTO Notes
(NOTE_BODY, DATE, USER_ID)
VALUES
('This will be an interesing cla... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 12, 2020 at 05:43 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
create table if not exists gameDate (
id bigint auto_increment,
seasonId bigint not NULL,
day date not NULL,
PRIMARY KEY (id),
unique key ux_seasonDay(seasonId, day)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
<filename>Difinity 2019/DatabaseInternals/DatabaseInternals/053.Region.sql
-- Clustered v Non Clustered Index
USE [Northwind]
GO
Select *
from [dbo].[RegionCopy]
Select [RegionID], [RegionDescription], sys.fn_PhysLocFormatter(%%physloc%%) as [Physical RID]
from [dbo].[RegionCopy]
Exec CheckDB.[dbo].[prc_ReadPageDat... |
<filename>Xholon/exports/sql2/design02.sql
/*
To view this file, download an open-source relational database product such as mysql or postgresql or sqlite.
Automatically generated by Xholon version 0.9.1, using Xholon2Sql2.java
Thu Dec 19 11:02:47 GMT-500 2019 1576771367116
model: based on Universe of Fish
www.primor... |
{% if doid %}
SELECT
d.typnamespace as scid
FROM
pg_type d
WHERE
d.oid={{ doid }}::oid;
{% else %}
SELECT
d.oid
FROM
pg_type d
JOIN
pg_namespace bn ON bn.oid=d.typnamespace
WHERE
bn.nspname = {{ basensp|qtLiteral }}
AND d.typname={{ name|qtLiteral }};
{% endif %}
|
<reponame>14550508/ucsc-mit<filename>english/administrator/components/com_admin/sql/updates/mysql/1.7.0-2011-06-06-2.sql
ALTER TABLE `#__languages` ADD COLUMN `ordering` int(11) NOT NULL default 0 AFTER `published`;
ALTER TABLE `#__languages` ADD INDEX `idx_ordering` (`ordering`);
|
-- wal.test
--
-- execsql {
-- PRAGMA cache_size = 10;
-- PRAGMA page_size = 1024;
-- CREATE TABLE t1(x PRIMARY KEY);
-- }
PRAGMA cache_size = 10;
PRAGMA page_size = 1024;
CREATE TABLE t1(x PRIMARY KEY); |
<filename>src/test/resources/sql/create_table/0d852303.sql
-- file:inherit.sql ln:725 expect:true
create table pp_intrangepart (a int4range) partition by list (a)
|
CREATE DATABASE IF NOT EXISTS acme;
CREATE TABLE IF NOT EXISTS `acme`.`person` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`fullName` VARCHAR(100) NOT NULL,
`phone` CHAR(15) NOT NULL,
`currency` CHAR(3) NOT NULL,
`price` DECIMAL(6,2) NOT NULL,
PRIMARY KEY (`id`));
INSERT INTO `acme`.`person` (`id`, `fullNa... |
DROP DATABASE IF EXISTS ninaDB;
CREATE DATABASE ninaDB;
USE ninaDB;
CREATE TABLE favoriteItems (
id INT NOT NULL AUTO_INCREMENT,
toy VARCHAR(45) NULL,
activity VARCHAR(45) NULL,
food VARCHAR(45) NULL,
PRIMARY KEY (id)
);
INSERT INTO favoriteItems (toy, activity, food)
VALUES ("piggy", "cuddling", "waterm... |
INSERT INTO `attendance_status`(`id`, `name`) VALUES (1, 'accepted');
INSERT INTO `attendance_status`(`id`, `name`) VALUES (2, 'pending');
INSERT INTO `attendance_status`(`id`, `name`) VALUES (3, 'rejected');
INSERT INTO `category`(`id`, `name` ) VALUES (1,'Outdoors & Adventure');
INSERT INTO `category`(`id`, `name` )... |
<reponame>richardyjkim/second-project
DROP DATABASE IF EXISTS second_project_db;
CREATE DATABASE second_project_db; |
/*
Table: Sales
+-------------+-------+
| Column Name | Type |
+-------------+-------+
| sale_id | int |
| product_id | int |
| year | int |
| quantity | int |
| price | int |
+-------------+-------+
(sale_id, year) is the primary key of this table.
product_id is a foreign key to Produ... |
USE db;
CREATE TABLE users (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(50) NOT NULL,
UNIQUE (email)
);
CREATE TABLE products (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50),
user_id INT,
FOREIGN KEY (user_id) REFERENCES users(id)
);
INSERT INTO users(id, email) values(1, ... |
CREATE MATERIALIZED VIEW author_aggregation
AS
select wos_standard, first_name, last_name, display_name, orcid_id, r_id, dais_id,
array_agg(id) as summary_ids,
array_agg(seq_no) as seq_nos,
array_agg(role) as roles
from wos_summary_names sumNames
group by wos_standard, first_name, last_name, d... |
--- The fence agents package broke backward compatibility by not supporting boolean flags to be provided without
--- a value. i.e. from now on for example 'lanplus' is not legal while 'lanplus=1' or 'lanplus=true' is OK
--- This upgrade script will change all known flags used by existing agents to have an explicit valu... |
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 26, 2016 at 01:24 PM
-- Server version: 5.6.26
-- PHP Version: 5.5.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<gh_stars>10-100
INSERT INTO sys_users (id,created_at,updated_at,deleted_at,uuid,user_name,pass_word,nick_name,header_img,authority_id,authority_name,username,password,phone_data,manager) VALUES (
10,1568366626000,1571627763000,NULL,NULL,NULL,NULL,'超级管理员','http://qmplusimg.henrongyi.top/1571627762timg.jpg',888,NULL,'ad... |
<filename>src/plugins/kraken/src/database/upgrade/11/gateway_mysql.sql
# Update ICQ connection hostname
UPDATE ofProperty SET propValue = 'login.icq.com' WHERE name = 'plugin.gateway.icq.connecthost';
# Update database version
UPDATE ofVersion SET version = 11 WHERE name = 'gateway';
|
<reponame>iaghugh/psma-admin-bdys
CREATE OR REPLACE FUNCTION PolygonalIntersection(a geometry, b geometry) RETURNS geometry(MultiPolygon, {0}) AS $$
SELECT ST_Multi(ST_Union(geom))
FROM (
SELECT (ST_Dump(ST_Intersection(a, b))).geom
UNION ALL
SELECT ST_SetSRID(ST_GeomFromText('POLYGON EMPTY'), {0})
) ... |
<gh_stars>10-100
/*
################################################################################
Migration script to convert NHGRI GWAS database dump to revised EBI schema.
Designed for execution with Flyway database migrations tool; this should be
automatically run to completely generate the schema that is out-o... |
<reponame>cb-deepak/pgcodekeeper
CREATE TABLE public.agent(
id BIGINT
); |
<reponame>ajiader/lulublog
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2015 年 01 月 30 日 14:24
-- 服务器版本: 5.6.12-log
-- PHP 版本: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
create extension citext;
create extension pgcrypto;
create table auths (
id bigserial primary key not null,
pass text not null,
email citext not null unique,
email_verification_code text not null,
is_email_verified boolean not null
);
|
<gh_stars>0
create type spr_admin.web_acq_get_it as (
_auth spr.auth_t,
acq_min_ts bigint,
acq_max_ts bigint
);
create type spr_admin.web_acq_get_t as (
acqs jsonb -- { logger_id: [acqs] }
);
create function spr_admin.web_acq_get (
it spr_admin.web_acq_get_it
)
returns spr_admin... |
CREATE FUNCTION fnVehiculosDeClientes_SeleccionarPorId (@Matricula VARCHAR(9))
RETURNS TABLE
AS
RETURN
SELECT * FROM vwVehiculosDeClientes_SeleccionarTodos AS VehiculosDeClientes
WHERE VehiculosDeClientes.Matricula = @Matricula |
CREATE TABLE pages (
id bigint UNSIGNED AUTO_INCREMENT,
pageName varchar(100) NULL,
isHidden tinyint(1) NULL,
`order` int NULL,
displayName varchar(100) NOT NULL,
CONSTRAINT id
UNIQUE (id)
);
INSERT INTO hw09.pages (pageName, isHidden, `order`, displayName) VALUES ('index'... |
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2018/3/19 20:06:22 */
/*==============================================================*/
drop table if exists t_client;
drop table if exis... |
<gh_stars>0
CREATE TABLE department(
dept_no VARCHAR NOT NULL,
dept_name VARCHAR NOT NULL,
PRIMARY KEY (dept_no)
);
--select * from department
CREATE TABLE dept_emp(
emp_no INT,
dept_no VARCHAR,
FOREIGN KEY (emp_no) REFERENCES employees(emp_no),
FOREIGN KEY (dept_no) REFERENCES departments(dept_no)
);
--sele... |
CREATE TABLE `users` ( `id` INT NOT NULL AUTO_INCREMENT , `name` VARCHAR(255) NOT NULL , `email` VARCHAR(64) NOT NULL , `password` VARCHAR(64) NOT NULL , `created_at` TIMESTAMP NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;
INSERT INTO `users` (`name`, `email`, `password`, `created_at`) VALUES ('<NAME>', '<EMAIL>', '<... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 29, 2019 at 09:30 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
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 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 21-12-2019 a las 23:12:50
-- Versión del servidor: 10.3.16-MariaDB
-- Versión de PHP: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00"... |
-- INSERT Projects
DROP TABLE IF EXISTS projects;
CREATE TABLE projects (
id SERIAL PRIMARY KEY,
name VARCHAR,
description VARCHAR,
created_at timestamp default current_timestamp
);
INSERT INTO projects (name, description) VALUES ('super projet', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec... |
<reponame>lisezmoi/scri.ch<filename>schema.sql
CREATE TABLE `drawings` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`short_id` varchar(200) NOT NULL,
`parent` int(11) unsigned,
`settings` longtext,
`date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`, `s... |
/* Formatted on 25/09/2014 16:08:42 (QP5 v5.126.903.23003) */
-- TABLE: ACCB.ACCB_TRNSCTN_DETAILS
-- DROP TABLE ACCB.ACCB_TRNSCTN_DETAILS;
CREATE TABLE ACCB.ACCB_TRNSCTN_DETAILS (
TRANSCTN_ID NUMBER NOT NULL,
ACCNT_ID NUMBER,
TRANSACTION_DESC VARCHAR2 (500) NOT NULL,
DBT_... |
<filename>parte001/ex129_pedidos_pizzeria_smallint_tinyint_auto_increment.sql
-- 1. Elimine la tabla "pedidos" si existe:
DROP TABLE IF EXISTS pedidos;
-- 2. Cree la tabla eligiendo el tipo de dato adecuado para cada campo:
CREATE TABLE pedidos(
numero TINYINT UNSIGNED AUTO_INCREMENT,
nombre VARCHAR(8) NOT NUL... |
/*
* The Flyway tool applies this migration to create the database.
*
* Follow this style guide https://about.gitlab.com/handbook/business-ops/data-team/platform/sql-style-guide/
* use VARCHAR(63) for names in organization and schema
*
* Copy a version of this comment into the next migration
*
*/
CREATE TABLE ... |
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/log/Release_1_0_logs/s2s/procfunpacks/GET_SALARY_SUMMARY_FOR_EDI.sql
CREATE OR REPLACE procedure get_salary_summary_for_edi
( as_proposal_number IN osp$budget_per_details_for_edi.PROPOSAL_NUMBER%TYPE,
ai_version IN osp$budget_details.v... |
USE tempdb;
GO
IF OBJECT_ID (N'#Bicycles',N'U') IS NOT NULL
DROP TABLE #Bicycles;
GO
SELECT *
INTO #Bicycles
FROM AdventureWorks2012.Production.Product
WHERE ProductNumber LIKE 'BK%';
GO |
# ------------------------------------------------------------------------ #
# XOOPS - PHP Content Management System #
# Copyright (c) 2000-2016 XOOPS.org #
# <http://xoops.org/> #
# ---------... |
<reponame>fivetran/dbt_apple_ads_source
{% macro get_creative_set_report_columns() %}
{% set columns = [
{"name": "_fivetran_id", "datatype": dbt_utils.type_string()},
{"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()},
{"name": "ad_format", "datatype": dbt_utils.type_string()},
{"nam... |
{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled','hubspot_email_event_enabled','hubspot_email_event_status_change_enabled'])) }}
with base as (
select *
from {{ ref('stg_hubspot__email_event_status_change_tmp') }}
), macro as (
select
{{
fivetran_utils.fill_... |
ALTER TABLE {$NAMESPACE}_releeph.releeph_request
DROP COLUMN summary;
|
<reponame>AstroHQ/metrics-sqlite
CREATE TABLE IF NOT EXISTS metrics (
id integer NOT NULL primary key autoincrement,
timestamp real NOT NULL,
key text NOT NULL,
value integer NOT NULL
);
CREATE INDEX IF NOT EXISTS metrics_timestamp_idx ON metrics (timestamp);
CREATE INDEX IF NOT EXISTS metrics_key_idx O... |
<reponame>catcoderphp/mproject
-- MySQL dump 10.13 Distrib 5.7.25, for Linux (x86_64)
--
-- Host: localhost Database: mproject
-- ------------------------------------------------------
-- Server version 5.7.25-0ubuntu0.18.04.2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHAR... |
/*
Navicat MySQL Data Transfer
Source Server : Local
Source Server Version : 100203
Source Host : localhost:3306
Source Database : medcast_v2
Target Server Type : MYSQL
Target Server Version : 100203
File Encoding : 65001
Date: 2018-02-09 10:30:56
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... |
-- @testpoint:opengauss关键字Iterate(非保留),自定义数据类型名为explain
--关键字explain作为数据类型不带引号,创建成功
drop type if exists Iterate;
CREATE TYPE Iterate AS (f1 int, f2 text);
select typname from pg_type where typname ='Iterate';
drop type Iterate;
--关键字explain作为数据类型加双引号,创建成功
drop type if exists "Iterate";
CREATE TYPE "Iterate" AS (f1 i... |
set session role=usertest32;
create schema sa;
|
<gh_stars>1-10
-- This file is automatically generated by LogicalPlanToSQLSuite.
SELECT id FROM parquet_t0 CLUSTER BY id
--------------------------------------------------------------------------------
SELECT `gen_attr` AS `id` FROM (SELECT `gen_attr` FROM (SELECT `id` AS `gen_attr` FROM `default`.`parquet_t0`) AS gen_... |
<reponame>borisreyson/rkbsys
-- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 21, 2018 at 03:57 AM
-- Server version: 10.1.33-MariaDB
-- PHP Version: 7.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = ... |
<reponame>fatdba/oracle-script-lib
-- ashdump-summary.sql
-- <NAME> -
-- <EMAIL>
--
-- this example is focused on finding blocked sessions
--
-- see ashdump.sql for creating an ASH dump
col session_id format 99999
col blocking_session format 99999
col min_sample_time format a27
col max_sample_time format a27
col e... |
<reponame>novosga-psa/psalsga<gh_stars>0
-- @adapter=PostgreSQL
-- @author=<NAME>
--
-- tables
--
-- Alteradas tabelas atendimentos, painel_senha, uni_serv e historico_atendimentos para inclusão de mais caracteres no campo senha
CREATE TABLE contador (
unidade_id INT NOT NULL,
total INT NOT NULL DEFAULT 0,
... |
create table ejercicio4.encuentros(
nro_encuentro integer NOT NULL,
fecha date,
nombre_hipo varchar(255) NOT NULL,
PRIMARY KEY (nro_encuentro)
);
create table ejercicio4.carreras(
nro_encuentro integer NOT NULL,
nro_de_carrera integer NOT NULL,
tipo_de_pista varchar(255),
estado_de_pista varc... |
SELECT /*%expand*/* FROM EMPLOYEE WHERE employee_id = /*employeeId */0 |
<gh_stars>0
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: 172.16.58.3 Database: S2C
-- ------------------------------------------------------
-- Server version 8.0.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL... |
--SQL Join Exercises, Practice, Solution - JOINS exercises on soccer Database
--1. From the following tables, write a SQL query to find the venue where
--EURO cup 2016 final match held. Return venue name, city.
select * from soccer_venue sv ;
select * from soccer_city sc ;
select * from match_mast mm ;
select sv.... |
<filename>sample_gaia/gaia_query.sql
-- Query to download al sources within a cone of radius r = 3.5 degree centred in Oph
SELECT "ra", "dec", "source_id", "parallax", "parallax_error","parallax_over_error",
"pmra", "pmra_error", "pmdec", "pmdec_error", "phot_g_mean_mag","phot_g_mean_flux_over_error",
"phot_bp_mean_f... |
prompt &s1.Merge message severities
merge into pit_message_severity pse
using (select 10 pse_id, 'LEVEL_OFF' pse_name
from dual
union all
select 20, 'LEVEL_FATAL' from dual union all
select 30, 'LEVEL_ERROR' from dual union all
select 40, 'LEVEL_WARN' from dual union all
se... |
/********************************************************************************************************************
AUTHOR : <NAME>
CREATED : 05/26/2021
NAME : 01-DASH_TC1_REFERENCE_TableCreationScripts V1.0.sql
PURPOSE : The purpose of this script is to cre... |
<gh_stars>0
INSERT INTO KRIM_ROLE_MBR_T (ROLE_MBR_ID, VER_NBR, OBJ_ID, ROLE_ID, MBR_ID, MBR_TYP_CD, ACTV_FRM_DT, ACTV_TO_DT, LAST_UPDT_DT)
VALUES (KRIM_ROLE_MBR_ID_S.NEXTVAL, 1, SYS_GUID(), (SELECT ROLE_ID FROM KRIM_ROLE_T WHERE ROLE_NM = 'Modify Subaward'
AND NMSPC_CD='KC-SUBAWARD'), (SELECT PRNCPL_ID FROM KRIM_PRNCPL... |
-- Perform a basic selection on the students table
SELECT * FROM students;
-- Select specific attributes from the students table
SELECT id, name, surname, subject FROM students;
-- Select distinct values form the students table
SELECT DISTINCT * FROM students;
-- Defining column aliases
SELECT name, surname,
... |
<filename>src/test/resources/import.sql
-- this sql is intentionally kept empty
-- the purpose of this sql file is to prevent the integration test from executing the import.sql at the "main/resources", because that is meant for demo
-- for the test, the test code itself instantiates its own set of data |
<gh_stars>0
CREATE DATABASE IF NOT EXISTS `desafiopubfuture` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `desafiopubfuture`;
-- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: desafiopubfuture
-- ------------------... |
<filename>fdb-sql-layer-pg/src/test/resources/com/foundationdb/sql/pg/select/select-5.sql
SELECT customers.name,order_date FROM customers,orders WHERE customers.cid = orders.cid ORDER BY order_date |
<filename>source/database/migrations/mig_000045/upd_t_operaciones.sql
UPDATE t_operaciones a
SET a.version_actual = '0.2.0'
WHERE a.nombre = 'LISTAR_TORNEOS';
|
<reponame>yh-coder/weather
insert into city values
(3854293,"Hill Station","AR",-69.23307,-51.57542),
(3866035,"Alto Rio Senguer","AR",-70.819817,-45.04105),
(3833259,"Valle","AR",-67.48333,-45.799999),
(3855116,"<NAME>","AR",-63.81255,-22.595881),
(3836620,"<NAME>","AR",-64.325981,-23.132231),
(3855141,"General Alvara... |
<reponame>hulinhao/shop
/*
Navicat MySQL Data Transfer
Source Server : 172.16.31.10_test
Source Server Version : 50648
Source Host : 172.16.31.10:3306
Source Database : shop
Target Server Type : MYSQL
Target Server Version : 50648
File Encoding : 65001
Date: 2020-07-31 16:15:54
*/
... |
<reponame>adam010/lavarel010
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50505
Source Host : localhost:3306
Source Database : chdb
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2016-12-01 11:28:19
*/
SET FOREI... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 11, 2021 at 02:24 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 7.4.19
-- --------------------------------------------------------
--
-- Dumping data for table `vendors`
--
INSERT INTO `vendo... |
--------------------------------------------------------
-- DDL for Table MESOPELAGIC_GEAR_CODES
--------------------------------------------------------
CREATE TABLE "GROUNDFISH"."MESOPELAGIC_GEAR_CODES"
( "GEARCD_ID" NUMBER(4,0),
"DESCRIPTION" VARCHAR2(50 BYTE)
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 21, 2019 at 10:00 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
CREATE TABLE [semanticinsight].[data_attribute_mapping] (
[data_attribute_mapping_id] INT IDENTITY (1, 1) NOT NULL,
[data_object_mapping_id] INT NOT NULL,
[source_data_attribute_id] INT NOT NULL,
[destination_data_attribute_id] INT NOT NULL,
CONSTRAINT [PK_data_attribute_mappin... |
<reponame>DataHandwerk/DataHandwerk-toolkit-mssql<gh_stars>1-10
CREATE View reference.RepoObjectColumn_ReferencingList
As
Select
ror.Referenced_guid
, AntoraReferencingColumnList =
--
String_Agg ( ror.referencing_AntoraXref, Char ( 13 ) + Char ( 10 )) Within Group(Order By
... |
-- Verify seattleflu/schema:roles/enroller on pg
begin;
select 1/pg_catalog.has_database_privilege('enroller', :'DBNAME', 'connect')::int;
select 1/pg_catalog.has_schema_privilege('enroller', 'receiving', 'usage')::int;
select 1/pg_catalog.has_column_privilege('enroller', 'receiving.enrollment', 'document', 'insert')... |
-- file:circle.sql ln:40 expect:true
SELECT '' AS four, f1 FROM CIRCLE_TBL WHERE diameter(f1) >= 10
|
CREATE PROCEDURE [Development].[AddMonitoringColumns]
(
@TableName SYSNAME
, @Schema SYSNAME = NULL
)
AS
BEGIN
SET @Schema = ISNULL(@schema, 'dbo');
DECLARE
@Isthere INT;
DECLARE
@CheckForColumn NVARCHAR(300) =
'select @Isthere =count(*) from INFORMATION_SCHEMA.COLUMNS T wher... |
<reponame>IsyFact/isy-benutzerverwaltung<gh_stars>0
---
-- #%L
-- IsyFact Benutzerverwaltung Core
-- %%
-- Copyright (C) 2016 - 2017 Bundesverwaltungsamt (BVA)
-- %%
-- 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.