sql stringlengths 6 1.05M |
|---|
--Updates triggerName field in the MOTECH_TASKS_TASKACTIVITY.
SET SQL_SAFE_UPDATES = 0;
UPDATE `MOTECH_TASKS_TASKACTIVITY` `dest`,
(SELECT
`trigger`.`id`, `trigger`.`displayName`, `task`.`id` AS 'taskId'
FROM
`MOTECH_TASKS_TASKTRIGGERINFORMATION` `trigger`, `MOTECH_TASKS_TASK` `task`
WHERE
... |
<reponame>bishwajit06/bitm
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 07, 2020 at 06:58 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "... |
/*
Warnings:
- You are about to drop the column `age` on the `User` table. All the data in the column will be lost.
- You are about to drop the `Post` table. If the table is not empty, all the data it contains will be lost.
- A unique constraint covering the columns `[userName]` on the table `User` will be add... |
--create table experience
CREATE TABLE IF NOT EXISTS experience (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES accounts(id),
employer VARCHAR (100) NOT NULL,
role VARCHAR(200) NOT NULL,
start_month SMALLINT NULL,
start_year SMALLINT NOT NULL,
end_month SMALLINT NULL,
end_year SMALLINT NOT NULL CHECK ... |
<reponame>RecroGridFramework/Recrovit.RecroGridFramework.Identity<filename>src/Recrovit.RecroGridFramework.Identity/App_Data/Recrovit.RGF/Import/RGF.Identity/Oracle/rgf_identity.sql
RGF.CMD.Import RGF.Identity\identity_recrogrid_entity.json
/
RGF.CMD.Import RGF.Identity\identity_rgf_menu.json
/ |
CREATE TABLE votes (
id integer PRIMARY KEY,
option_name varchar(20),
number_of_votes integer
);
INSERT INTO votes (id, option_name, number_of_votes) VALUES (1, 'cats', 10);
INSERT INTO votes (id, option_name, number_of_votes) VALUES (2, 'dogs', 7);
|
<gh_stars>1-10
# 新建root角色
INSERT INTO T_SYSTEM_ROLE (name, name_show, des, status) VALUES ('root', 'ROOT管理员', null, 1);
# 新建root用户
INSERT INTO T_STAFF (name, account, password, status) VALUES ('ROOT用户', 'root', '<PASSWORD>', 1);
# 绑定账户与角色
INSERT INTO T_STAFF_ROLE(staff_id, role_id, des) SELECT t1.id, t2.id, '系统初始化' f... |
<gh_stars>10-100
-- file:rowsecurity.sql ln:29 expect:true
CREATE ROLE regress_rls_group2 NOLOGIN
|
<filename>vtools/ContourLab/docs/love.cont.ddl
//#include <Contour.ddl>
Contour Data=
{
{
{ { 'O' , True , True , True } , 0 , &Pad0 },
{ { 'radius' , True , True , True } , 1 , &Pad1 },
{ { 'rat' , True , True , True } , 2 , &Pad2 },
{ { 'blen' , True , True , True } , 3 , &Pad3 },
{ { 'alen' , True... |
<filename>services/product/src/main/resources/scripts/jemmy_product.sql<gh_stars>0
CREATE DATABASE IF NOT EXISTS `jemmy_product` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `jemmy_product`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 192.168.99.100 Database: jemmy_product
-- ----------------... |
<reponame>aravi5/drill-test-framework
select s_address, s_phone, s_acctbal
from `filter/pushdown/varchar_decimal/new_metadata_file/1.14.0/supplier`
where not s_acctbal > -900;
|
<reponame>robertsaxby/migrating_dwh_to_bq
select s.* from `da304_staging.Store_sales` s where s.d_date= cast('{{params.partition_date}}' as date)
|
CREATE TABLE TEST_TABLE_2 (
OID CHARACTER (36) PRIMARY KEY
); |
<reponame>jensim/sourcegraph
BEGIN;
-- Add default values for git commit author (name and email)
UPDATE changeset_specs
SET spec = spec || json_build_object(
'commits',
json_build_array(
spec->'commits'->0 || '{"authorName": "Sourcegraph", "authorEmail": "<EMAIL>"}'
)
)::jsonb
WH... |
\qecho
\qecho === Deploy Schema [schema_name_second]
\qecho
set schema 'schema_name_second'
\include ./service/install_script_2_schema_name_second_BEFORE_0.sql
|
<filename>Tellma.Database.Application/dbo/User Defined Types/dbo.LookupDefinitionList.sql
CREATE TYPE [dbo].[LookupDefinitionList] AS TABLE (
[Index] INT PRIMARY KEY DEFAULT 0,
[Id] INT NOT NULL DEFAULT 0,
[Code] NVARCHAR (50),
[TitleSingular] NVARCHAR (50),
[TitleSingular2] NVARCHAR (50),
[T... |
/*
Navicat Premium Data Transfer
Source Server : 本地
Source Server Type : MySQL
Source Server Version : 50728
Source Host : localhost:3306
Source Schema : master
Target Server Type : MySQL
Target Server Version : 50728
File Encoding : 65001
Date: 07/12/2021 21:31:30
*... |
select name, data_type, key_id, policies, tags_src, tags, partition, region, tier
from aws.aws_ssm_parameter
where akas::text = '["{{output.resource_aka.value}}"]'
|
WITH cte_0 AS (SELECT * FROM other_t0), cte_1 AS (SELECT * FROM other_t1 WHERE thing=$1 AND stuff=$2) SELECT * FROM "t"; |
-- @testpoint:opengauss关键字binary(非保留),作为数据库名
--关键字不带引号-成功
drop database if exists binary;
create database binary;
--清理环境
drop database binary;
--关键字带双引号-成功
drop database if exists "binary";
create database "binary";
--清理环境
drop database "binary";
--关键字带单引号-合理报错
drop database if exists 'binary';
create database 'bi... |
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字offset(保留),作为序列名
--关键字不带引号-合理报错
drop sequence if exists offset;
create sequence offset start 100 cache 50;
--关键字带双引号-成功
drop sequence if exists "offset";
create sequence "offset" start 100 cache 50;
--清理环境
drop sequence "offset";
--关键字带单引号-合理报错
drop sequenc... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.127.12
-- Generation Time: Aug 08, 2021 at 08:24 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 = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... |
INSERT INTO `users` (`id`, `username`, `lastpoll`) VALUES (1, 'testuser1', NULL);
INSERT INTO `users` (`id`, `username`, `lastpoll`) VALUES (2, 'testuser2', NULL);
INSERT INTO `profiles` (`id`, `name`) VALUES (1, 'testprofile1');
INSERT INTO `profiles` (`id`, `name`) VALUES (2, 'testprofile2');
INSERT INTO `profile_u... |
<filename>dump_base_de_datos.sql<gh_stars>0
DROP DATABASE IF EXISTS lechuapp;
CREATE DATABASE lechuapp;
USE lechuapp;
DROP TABLE IF EXISTS client;
CREATE TABLE client(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
nombre VARCHAR(50) NOT NULL,
telefono VARCHAR(50) NOT NULL
);
INSERT INTO client (nombre,tele... |
insert into zoo.User_Role (id, name, created_at, updated_at)
values (1, 'ADMIN', '2021-04-25 12:19:37', '2021-04-25 12:19:37'),
(2, 'VENDEUR', '2021-04-25 12:19:37', '2021-04-25 12:19:37'),
(3, 'AGENT D''ACCUEIL', '2021-04-25 12:19:37', '2021-04-25 12:19:37'),
(4, 'AGENT D''ENTRETIENT', '20... |
<gh_stars>1-10
-- We use pattern matching against the chart of accounts. Fill in each of the below according to your structure. Feel free
-- to define your own categories here as well by just copying an existing SELECT below and being sure to define the Order value
-- and put in your own pattern.
DECLARE @EarningsPa... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 30, 2019 at 08:07 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
SELECT
e.EmployeeID,
e.FirstName,
e.LastName,
d.Name AS DepartmentName
FROM Employees AS e
INNER JOIN Departments AS d
ON d.DepartmentID = e.DepartmentID
AND d.Name = 'Sales'
ORDER BY e.EmployeeID |
<filename>egov/egov-ptis/src/main/resources/db/migration/main/V20170601190140__ptis_alter_egpt_mutation_add_decree_column.sql
alter table egpt_property_mutation add column decree_number character varying(64),add column decree_date timestamp without time zone,add column court_name character varying(128);
|
<reponame>rickyork/Hot-Toddy
SELECT `hCalendarBegin`
FROM `hCalendarFiles`
WHERE `hCalendarId` = {hCalendarId}
AND `hCalendarCategoryId` = {hCalendarCategoryId}
AND `hCalendarBegin` > {php.time()}
ORDER BY `hCalendarBegin` ASC
LIMIT 1
|
SELECT problem, instance, SolverName, round(elapsedSecs,2) as elapsedSecs, Objective, Optimally , Solved, Searchtype, mif FROM
JobResult jr INNER JOIN Config cf ON jr.ConfigId = cf.ID
INNER JOIN Solver sv ON jr.SolverId = sv.ID
-- group by instance, SPD, Objective
where timeout > 10000 and solved = 0
order by proble... |
<gh_stars>1-10
CREATE TABLE [ZGWOptional].[Directories] (
[Function_SeqID] INT NOT NULL,
[Directory] VARCHAR (255) NOT NULL,
[Impersonate] INT NOT NULL,
[Impersonating_Account] VARCHAR (50) NULL,
[Impersonating_Password] VARCHAR (50) NULL,
... |
-- file:create_table_like.sql ln:4 expect:true
/*
* Test double inheritance
*
* Ensure that defaults are NOT included unless
* INCLUDING DEFAULTS is specified
*/
CREATE TABLE ctla (aa TEXT)
|
UPDATE gitem_list
SET title = ?,
channel_title = ?,
published = ?,
last_checked = ?,
thumb_url = ?
WHERE gitem_id = ?; |
<reponame>FScoward/fan-share-fun
-- MySQL Script generated by MySQL Workbench
-- 02/14/16 21:58:09
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MOD... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 06, 2020 at 08:44 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>tables/notificationType.sql<gh_stars>0
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `notificationType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `notificationType` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`isActive` tinyint(... |
-- Your SQL goes here
INSERT INTO songs (
title, past_difficulty, present_difficulty, future_difficulty
) VALUES
("Diode", 2, 5, 8),
("FREEF4LL", 4, 7, 8),
("GLORY:ROAD", 4, 7, 10),
("Monochrome Princess", 4, 7, 9),
("Heavenly careless", 3, 7, 9);
|
CREATE TABLE CPF_USER_GROUPS (
USER_GROUP_ID NUMBER(19) NOT NULL,
MODULE_NAME VARCHAR2(255) NOT NULL,
USER_GROUP_NAME VARCHAR2(255) NOT NULL,
DESCRIPTION VARCHAR2(4000),
ACTIVE_IND NUMBER(1,0) NOT N... |
CREATE TABLE m_acc_cert_campaign (
definitionRef_relation VARCHAR2(157 CHAR),
definitionRef_targetOid VARCHAR2(36 CHAR),
definitionRef_type NUMBER(10, 0),
endTimestamp TIMESTAMP,
handlerUri VARCHAR2(255 CHAR),
iteration NUMBER(10, 0) NOT NULL,
name_norm ... |
<reponame>banboy38/Team-Cosmic<filename>UserData/UserData.sql
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: cosmic
-- ------------------------------------------------------
-- Server version 8.0.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 S... |
<gh_stars>1000+
-------------------------------------------------------------------------------
-- disk file
-------------------------------------------------------------------------------
CREATE TABLE DISK_FILE(
ID BIGINT NOT NULL,
NAME VARCHAR(200),
FILE_SIZE BIGINT,
VALUE VARCHAR(200),
TYPE VA... |
-- @testpoint: opengauss关键字enum(非保留),作为同义词对象名,部分测试点合理报错
--前置条件
drop table if exists enum_test;
create table enum_test(id int,name varchar(10));
--关键字不带引号-成功
drop synonym if exists enum;
create synonym enum for enum_test;
insert into enum values (1,'ada'),(2, 'bob');
update enum set enum.name='cici' where enum.id=2;
... |
<gh_stars>0
-- @testpoint: 创建多个表,创建相同索引名,合理报错
drop table if exists table_ind_confs_004;
create table table_ind_confs_004(
c_id int, c_integer integer,
c_real real,c_float float, c_double int,
c_decimal decimal(38), c_number number(38),c_number1 number,c_number2 number(20,10),c_numeric numeric(38),
c_char char(50) defa... |
<gh_stars>0
### Schema
DROP DATABASE IF EXISTS todo_db;
CREATE DATABASE todo_db;
USE todo_db;
CREATE TABLE todo
(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
complete BOOLEAN DEFAULT false,
PRIMARY KEY (id)
); |
<reponame>Coslate/MySQL-Bootcamp<gh_stars>0
CREATE TABLE users(
email VARCHAR(255) PRIMARY KEY NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT NOW()
);
INSERT INTO users(email) VALUES
('<EMAIL>'),
('<EMAIL>');
|
<filename>process shortsReal.sql
/*
share short data procedure
-- to add imported short data to the share data
-- and link them.
-- WARNING can take up to 24 hours to run the process
-- author PE 2014
*/
--------------------------------------------------------------------
-- populate shares table with short and
--... |
-- Adminer 4.2.1 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`comment` text COLLATE utf8_unicode_ci NOT NULL,
`project_id` int(10... |
INSERT INTO department (department_name)
VALUES
('Human Resources'),
('Sales'),
('Marketing'),
('Information Tech'),
('Legal');
INSERT INTO role (title, salary, department_id)
VALUES('Account Executive', 100000, 1),
('Sr. Account Executive', 152000, 1),
('Sales Director', 223000, 1),
('HR Coordinator', 65000, 2),
('H... |
<reponame>aurelien22/equiKenotte<gh_stars>0
INSERT INTO mydb.dentistes(nom, prenom, adresse, codePostal, ville, telephone, email, siret, login, mdp) VALUES ('serret', 'leslie', '39 rue ange de guernisac', '29600', 'morlaix', '0681626347', '<EMAIL>', '83208269700026', 'lserret', 'password');
INSERT INTO mydb.dentistes(n... |
<filename>database/sql/20210924.sql
create table users(
id bigint auto_increment primary key,
name varchar(255),
email varchar(255) unique,
password varchar(255)
);
create table comments(
id bigint auto_increment primary key,
comment varchar(255),
user_id bigint,
foreign key ( user_id )... |
<reponame>douglasrg1/Store
create procedure spReturnProduct
@Id uniqueidentifier
as
select
[Title],
[Description],
[Image],
[Price],
[QuantityOnHand]
from
[Product]
where
[Id] = @id |
-- Create a new function called 'FN_TrimWord' in schema 'dbo'
-- Drop the function if it already exists
IF EXISTS (
SELECT *
FROM INFORMATION_SCHEMA.ROUTINES
WHERE SPECIFIC_SCHEMA = N'dbo'
AND SPECIFIC_NAME = N'FN_TrimWord'
)
DROP FUNCTION dbo.[FN_TrimWord]
GO
-- Create the function in the specified schema
CREATE F... |
<filename>presensi.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 12 Sep 2020 pada 23.15
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
DROP DATABASE IF EXISTS kiosks;
CREATE DATABASE kiosks;
\c kiosks
CREATE TABLE kiosks (
id SERIAL PRIMARY KEY,
kiosk_id VARCHAR(20),
mall VARCHAR(40),
city VARCHAR(40),
state VARCHAR(15),
zip INT,
batteries_on_loan INT,
batteries_to_replace INT,
battery_count INT,
online BOOLEAN
) |
<filename>ic_pic.sql
set hive.strict.checks.large.query=false; set hive.mapred.mode=nonstrict;
CREATE TABLE dm_ic.tmp_ic_goods_with_teamtype_20200806_003 AS
SELECT
igd.pictures AS picture,
igd.kdt_id ... |
CREATE TABLE `activity_red_packets` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '红包活动标题' ,
`trigger` tinyint(1) NOT NULL DEFAULT 0 COMMENT '红包触发类型,0为大厅(红包雨),1为下注时(普通红包)' ,
`type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 ... |
USE AdventureWorks2008R2;
GO
SELECT p.Name AS ProductName,
NonDiscountSales = (OrderQty * UnitPrice),
Discounts = ((OrderQty * UnitPrice) * UnitPriceDiscount)
FROM Production.Product AS p
INNER JOIN Sales.SalesOrderDetail AS sod
ON p.ProductID = sod.ProductID
ORDER BY ProductName DESC;
GO
|
<filename>data/open-source/extracted_sql/OCA_connector.sql
SELECT id FROM res_users WHERE login=%s
update queue_job set state=pending where state in (started, enqueued)
UPDATE queue_job SET state=%s WHERE uuid=%s
UPDATE queue_job SET state=%s WHERE uuid=%s
SELECT 1 FROM ir_module_module
|
<filename>type/type.sql
GRANT CREATE,ALTER,SELECT,INSERT,UPDATE,DELETE ON example.* TO example@localhost IDENTIFIED BY 'example';
DROP TABLE IF EXISTS nodes;
CREATE TABLE nodes (
id int(10) unsigned NOT NULL default '0',
prototype varchar(255) default NULL,
name varchar(255) default NULL,
visible tinyint(3) un... |
MATCH (a:ANNOTATION)-[r:Body]-(b)-[r1:Body]-(a)
WHERE r <> r1
WITH DISTINCT a, b
MATCH (a)-[rb:Body]-(b)
WITH a, b, COLLECT(rb) AS bodies
CALL apoc.refactor.mergeRelationships(bodies, {}) YIELD rel
RETURN rel;
|
<filename>tests/data/postgresql/01_extensions.sql
-- Enable PostGIS (includes raster)
--CREATE EXTENSION IF NOT EXISTS postgis;
-- Enable pgcrypto
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
-- file:join.sql ln:22 expect:true
INSERT INTO J1_TBL VALUES (5, 0, 'five')
|
-- Titles
DROP TABLE IF EXISTS titles;
CREATE TABLE titles (
title_id VARCHAR PRIMARY KEY,
title VARCHAR
);
SELECT * FROM titles;
-- Employees
DROP TABLE IF EXISTS employees;
CREATE TABLE employees (
emp_no INTEGER PRIMARY KEY,
emp_title_id VARCHAR(5),
FOREIGN KEY (emp_title_id) REFERENCES titles(title_id),
b... |
-- 2018-02-23T13:59:30.145
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
/* DDL */ SELECT public.db_alter_table('M_Product_PlanningSchema','ALTER TABLE public.M_Product_PlanningSchema ADD COLUMN OnMaterialReceiptWithDestWarehouse CHAR(1) DEFAULT ''M'' NOT NULL')
;
|
<reponame>smith750/kc
DELIMITER /
CREATE TABLE AWARD_REPORT_NOTIFICATION_SENT (
AWARD_REPORT_TERM_ID DECIMAL(22) NULL,
AWARD_NUMBER VARCHAR(12) NOT NULL,
DUE_DATE DATE NOT NULL,
SENT_DATE DATE NOT NULL,
ACTION_CODE VARCHAR(3) NOT NULL,
UPDATE_TIMESTAMP DATE NOT NULL,
UPDATE_USER VARCHAR(60) NOT NULL... |
ALTER TABLE db_version CHANGE COLUMN required_8775_02_mangos_creature required_8775_03_mangos_gameobject bit;
-- cause bgs now have different spawnmodes all gameobjects on those maps must go
-- to all spwanmodes.. maybe this isn't valid for all gameobjects - but i won't
-- destroy again all bgs :p
UPDATE gameobject SE... |
-- Задание 1
USE `employees`;
CREATE OR REPLACE VIEW `average_salary_by_department` AS
SELECT
dept_emp.dept_no AS dept_no,
departments.dept_name AS dept_name,
ROUND(AVG(salaries.salary), 2) AS average_salary
FROM
dept_emp AS dept_emp
LEFT JOIN departments AS departments
ON dept_emp.d... |
<filename>database/src/main/flow_patterns/insert_additional_data.sql
/*
* Copyright 2021 ABSA Group Limited
*
* 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/l... |
<filename>util/src/main/resources/cleanAccount-postgresql.sql<gh_stars>1000+
CREATE OR REPLACE PROCEDURE cleanAccount(p_account_id varchar(36)) LANGUAGE plpgsql
AS $$
DECLARE
v_account_record_id bigint;
v_tenant_record_id bigint;
BEGIN
select record_id, tenant_record_id from accounts WHERE id = p_account_i... |
-- VARBINARY
CREATE TYPE sys.BBF_VARBINARY;
CREATE OR REPLACE FUNCTION sys.varbinaryin(cstring, oid, integer)
RETURNS sys.BBF_VARBINARY
AS 'babelfishpg_common', 'varbinaryin'
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
CREATE OR REPLACE FUNCTION sys.varbinaryout(sys.BBF_VARBINARY)
RETURNS cstring
AS 'babelfishpg_commo... |
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 10-03-2016 a las 05:23:10
-- Versión del servidor: 5.6.26
-- Versión de PHP: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 10.1.31-MariaDB - mariadb.org binary distribution
-- SO del servidor: Win32
-- HeidiSQL Versión: 9.5.0.5196
-- ------------------------------------------------... |
/*
SQLyog Ultimate v11.11 (64 bit)
MySQL - 5.6.26 : Database - bongyeu_vn
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHE... |
DROP FUNCTION IF EXISTS pg_catalog.network_larger(inet, inet) CASCADE;
SET LOCAL inplace_upgrade_next_system_object_oids = IUO_PROC, 6666;
CREATE FUNCTION pg_catalog.network_larger (
inet, inet
) RETURNS inet LANGUAGE INTERNAL STRICT as 'network_larger';
DROP FUNCTION IF EXISTS pg_catalog.network_smaller(inet, inet) C... |
SELECT FirstName+'.'+LastName+'@<EMAIL>' AS FullEmailAdress FROM Employees |
-- Create Tables
CREATE TABLE EMPLOYEE
(
PRIMARY KEY (ID) ,
ID BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
NAME VARCHAR(50) NOT NULL,
DATE_OF_BIRTH DATE NOT NULL,
SURNAME VARCHAR(50),
PERCENT_CUSTOMER DOUBLE,
PERCENT_DATE TIMESTAM... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 13 Mar 2021 pada 13.49
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
<filename>rust/rocket/mysql/init/1_init.sql
CREATE DATABASE holiday_bot;
CREATE USER 'rocket'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON holiday_bot.* TO rocket;
-- FLUSH PRIVILEGES;
|
-- --------------------------------------------------------
--
-- Table structure for table `g5_auth`
--
DROP TABLE IF EXISTS `g5_auth`;
CREATE TABLE IF NOT EXISTS `g5_auth` (
`mb_id` varchar(20) NOT NULL default '',
`au_menu` varchar(20) NOT NULL default '',
`au_auth` set('r','w','d') NOT NULL default '',
PR... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: 21 Mei 2018 pada 22.19
-- Versi Server: 5.7.22-0ubuntu18.04.1
-- PHP Version: 7.0.22-0ubuntu0.17.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER... |
<filename>conf/evolutions/default/2.sql
# --- !Ups
CREATE TABLE `packs` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `pack_id_UNIQUE` (`id` ASC),
UNIQUE INDEX `pack_name_UNIQUE` (`name` ASC)
);
# --- !Downs
DROP TABLE `packs`; |
<reponame>JR-Stark/iter-quizz<filename>data/create_table.sql
-- -----------------------------------------------------
-- Schema oquiz
-- -----------------------------------------------------
-- Par convention on va nommer toutes les tables au singulier, en minuscule et en anglais.
-- Chaque table contiendra un champs c... |
IF OBJECT_ID ('dbo.Activity') IS NOT NULL
DROP TABLE dbo.Activity
GO
CREATE TABLE Activity
(
ActivityID INT IDENTITY NOT NULL,
Title NVARCHAR(500) NOT NULL,
Description NVARCHAR(MAX) NULL,
StartTime DATETIME NULL,
EndTime DATETIME NULL,
PriorityID INT NOT NULL,-- DEFAULT (2)
ImportanceID INT NOT NULL,-- DEFAUL... |
<reponame>AldoMyrtaj/duckdb
SELECT sum(ws_ext_discount_amt) AS "Excess Discount Amount"
FROM web_sales,
item,
date_dim
WHERE i_manufact_id = 350
AND i_item_sk = ws_item_sk
AND d_date BETWEEN '2000-01-27' AND cast('2000-04-26' AS date)
AND d_date_sk = ws_sold_date_sk
AND ws_ext_discount_amt >
(SELE... |
<gh_stars>10-100
INSERT INTO houses VALUES
(1, 150000, tstzrange('2015-01-01', '2016-01-01')),
(1, 200000, tstzrange('2016-01-01', '2017-01-01')),
(2, 300000, tstzrange('2015-01-01', '2016-01-01')),
(3, 100000, tstzrange('2014-01-01', '2015-01-01')),
(3, 200000, tstzrange('2015-01-01', null)),
(4, 200000, ... |
<gh_stars>10-100
INSERT INTO book (id, publishingdate, title, isbn, version) VALUES (1, '2017-04-04', 'Hibernate Tips', '123-4567890123', 0);
INSERT INTO review (id, comment, fkBook) VALUES (1, 'This is a review', 1);
INSERT INTO review (id, comment, fkBook) VALUES (2, 'This is another review', 1); |
<filename>server/create_tables/lte_tbmrodata.sql<gh_stars>0
CREATE TABLE `tbmrodata` (
`start_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`serving_sector` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`interfering_sector` varchar(255) CHARACTER SET utf8 COLL... |
SELECT
min(t.title),
min(t.production_year),
min(chn.name)
FROM
cast_info ci,
title t,
char_name chn
WHERE
ci.movie_id = t.id
AND chn.id = ci.person_role_id
AND t.kind_id = 1
AND ci.role_id = 2;
|
<reponame>rchicangana/pica
--------------------------------------------------------
-- Archivo creado - domingo-septiembre-02-2018
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table ESTADO_USER
-----------------------------------------... |
/*==============================================================*/
/* Database name: Residency */
/* DBMS name: MySQL 5.0 */
/* Created on: 12/4/2016 5:40:12 PM */
/*===================================================... |
set client_min_messages to warning;
create extension if not exists pgtap;
reset client_min_messages;
begin;
select plan(3);
select has_function(
'ggircs_portal', 'fuel_is_carbon_taxed', array['ggircs_portal.fuel'],
'Function ggircs_portal.fuel_is_carbon_taxed should exist'
);
-- test data
insert into swrs.fuel_c... |
<reponame>opengauss-mirror/Yat
-- @testpoint: opengauss关键字exists(非保留),作为游标名,部分测试点合理报错
--前置条件
drop table if exists exists_test cascade;
create table exists_test(cid int,fid int);
--关键字不带引号-成功
start transaction;
cursor exists for select * from exists_test order by 1;
close exists;
end;
--关键字带双引号-成功
start transaction;
... |
--Oracle
SELECT TS.tenpo_id, TS.tenpo_mei, TS.shohin_id, S.shohin_mei
FROM TenpoShohin TS CROSS JOIN Shohin S; |
CREATE TABLE IF NOT EXISTS tasks (
task_id INT AUTO_INCREMENT,
title VARCHAR(255) NOT NULL,
start_date DATE,
due_date DATE,
priority TINYINT NOT NULL DEFAULT 3,
description TEXT,
PRIMARY KEY (task_id)
);
INSERT INTO tasks(title, priority)
VALUES
('My first task', 1),
('It is the second tas... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 01, 2018 at 10:11 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... |
<filename>sql/se.sql
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 31, 2015 at 01:44 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 30 Des 2020 pada 18.30
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<filename>examples/schema.sql<gh_stars>0
CREATE TABLE members (
id uuid,
email varchar(128),
hashed_password varchar(128),
name varchar(128),
PRIMARY KEY (id)
);
CREATE TABLE products (
id uuid,
name varchar(128),
ean varchar(128),
price decimal,
category_id uuid,
PRIMARY KE... |
<gh_stars>0
create table if not exists user(
user_id varchar(20),
user_pw varchar(255) not null,
mail varchar(40) not null,
gender varchar(10) not null,
class varchar(10) not null,
f_name varchar(10) not null,
l_name ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.