sql stringlengths 6 1.05M |
|---|
<gh_stars>1-10
library ANCDT14
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'
include ANCConfig called Config
include ANCConcepts called Cx
include ANCDataElements called PatientData
include ANCContactDataElements called ContactData
context Patient
/*
"Hematocrit (Ht)" < 20%
*/
define "Should Follo... |
<gh_stars>0
-- 初始化表23 :菜单状态字典表数据
insert into dic_jinlong_system_menu_state (value, name) values (1, '未激活');
insert into dic_jinlong_system_menu_state (value, name) values (2, '已激活');
insert into dic_jinlong_system_menu_state (value, name) values (3, '锁定菜单');
commit; |
INSERT INTO chanx_manage.users (username,password,status,createTime) VALUES
('admin','<PASSWORD>!',1,'2018-05-21 17:38:04.000')
,('jovan','core@123',1,'2018-05-21 17:38:07.000')
,('yanzhu','123456',1,'2018-09-03 19:21:29.000')
,('qianru','123456',1,'2018-09-20 10:57:17.000')
,('SKY0010','SKY0010',1,'2019-04-09 21:40:3... |
<reponame>Earth-Online/poc_test
-- ============================================================================
-- Copyright (C) 2001-2003 <NAME> <<EMAIL>>
-- Copyright (C) 2006-2013 <NAME> <<EMAIL>>
-- Copyright (C) 2007-2013 <NAME> <<EMAIL>>
--
-- This program is free software; you can redistribute it and/or ... |
<reponame>HRyii/gulu
/*
Navicat MySQL Data Transfer
Source Server : gulu
Source Server Version : 50629
Source Host : 192.168.3.11:3306
Source Database : gulu
Target Server Type : MYSQL
Target Server Version : 50629
File Encoding : 65001
Date: 2017-01-12 16:39:29
*/
SET FOREIGN_KEY... |
<filename>migrations/20200120000000_wgman.sql
-- Table: public.Interface
-- DROP TABLE public."Interface";
-- CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-- Table: public.interface
-- DROP TABLE public.interface;
CREATE TABLE public.interface
(
u_name text COLLATE pg_catalog."default" NOT NULL,
port integer... |
CREATE TABLE userpref (
username varchar(100) NOT NULL default '',
preference varchar(50) NOT NULL default '',
value varchar(100) NOT NULL default '',
prefid int(11) NOT NULL auto_increment,
PRIMARY KEY (prefid),
KEY username (username)
) TYPE=MyISAM;
|
SELECT tab0.v1 AS v1 , tab1.v0 AS v0 , tab1.v2 AS v2
FROM (SELECT sub AS v0 , obj AS v2
FROM sorg__faxNumber$$2$$
) tab1
JOIN (SELECT obj AS v1 , sub AS v0
FROM sorg__email$$1$$
) tab0
ON(tab1.v0=tab0.v0)
++++++Tables Statistic
sorg__email$$1$$ 0 VP sorg__email/
VP <sorg__email> 9096281
------
so... |
<filename>src/main/resources/liquibase/harness/change/expectedSql/oracle/18.3.0/addPrimaryKey.sql<gh_stars>1-10
CREATE TABLE DATICAL_ADMIN.test_table_addpk (test_id INTEGER, test_column VARCHAR2(50))
ALTER TABLE DATICAL_ADMIN.test_table_addpk ADD CONSTRAINT pk_test_table_addpk PRIMARY KEY (test_id) |
<gh_stars>0
ereport(ERROR,
errcode(ERRCODE_DIVISION_BY_ZERO),
errmsg("division by zero"));
|
--+ holdcas on;
-- Backtick Delimited ID
create table t1 (i1 integer);
drop table `t1`;
create table t1 (i1 integer);
drop table "t1";
create table an_id_with_more_than_254_characters___________________________________________________________________________________________________________________________________... |
<filename>_SQL/irisits_laravel.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 07, 2021 at 04:26 PM
-- Server version: 5.6.51
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.6
-- Dumped by pg_dump version 9.5.6
-- Started on 2017-06-03 18:14:37 BRT
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_messa... |
<gh_stars>0
create table core.content_node_statuses
(
id serial not null
constraint content_node_statuses_pk
primary key,
name text not null
);
INSERT INTO core.content_node_statuses (id, name) VALUES (1, 'Draft');
INSERT INTO core.content_node_statuses (id, name) VALUES (2, 'Published');
INSERT INTO core.conte... |
<reponame>fatdba/oracle-script-lib
-- gen_list_data_without_dual.sql
-- <NAME> - 08/04/2010
-- jkstill at gmail.com
-- works with 9i-
-- use gen_list_data_without_dual.sql for 10g+
select
level id
, substr(
-- column returned from inline view
myvals
-- get the starting position
-- note leading comma req... |
/*
**
** TODO: Add support for specifying whether to map JSON to JSON or JSONB
**
*/
create or replace function MAP_FOREIGN_DATA_TYPE(P_SOURCE_VENDOR VARCHAR, P_DATA_TYPE VARCHAR, P_DATA_TYPE_LENGTH BIGINT, P_DATA_TYPE_SCALE INT, P_JSON_DATA_TYPE VARCHAR, P_POSTGIS_INSTALLED BOOLEAN)
returns VARCHAR
as $$
declare
... |
<gh_stars>1-10
CREATE TABLE IF NOT EXISTS `clientes` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`nombre` varchar(200) NOT NULL,
`apellido` varchar(200) NOT NULL,
`telefono` varchar(17) NOT NULL,
`direccion` varchar(200) NOT NULL
) ENGINE=InnoDB ;
INSERT INTO `clientes` (`id`, `nombre`, `apellido`, `telefono`, `... |
CREATE TABLE `customer_info ` (
`customer_id ` int(20),
`customer_name ` varchar(50),
`customer_mobile ` varchar(50),
`customer_address ` varchar(50),
PRIMARY KEY (`customer_id `)
);
CREATE TABLE `sales_product` (
`sales_id` int(20),
`date` date,
`invoice_id` int(20),
`particular` varchar(50),
`cu... |
<filename>DataBase/SqlServer/SystemQuery/ProcedureFunction.sql<gh_stars>1-10
--获取所有的存储过程、函数
SELECT
b.xtype+'.'+b.name [Key],
a.text Value
FROM syscomments a
INNER JOIN sysobjects b
ON b.id=a.id
ORDER BY b.xtype ASC,
b.name ASC; |
CREATE TABLE IF NOT EXISTS state.TEMP_EG_ROLE(
id bigint,
name character varying,
description character varying,
createddate timestamp without time zone,
createdby bigint,
lastmodifiedby bigint,
lastmodifieddate timestamp without time zone,
version bigint,
internal boolean
);
INSERT INTO state.TEMP_EG_ROLE (id, name,... |
-- STUDENT
CREATE TABLE `studentaccount` (
`student_id` int(11) UNSIGNED NOT NULL,
`up_id` char(9) NOT NULL,
`up_mail` varchar(50) NOT NULL,
`username` varchar(32) NOT NULL,
`password` varchar(60) NOT NULL,
`isVerified` tinyint(1) NOT NULL DEFAULT 0,
`isActivated` tinyint(1) NOT NULL DEFAULT 0,
`archive... |
<filename>function/ts/updatesampleanalysisunit.sql
CREATE OR REPLACE FUNCTION ts.updatesampleanalysisunit(_sampleid integer, _analunitid integer)
RETURNS void
LANGUAGE sql
AS $function$
UPDATE ndb.samples AS ss
SET analysisunitid = _analunitid
WHERE ss.sampleid = _sampleid
$function$
|
<reponame>PacktWorkshops/The-MySQL-Workshop<filename>Chapter11/Exercise13/ch11_Excercise_8_13.sql
USE world;
SELECT * FROM city_export WHERE District='Moskova';
# Now modify the city_export.CSV file
FLUSH TABLE city_export;
SELECT * FROM city_export WHERE District='Moskova';
|
-- file:json.sql ln:381 expect:true
select json_array_elements_text('[1,true,[1,[2,3]],null,{"f1":1,"f2":[7,8,9]},false,"stringy"]')
|
-- 2021-05-13T13:24:30.086Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Window SET IsExcludeFromZoomTargets='Y',Updated=TO_TIMESTAMP('2021-05-13 16:24:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=540093
;
-- 2021-05-13T13:53:31.905Z
-- I forgot to set the DICTIONARY_ID_... |
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
;
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD... |
<reponame>reclada/db<filename>src/recladaobject_functions.sql
/*
* Function reclada_object.create creates one or bunch of objects with specified fields.
* A jsonb with user_info and a jsonb or an array of jsonb objects are required.
* A jsonb object with the following parameters is required to create one object.
* ... |
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
-- Table sample.ArtMediumDescriptor --
CREATE TABL... |
create table ranks_rewards
(
Id int auto_increment
primary key,
RankId int null,
Type varchar(255) null,
Optional1 varchar(255) null,
Optional2 varchar(255) null,
Optional3 varchar(255) null
)
charset = latin1;
INSERT INTO world.ranks_rewards (Id, RankId, Typ... |
ALTER TABLE mine_detail
RENAME COLUMN major TO major_mine_ind;
ALTER TABLE mine_detail
ALTER COLUMN major_mine_ind SET NOT NULL;
|
-- Solution to [Weather Observation Station 3](https://www.hackerrank.com/challenges/weather-observation-station-3)
SELECT DISTINCT
CITY
FROM
STATION
WHERE
ID % 2 = 0
|
create proc ProcWithoutExplicitInsertColumnSelectListFromDML
as
begin
insert into Table1 select a,b
from (
insert into Table1 (a,b)
output inserted.a, inserted.b
select a,b
from Table1
) src
;
end
go
|
<gh_stars>1-10
drop table if exists service; |
ALTER TABLE invitation
ADD COLUMN success_redirect_url TEXT,
ADD COLUMN failure_redirect_url TEXT; |
<reponame>gold-net/vz-boot
/*
Navicat Premium Data Transfer
Source Server : y
Source Server Type : MySQL
Source Server Version : 50725
Source Host : 172.16.31.10:3306
Source Schema : z-boot
Target Server Type : MySQL
Target Server Version : 50725
File Encoding : 65001
... |
<gh_stars>1-10
-- +goose Up
CREATE TABLE snark_jobs (
id SERIAL NOT NULL,
height CHAIN_HEIGHT,
time CHAIN_TIME,
prover TEXT NOT NULL,
fee CHAIN_CURRENCY,
works_count INTEGER NOT NULL,
created_at CHAIN_TIME,
PRIMARY KEY (id)
);
CREATE INDEX idx_snark_jobs_time
ON sn... |
<reponame>haolinw/gpdb<filename>src/test/isolation2/sql/crash_recovery_redundant_dtx.sql
1:CREATE TABLE crash_test_redundant(c1 int);
-- Verify that all primary segments are good.
-- We don't print mode directly because mirrored/mirrorless cluster is different: mirrorless cluster
-- has mode='n' for all segments. But... |
<reponame>zmij/pg_async
create temporary table pg_async_test (
id bigserial primary key,
ctime timestamp default current_timestamp,
ctimetz timestamptz default current_timestamp,
some_text text,
fixed_text char(25),
var_text varchar(25),
float_field float,
json_field json,
bool_field boolean,
mo... |
create table Orders (
Id int identity(1,1) not null primary key,
FromCartId uniqueidentifier null,
BillingFirst nvarchar(50) null,
BillingLast nvarchar(50) null,
BillingEmailAddress nvarchar(50) not null,
BillingAddr1 nvarchar(50) null,
BillingAddr2 nvarchar(50) null,
BillingCity nvarchar(... |
<reponame>ostashevdv/yii2
IF OBJECT_ID('[dbo].[tbl_order_item]', 'U') IS NOT NULL DROP TABLE [dbo].[tbl_order_item];
IF OBJECT_ID('[dbo].[tbl_item]', 'U') IS NOT NULL DROP TABLE [dbo].[tbl_item];
IF OBJECT_ID('[dbo].[tbl_order]', 'U') IS NOT NULL DROP TABLE [dbo].[tbl_order];
IF OBJECT_ID('[dbo].[tbl_category]', 'U') I... |
DROP TABLE Agencies;
-- DROP TABLE Shoppings;
-- DROP TABLE Books;
DROP TABLE databasechangelog;
DROP TABLE databasechangeloglock;
|
create table person(
id integer not null,
name varchar(255) not null,
location varchar(255),
birthDate timestamp,
primary key(id));
|
<gh_stars>0
--PROCEDIMIENTO ALMACENADO INSERTAR SEDES
CREATE PROCEDURE SP_Sedes_Insertar
@CodigoSede VARCHAR(10),
@NombreSede VARCHAR(30),
@Telefono VARCHAR(12),
@CorreoElectronico VARCHAR(50),
@Direccion VARCHAR(50),
@CreadoPor VARCHAR(50)
AS
BEGIN
INSERT INTO Sedes(CodigoSede, NombreSede, Telefono, CorreoEl... |
-- migrate:up
/* Make sure the user connecting to postgres have no access to this table */
CREATE TABLE secrets(
sign_key TEXT NOT NULL
);
INSERT INTO secrets (sign_key) VALUES ('change this!!!');
/* The saas_user must exist, and be used by the backend */
REVOKE ALL PRIVILEGES on secrets FROM saas_user;
-- mig... |
CREATE TABLE [dbo].[PhotographCategory]
(
[Id] INT IDENTITY(1, 1) NOT NULL,
[Name] NVARCHAR(256) NOT NULL,
[Alias] NVARCHAR(256) NOT NULL,
[Order] INT NOT NULL,
[CreationDate] DATETIME2(7) NOT NULL,
[LastModifiedDate] DATETIME2(7) NOT NULL,
CONSTRAINT [PK_dbo.PhotographCategory_Id] PRIMARY KEY CLUSTERED ([Id] A... |
<gh_stars>0
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[vw_CircuitSeasons]
AS
SELECT
cs.SeasonID,
c.CircuitID,
c.Circuit,
c.GrandsPrix
FROM
[dbo].[CircuitSeasons] cs
LEFT OUTER JOIN dbo.Circuits c
ON c.CircuitID = cs.CircuitID
GO
|
<filename>modelbuilder/scripts/polder/04_snap_syphons_to_channels.sql
/*
Dit script verwijderd delen uit de watergangen waar sifonnen op liggen.
*/
--Create Syphons table from culvert
DROP TABLE IF EXISTS deelgebied.syphon
;
CREATE TABLE deelgebied.syphon AS
(
SELECT *
... |
# --- !Ups
create table format (
id integer primary key autoincrement,
name text default '',
hashedHeader text not null,
delimiter text not null default ";",
textQualifier text not null default "",
skipFirstLine integer not null default 0,
dateFormat text not null default "dd.MM.yy",
columnPositions text not n... |
drop table if exists MB_FIN_AGRT_TYPE;
/*==============================================================*/
/* Table: MB_FIN_AGRT_TYPE */
/*==============================================================*/
create table MB_FIN_AGRT_TYPE
(
FIN_TYPE varchar(50) not null comment '... |
<reponame>nyimbi/caseke
CREATE TABLE "contact" (
"id" SERIAL PRIMARY KEY
);
CREATE TABLE "document" (
"id" SERIAL PRIMARY KEY,
"document" BYTEA,
"doc_content" TEXT NOT NULL,
"doc_img" BYTEA NOT NULL,
"doc_date" DATE NOT NULL
);
CREATE TABLE "policeman" (
"id" SERIAL PRIMARY KEY,
"service_number" VARCH... |
DROP DATABASE IF EXISTS gyt_db;
CREATE DATABASE gyt_db; |
CREATE TABLE dbjudge_database(
name varchar(20) NOT NULL,
PRIMARY KEY (name)
);
CREATE TABLE dbjudge_fake_data(
data text,
fake_type varchar(20),
PRIMARY KEY (data)
);
CREATE TABLE dbjudge_question(
id integer,
question text,
sql_query text,
PRIMARY KEY (id)
);
|
-- # Problem: https://www.hackerrank.com/challenges/african-cities/problem
-- # Score: 10
SELECT city.NAME FROM CITY city
JOIN COUNTRY country
ON city.CountryCode = country.Code
WHERE country.CONTINENT = 'Africa';
|
SELECT causes.name, words.*
FROM (
SELECT *
FROM giving.nonprofits_communities_by_tweets as com
WHERE com.nonprofits_id = XXXXX
) as my_table
JOIN giving.nonprofits_communities_by_tweets_words as words
on my_table.causes_id = words.causes_id and my_table.community = words.community
LEFT JOIN giving.causes as ca... |
<reponame>jdkoren/sqlite-parser
-- autovacuum.test
--
-- execsql {select x from av3}
select x from av3 |
<reponame>dram/metasfresh
-- 2017-05-16T18:30:42.370
-- URL zum Konzept
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHe... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Dec 06, 2020 at 02:28 AM
-- Server version: 5.7.31
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... |
DROP DATABASE IF EXISTS tracker_db;
CREATE DATABASE tracker_db;
USE tracker_db;
CREATE TABLE department (
id INT NOT NULL AUTO_INCREMENT,
dept_name VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE role (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(50) NOT NULL,
salary DECIMAL NOT NUL... |
create database maps;
use maps;
create table quadras
(
idquadra INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
poligono VARCHAR(255) NOT NULL
) ENGINE = InnoDB; |
<filename>src/test/resources/OrcSnappyTest/ctas.sql
CREATE EXTERNAL TABLE foo (s1 string, s2 string)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS TEXTFILE
LOCATION '${hiveconf:hadoop.tmp.dir}/foo/';
SET hive.default.fileformat.managed=ORC;
SET hive.default.fileformat=ORC;
CREATE TABLE foo_orc_nocomp ... |
//// CHANGE name=change0
CREATE MEMORY TABLE TABLE134(ID INTEGER NOT NULL PRIMARY KEY,FIELD1 VARCHAR(30),USERTYPE7FIELD USERTYPE7,USERTYPE5FIELD USERTYPE5,USERTYPE9FIELD USERTYPE9)
GO
|
<filename>deployment/database.sql<gh_stars>100-1000
/*!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 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE ... |
{% macro materialize__dateadd(datepart, interval, from_date_or_timestamp) %}
cast( {{ from_date_or_timestamp }} as timestamp) + ((interval '1 {{ datepart }}') * ({{ interval }}))
{% endmacro %}
|
<gh_stars>0
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
-- @Description The locks held after different operations
--
-- @product_version gpdb: 4.3.3.0O2
1: BEGIN;
1: INSERT INTO ao VALUES (200, 200);
SELECT * FROM locktest;
2U: SELECT * FROM locktest;
1: COMMIT;
1: BEGIN;
1: DEL... |
<filename>src/test/tinc/tincrepo/dml/functional/sql_partition/mpp21090_xchange_pttab_dropcol_addcol_dml_time.sql
-- @author prabhd
-- @created 2014-04-01 12:00:00
-- @modified 2012-04-01 12:00:00
-- @tags dml MPP-21090 ORCA
-- @optimizer_mode on
-- @description Tests for MPP-21090
\echo --start_ignore
set gp_enable_c... |
<gh_stars>0
select yearweek(a.complete_date) as yearweek ,c.name as assignment_type, count(an.value) as substacks, count(an.value)*125 as volume, cast(sum(an.value)as unsigned) as total
from annotation an
join assignment a on a.id = an.assignment_id
join cv_term c on c.id = a.type_id
join media_... |
<reponame>Zhaojia2019/cubrid-testcases
CREATE table alltypes(
int_col INTEGER,
float_col FLOAT,
double_col DOUBLE,
smallint_col SMALLINT,
date_col DATE,
time_col TIME,
timestamp_col TIMESTAMP,
datetime_col DATETIME,
monetary_col MONETARY,
numeric_col NUMERIC(12,4),
char_col char(255),
varchar_col varchar(255),
nchar_co... |
/**
* This is the database schema for testing Sqlite support of Yii DAO and Active Record.
* The database setup in config.php is required to perform then relevant tests:
*/
DROP TABLE IF EXISTS tbl_composite_fk;
DROP TABLE IF EXISTS tbl_order_item;
DROP TABLE IF EXISTS tbl_item;
DROP TABLE IF EXISTS tbl_order;
DROP... |
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [User.Session].[History.ResolveURL](
[HistoryID] [int] IDENTITY(0,1) NOT NULL,
[RequestDate] [datetime] NULL,
[ApplicationName] [varchar](1000) NULL,
[param1] [varchar](1000) NULL,
[param2] [varchar](1000) NULL,
[param3] [varchar... |
SELECT user, permission, token FROM tokens WHERE token=?; |
-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64)
--
-- Host: ecovisrkca-covidecare-com.cdeky8oy4qrz.ap-south-1.rds.amazonaws.com Database: covidcare
-- ------------------------------------------------------
-- Server version 8.0.23
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SE... |
INSERT INTO cost_centers (costcenter_name, section_name)
VALUES ('IT Department', 'College of Computer Studies'),
('IS Department', 'College of Computer Studies'),
('CS Department', 'College of Computer Studies'),
('Filipino Department', 'College of Arts and Social Sciences'),
('Political Science Department', 'College ... |
<reponame>thiago-web/RCT<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 24-Jul-2021 às 02:52
-- Versão do servidor: 10.4.14-MariaDB
-- versão do PHP: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";... |
CREATE FUNCTION [dbo].[fnGetTenantId]
(
@Override as uniqueidentifier = null
)
RETURNS uniqueidentifier
AS
BEGIN
DECLARE @TenantId uniqueidentifier
IF @Override IS NULL
BEGIN
SET @TenantId = CONVERT(uniqueidentifier, SESSION_CONTEXT(N'TenantId'));
END
ELSE
BEGIN
SET @TenantId = @Override
END
RETURN @T... |
<filename>db_setup/ddl/i4ldata.t_EntryPoint.sql
/* ---------------------------------------------------- */
/* Generated by Enterprise Architect Version 12.1 */
/* Created On : 30-Jan-2019 12:44:00 */
/* DBMS : PostgreSQL */
/* ---------------------------------------------------- */
/* Drop Tables ... |
<reponame>nikeshkamble25/ecoupon
CREATE DATABASE ecoupon1;
\c ecoupon1;
CREATE TABLE UserManagment
(
Id INTEGER PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
Username VARCHAR(100),
Password VARCHAR(100)
);
|
create table types(
id_type int auto_increment,
name varchar(100) NOT NULL,
primary key(id_type)
)engine = innodb; |
<reponame>mikaelparsekyan/Softuni-Task-Solutions<gh_stars>0
SELECT department_id, MAX(salary) AS max_salary
FROM `employees`
GROUP BY department_id
HAVING max_salary < 30000 OR max_salary > 70000
ORDER BY department_id ASC; |
<reponame>ravinathdo/VEMS
/*
SQLyog Ultimate v8.55
MySQL - 5.5.5-10.2.7-MariaDB : Database - drivegreen_db
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECK... |
<gh_stars>0
/*
Warnings:
- You are about to drop the column `description` on the `Models` table. All the data in the column will be lost.
- Added the required column `categoryId` to the `Models` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Models" ... |
-- phpMyAdmin SQL Dump
-- version 2.11.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 27, 2014 at 11:20 PM
-- Server version: 5.0.51
-- PHP Version: 5.2.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `bansos`
--
-- --------------------------------------------------------
--
--... |
<reponame>canac/chron
CREATE TABLE run (
id INTEGER PRIMARY KEY NOT NULL,
name VARCHAR NOT NULL,
timestamp DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
status_code INTEGER
);
|
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2020/11/27 19:45:15 */
/*==============================================================*/
drop table if exists auth_login;
drop tab... |
<filename>SupportManager/MemoEngine.Database/dbo/Tables/BoardDivisions.sql<gh_stars>1-10
CREATE TABLE [dbo].[BoardDivisions]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY,
[TID] INT NOT NULL,
[DivisionId] INT NOT NULL,
[DivisionSort] [int] NOT NULL Default(0),
[CreationDate] DATETIME NULL DEFAULT Get... |
<filename>bd/panaderia.sql
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 28-04-2020 a las 16:38:29
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;... |
<reponame>CSCfi/antero<gh_stars>1-10
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'dw.f_amk_talous_3_kulut_ja_tuotot') AND type in (N'U'))
BEGIN
CREATE TABLE dw.f_amk_talous_3_kulut_ja_tuotot(
id int IDENTITY(1,1) NOT NULL,
d_amk_id int NOT NULL,
d_toiminto_id int NOT NULL,
tilikausi in... |
CREATE TABLE results_metadata(
id bigserial primary key,
test_run_id bigint references test_run ON DELETE CASCADE,
ci boolean
);
CREATE INDEX results_metadata_test_run_id_idx on results_metadata(test_run_id);
|
-- randexpr1.test
--
-- db eval {SELECT -19 | t1.c*coalesce((select max(+(select cast(avg(case when -e+t1.d in (select t1.e*a from t1 union select a from t1) then t1.b when 17 in (select t1.a from t1 union select 11 from t1) then 19 else 11 end-19+a+t1.f) AS integer)+count(distinct t1.a) from t1)+(t1.b)) from t1 whe... |
<gh_stars>100-1000
-- alter2.test
--
-- execsql { CREATE TABLE abc3(a, b); }
CREATE TABLE abc3(a, b); |
<reponame>sensible-group/satoblock<filename>dao/sql/utxo.sql
-- sign mergeTree
DROP TABLE utxo;
CREATE TABLE IF NOT EXISTS utxo (
utxid FixedString(32),
vout UInt32,
address String,
genesis String,
satoshi UInt64,
script_type String,
script_pk String,
height UInt32,
txid... |
INSERT OR REPLACE INTO videos (
video_id, channel_id, grab_date, publish_date, video_title, total_comments, total_views,
total_likes, total_dislikes, video_desc, thumb_url, http_code
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); |
<gh_stars>0
ALTER TABLE S2S_APPLICATION MODIFY PROPOSAL_NUMBER VARCHAR(12); |
<filename>solarnet-db-setup/postgres/postgres-init-instructor.sql
CREATE SEQUENCE solarnet.instruction_seq;
CREATE TYPE solarnet.instruction_delivery_state AS ENUM
('Unknown', 'Queued', 'Queuing', 'Received', 'Executing', 'Declined', 'Completed');
CREATE TABLE solarnet.sn_node_instruction (
id BIGINT NOT NULL DE... |
CREATE TABLE IF NOT EXISTS public.movie (
movieid VARCHAR(255) NOT NULL,
title VARCHAR(255) NOT NULL,
description VARCHAR(255) NOT NULL,
rating VARCHAR(255) NOT NULL,
gnere VARCHAR(255) NOT NULL,
createdby VARCHAR(255) NOT NULL,
lastmodifiedby VARCHAR(255) NULL,
creationdatetime VARCHAR(255) NOT NULL,
la... |
-- ppdb.sql
CREATE TABLE `kriteria` (
`id_kriteria` int(10) unsigned NOT NULL AUTO_INCREMENT,
`nama_kriteria` varchar(100) DEFAULT NULL,
`kode_kriteria` varchar(50) DEFAULT NULL,
`bobot_masuk` double(2,2) DEFAULT NULL,
`metode` enum('SAW','PM') DEFAULT NULL,
`bobot_ipa` decimal(2,2) DEFAULT NULL,
`bobot_i... |
create or replace function flag_alert() returns trigger as $flag_alert$
declare
id_creator bigint;
title varchar(255);
flag_name varchar(255) := (select name from taxonomy where id = new.flag_id);
begin
select author_id, target.title
into id_creator, title
from target where id = new.target_id;
insert into aler... |
<gh_stars>1-10
-- -----------------------------------------------------
-- Table `DB_CATEGORY`
-- -----------------------------------------------------
DROP TRIGGER AD_DateCreate_Category ON DB_Category;
DROP FUNCTION AD_date_Create;
DROP TRIGGER ADUP_DateModification_Category ON DB_Category;
DROP FUNCTION ADUP_date_M... |
//// CHANGE name=change0
CREATE TABLE table392 (
id integer NOT NULL,
field1 character varying(30),
usertype0field usertype0,
usertype2field usertype2,
usertype1field usertype1
);
GO
//// CHANGE name=change1
ALTER TABLE ONLY table392
ADD CONSTRAINT table392_pkey PRIMARY KEY (id);
GO
|
ALTER TABLE "chat"."Flag" DROP COLUMN "messageId" CASCADE;
|
-- DBSequence
-- @ : pooling protein database sequences ...
DROP TABLE IF EXISTS mzIdentML_DBsequence;
CREATE TABLE mzIdentML_DBsequence
(KEY (`index`), KEY(entry))
ENGINE=MyISAM
SELECT
min(pr.index) as `index`,
pr.entry,
pr.accession,
pr.description,
pr.sequence,
length(pr.seq... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.