sql stringlengths 6 1.05M |
|---|
-- @testpoint: opengauss关键字Level(非保留),作为同义词对象名,部分测试点合理报错
--前置条件
drop table if exists explain_test;
create table explain_test(id int,name varchar(10));
--关键字不带引号-成功
drop synonym if exists Level;
create synonym Level for explain_test;
insert into Level values (1,'ada'),(2, 'bob');
update Level set Level.name='cici' wh... |
create table apps (
id integer primary key generated by default as identity,
name varchar(250) not null,
definition jsonb not null,
created_at timestamp with time zone not null,
updated_at timestamp with time zone not null,
deleted boolean not null
);
create table pages (
id integer primary key generated by def... |
SELECT * FROM applications WHERE current_preference > 1 ; |
-- More JOIN operations
--List the films where the yr is 1962 [Show id, title]
--Give year of 'Citizen Kane'.
--List all of the Star Trek movies, include the id, title and yr
--(all of these movies include the words Star Trek in the title). Order results by year.
SELECT id, title, yr
FROM movie
WHERE title LIKE 'St... |
<filename>prisma/migrations/20210124214415_add_duration_to_songs/migration.sql
-- AlterTable
ALTER TABLE "songs" ADD COLUMN "duration" TEXT NOT NULL DEFAULT E'0:00';
|
DROP TABLE IF EXISTS userevent;
CREATE TABLE userevent (
idUser INT NOT NULL,
idEvent INT NOT NULL,
FOREIGN KEY (idEvent) REFERENCES eventplan(id) on delete cascade on update cascade,
FOREIGN KEY (idUser) REFERENCES user(id) on delete cascade on update cascade
);
INSERT INTO userevent (idUser, id... |
DELIMITER $
DROP TRIGGER IF EXISTS tri_update_projectjoinrequest;
create trigger tri_update_projectjoinrequest after update
on projectjoinrequest for each row
begin
if old.Result=0 and new.Result=1 then
set @LinkId = REPLACE(uuid(),'-','');
set @cnt =(select count(*) from projectuserlink where ProjectId=New.Pro... |
DROP TABLE IF EXISTS audit_case_data;
CREATE TABLE IF NOT EXISTS audit_case_data
(
id BIGSERIAL PRIMARY KEY,
type TEXT NOT NULL,
reference TEXT NOT NULL,
uuid UUID NOT NULL,
timestamp TIMESTAMP NOT NULL
);
CREATE INDEX idx_audit_case_data_type ON audit_case_data (type);
CREAT... |
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.6.47, for Linux (x86_64)
--
-- Host: localhost Database: gerwarec_sistema_v1
-- ------------------------------------------------------
-- Server version 5.6.47
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARA... |
<gh_stars>1-10
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = dis_example_test, pg_catalog;
--
-- Name: test_alph... |
<reponame>Pranay21/codeigniter<filename>application/views/Pranay_vet.sql
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 22, 2017 at 06:50 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCO... |
<filename>src/Subtext.Framework/Infrastructure/Installation/Scripts/Installation.02.02.00.sql
/* */
IF NOT EXISTS
(
SELECT * FROM [INFORMATION_SCHEMA].[COLUMNS]
WHERE TABLE_NAME = 'subtext_Images'
AND TABLE_SCHEMA = '<dbUser,varchar,dbo>'
AND COLUMN_NAME = 'Url'
)
BEGIN
ALTER TABLE [<dbUser,varc... |
<filename>dominio/alertas/queries/alerta_mgp.sql<gh_stars>1-10
SELECT
alrt_key,
alrt_sigla,
alrt_orgi_orga_dk,
alrt_docu_dk,
alrt_docu_nr_mp,
alrt_date_referencia,
alrt_dias_referencia,
alrt_dk_referencia,
alrt_info_adicional
--CASE WHEN D.disp_alrt_key IS NULL AND DT.disp_alr... |
<reponame>kev82/sqlitelua
.load ./lib/luafunctions
insert into
luafunctions(name, src)
values
('exp', cast(readfile('examples/exponentiate.lua') as text))
;
.header on
with
seq(x) as (select
-5.0
union all select
x+0.5
from
seq
where x < 5)
select
x,
printf('%.10e', exp(x)) exp10sf
... |
CREATE TABLE REVINFO (
REV BIGINT AUTO_INCREMENT,
REVTSTMP BIGINT,
PRIMARY KEY (REV)
);
|
/* Drop Triggers */
DROP TRIGGER application_user_payment_id_delete;
DROP TRIGGER application_user_payment_id_insert;
DROP TRIGGER application_user_payment_item_id_delete;
DROP TRIGGER application_user_payment_item_id_insert;
/* Create Triggers */
delimiter //
CREATE TRIGGER application_user_payment_id_delete after... |
SET @sName = 'bx_developer';
-- STUDIO PAGE & WIDGET
UPDATE `sys_std_pages` SET `icon`='bx_developer@modules/boonex/developer/|std-icon.svg' WHERE `name`=@sName;
UPDATE `sys_std_widgets` SET `icon`='bx_developer@modules/boonex/developer/|std-icon.svg' WHERE `module`=@sName AND `caption`='_bx_dev_adm_wgt_cpt'; |
<filename>data/sql/swganh_static/scripts/terminals.sql<gh_stars>10-100
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.1.63-community - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL version: ... |
<filename>localnoserver_lclns.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.0.10.1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 14-12-2018 a las 14:47:59
-- Versión del servidor: 5.5.60-MariaDB
-- Versión de PHP: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+0... |
<reponame>Falumpaset/handson-ml2
alter table landlord.customersettings add column contract_customer_settings jsonb default '{}';
update landlord.customersettings cs1 set id = cs2.row_number
FROM (
SELECT id, row_number() over () as row_number
FROM landlord.customersettings
ORDER BY 1
) cs2
WH... |
CREATE TABLE Item(
ItemID SERIAL PRIMARY KEY,
Name VARCHAR(20) NOT NULL,
Description VARCHAR(250)
); |
<reponame>joellabes/dbt
{# See here: https://github.com/fishtown-analytics/dbt/pull/1729 #}
select * from {{ ref('ephemeral_model') }}
|
<gh_stars>1-10
----------------------------------
-- create functions --
----------------------------------
CREATE OR REPLACE FUNCTION GetPathInNames(tagHistoryID int)
RETURNS VARCHAR(4000)
AS $function$
DECLARE
v_id UUID;
v_path_names VARCHAR(4000);
SWV_path VARCHAR(4000);
BEGIN
S... |
<gh_stars>100-1000
SELECT
version(),
current_setting('server_version_num') :: int8 AS version_number,
(
SELECT
COUNT(*) AS active_connections
FROM
pg_stat_activity
) AS active_connections,
current_setting('max_connections') :: int8 AS max_connections
|
set feedback off
set heading off
set verify off
select count(*), osuser || ' on as ' || schemaname from v$session group by osuser, schemaname order by osuser, schemaname;
select 'Uzi whom?' from dual;
select to_char(logon_time, 'YYYYMMDD HH24:MI:SS') when, sid, serial#, substr(machine,1,20) machine, osuser, command fr... |
<filename>dump/estrutura.sql<gh_stars>0
/*
SQLyog Ultimate v10.00 Beta1
MySQL - 5.5.5-10.1.19-MariaDB : Database - quiz
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_C... |
<gh_stars>0
CREATE TABLE `products` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`price` float(10,2) NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 C... |
<reponame>jambtc/gold-manager
-- phpMyAdmin SQL Dump
-- version 3.2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generato il: 11 nov, 2010 at 04:30 PM
-- Versione MySQL: 5.1.37
-- Versione PHP: 5.3.0
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... |
<gh_stars>0
-- https://www.erikdarlingdata.com/sql-server/quick-sql-server-cpu-comparison-tests/
CREATE OR ALTER PROCEDURE #p AS
BEGIN
SET NOCOUNT ON;
DECLARE @i BIGINT = 0, @time DATETIME2 = SYSUTCDATETIME();
WHILE @i < 1000000
BEGIN
SET @i = @i + 1;
END;
SELECT cpu_time, DATE... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 03, 2020 at 06:10 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
DROP DATABASE IF EXISTS mockta;
CREATE DATABASE mockta;
USE mockta;
CREATE TABLE products(
pid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
item TEXT,
min_cost FLOAT,
curr_bid FLOAT,
ends_in INT,
imgeurl TEXT
);
|
CREATE TABLE Students (
StudentID INT NOT NULL,
[Name] NVARCHAR(20) NOT NULL,
CONSTRAINT PK_StudentID PRIMARY KEY (StudentID)
)
CREATE TABLE Exams (
ExamID INT NOT NULL,
[Name] NVARCHAR(20) NOT NULL,
CONSTRAINT PK_ExamID PRIMARY KEY (ExamID)
)
CREATE TABLE StudentsExams (
StudentID INT NOT NULL,
ExamID INT ... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 20, 2019 at 07:58 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<gh_stars>1-10
/*
Enter your query here.
*/
SELECT H.hacker_id, H.name
FROM SUBMISSIONS S
JOIN CHALLENGES C
ON S.challenge_id = C.challenge_id
JOIN HACKERS H
ON H.hacker_id = S.hacker_id
JOIN DIFFICULTY D
ON C.difficulty_level = D.difficulty_level
WHERE D.score = S.score and D.difficulty_level = C.difficulty_level
... |
CREATE TABLE "admin" (
"id" uuid PRIMARY KEY,
"email" character varying(254) UNIQUE NOT NULL,
"password" character(60) NOT NULL
); |
<gh_stars>1-10
CREATE OR REPLACE FUNCTION long_task.start_task(p_group_id integer, p_worker_id integer)
RETURNS bigint
LANGUAGE plpgsql
AS $function$
DECLARE
v_task_id BIGINT;
v_task_id2 BIGINT;
v_instance_id BIGINT := NULL;
BEGIN
LOOP
SELECT id
INTO v_task_id2
FROM long_task.task
... |
select distinct
vakcina_kod as vaccine_id,
vakcina as vaccine_name
from stage.ext_ockovani_zakladni_prehled |
<reponame>Shuttl-Tech/antlr_psql
-- file:foreign_data.sql ln:637 expect:true
ALTER TABLE pt1 ADD CONSTRAINT pt1chk2 CHECK (c2 <> '')
|
<filename>ole-app/ole-db/ole-sql/ole-ls-sql/src/main/resources/sql/oracle/OLE_CAT_CMPLT_T.sql
TRUNCATE TABLE OLE_CAT_CMPLT_T DROP STORAGE
/
INSERT INTO OLE_CAT_CMPLT_T (CMPLT_CD,CMPLT_ID,CMPLT_NM,OBJ_ID,ROW_ACT_IND,SRC,SRC_DT,VER_NBR)
VALUES ('0',1,'Other','1000','Y','MFHD 008-16 http://www.loc.gov/marc/holdings/hd00... |
<gh_stars>0
SELECT * FROM Loop |
delete from `{P}_base_adminauth` where `coltype`='member';
delete from `{P}_base_coltype` where `coltype`='member';
delete from `{P}_base_pageset` where `coltype`='member' and `pagename`='homepage';
delete from `{P}_base_pageset` where `coltype`='member' and `pagename`='login';
delete from `{P}_base_pageset` where `co... |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50717
Source Host : localhost:3306
Source Database : animal
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2019-06-18 15:42:39
*/
SET FOREIGN_KEY_CHECKS=0;
... |
<gh_stars>1-10
alter table REPORT_GROUP add SYS_TENANT_ID varchar(255)^
alter table REPORT_REPORT add SYS_TENANT_ID varchar(255)^
drop index IDX_REPORT_GROUP_UNIQ_TITLE on REPORT_GROUP^
create unique index IDX_REPORT_GROUP_UNIQ_TITLE on REPORT_GROUP(TITLE, SYS_TENANT_ID, DELETE_TS)^
drop index IDX_REPORT_REPORT_UNIQ_... |
<filename>ddl/000014_export_repair.up.sql
ALTER type catalog_branch_export_status ADD VALUE IF NOT EXISTS 'export-repaired';
|
<reponame>komainu8/pgroonga
-- Upgrade SQL
CREATE FUNCTION pgroonga_tokenize(target text, VARIADIC options text[])
RETURNS text[]
AS 'MODULE_PATHNAME', 'pgroonga_tokenize'
LANGUAGE C
IMMUTABLE
STRICT;
CREATE OR REPLACE FUNCTION pgroonga_escape(value float4)
RETURNS text
AS 'MODULE_PATHNAME', 'pgroonga_escape_f... |
--
-- テーブルの構造 `hospitalinfo`
--
-- 使用するテーブルのCreate文をここに記述
CREATE TABLE `hospitalinfo` (
`hospitalinfo_id` int unsigned NOT NULL,
`hospital_name` text NOT NULL,
`hospital_kana` text,
`hospital_code` varchar(255),
`room_id` int(11) NOT NULL default '0',
`insert_time` varchar(14) NOT NULL default '',
`inse... |
<reponame>namunu/MBS_Patent
-- --------------------------------------------------------------------------------
-- Routine DDL
-- Note: comments before and after the routine body will not be stored by the server
-- --------------------------------------------------------------------------------
DELIMITER $$
CREATE DEF... |
<filename>bamazonDB.sql
DROP DATABASE IF EXISTS bamazonDB;
CREATE DATABASE bamazonDB;
USE bamazonDB;
CREATE TABLE products(
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(100) NOT NULL,
department_name VARCHAR(50) NOT NULL,
price INT NOT NULL,
stock_quantity INT default 0,
PRIMARY KEY (item_id)... |
REM FILE NAME: backup.sql
REM LOCATION: Backup Recovery\Reports
REM FUNCTION: Show database datafile Archive status
REM TESTED ON: 7.3.3.5, 8.0.4.1, 8.1.5, 8.1.7, 9.0.1
REM PLATFORM: non-specific
REM REQUIRES: sys.v_$datafile, sys.v_$backup
REM
REM This is a part of the Knowledge Xpert for Oracle Administra... |
<filename>db/seed.sql
INSERT INTO items (itemtext, quantity) VALUES
('Oranges', 3),
('Milk', 1),
('Coffee', 6),
('Coffee Filters', 1);
INSERT INTO todos (itemtext) VALUES
('print term paper');
('take out recycling');
('mail package');
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 20, 2018 at 08:03 AM
-- Server version: 10.1.22-MariaDB
-- PHP Version: 7.1.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
alter table "accounts" rename column "activated" to "is_activated" |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 10, 2019 at 04:00 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
DROP TABLE IF EXISTS `test_048`; |
<filename>pkg/database/migrations/7_performer_optimization.up.sql
DROP INDEX `performers_checksum_unique`;
DROP INDEX `index_performers_on_name`;
DROP INDEX `index_performers_on_checksum`;
ALTER TABLE `performers` RENAME TO `temp_old_performers`;
CREATE TABLE `performers` (
`id` integer not null primary key autoincre... |
<reponame>f110/wing
CREATE FUNCTION is() RETURNS integer AS $$
SELECT 1 as result;
$$ LANGUAGE SQL;
|
<filename>Youtube/The Stoic Programmers/Build Restful API With PostgreSQL And Express/database.sql
CREATE DATABASE todo_database;
\c todo_database;
CREATE TABLE todo(
todo_id SERIAL PRIMARY KEY,
description VARCHAR(255)
);
\dt
|
EXEC [dbo].[Example_MatchCommentBlock] @value= N'foo /* test //* bar /* baz *//* */ fubar'
EXEC [dbo].[Example_MatchWhitespace] @value= N'foo /* test //* bar /* baz *//* */ fubar'
GO |
<filename>sql/tables/gk_user.sql
SET NAMES 'utf8';
DROP TABLE IF EXISTS `gk_user`;
CREATE TABLE `gk_user` (
`id` int(11) NOT NULL,
`name` varchar(60) NOT NULL,
PRIMARY KEY (`id`),
KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ;
|
-- 2018-11-01T12:05:20.954
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET AD_Reference_ID=18, AD_Reference_Value_ID=540153,Updated=TO_TIMESTAMP('2018-11-01 12:05:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=50211
;
|
<gh_stars>1-10
DROP DATABASE IF EXISTS library_db;
CREATE DATABASE IF NOT EXISTS library_db;
USE library_db;
CREATE TABLE customers
(
customers_id INT PRIMARY KEY AUTO_INCREMENT,
customers_first_name VARCHAR(64) NOT NULL,
customers_last_name VARCHAR(64) NOT NULL,
customers_address VARCHAR(64) NOT NUL... |
<filename>policy_03_1412439.plsql
--DAC--
--Chi truong phong moi duoc phep cap nhat va them thong tin vao du an
--Start grant role dw_truongphong
Grant Select, Update, Insert On system.Duan To Dw_Truongphong;
--End grant role dw_truongphong
--Start test user co roll dw_truongphong
--select--
selec... |
--To disable this model, set the using_invoice variable within your dbt_project.yml file to False.
{{ config(enabled=var('using_sales_receipt', True)) }}
with sales_union as (
select *
from {{ ref('int_quickbooks__sales_receipt_transactions') }}
{% if var('using_invoice', True) %}
union all
sele... |
select
`Id`,
`Name`,
`Fk_Content_Type`,
(select `Content_Type`.`Name`
from `Content_Type`
where `Content_Type`.`Id` = `Fk_Content_Type`
) as `L_Type`,
(select `Content_Element`.`Value`
from `Content_Element`
where `Content_Element`.`Fk_Content` = `Content`.`Id`
and `Content_Element`.`Dt_RolledBack` is ... |
<gh_stars>1-10
-- 日志表新增执行时间字段
ALTER TABLE ${_prefix}sys_log
ADD COLUMN `execute_time` decimal(19,0) NULL COMMENT '执行时间' AFTER `browser_name`;
-- 重命名待推送为已完成消息表
RENAME TABLE ${_prefix}sys_msg_push_wait TO ${_prefix}sys_msg_pushed;
-- 更新模块数据库版本
update ${_prefix}sys_module set current_version = '4.0.1' where mo... |
-- migrate:up
ALTER TABLE geofences ADD UNIQUE(geofence_id);
ALTER TABLE users_geofences
ADD CONSTRAINT fk_geofence_id
FOREIGN KEY (geofence_id)
REFERENCES geofences(geofence_id)
ON DELETE CASCADE;
-- migrate:down
|
<reponame>security-union/armore-open<gh_stars>1-10
-- migrate:up
ALTER TABLE users DROP COLUMN password;
drop table password_reset;
-- migrate:down
ALTER TABLE users ADD public_key varchar(255) NOT NULL;
create table password_reset (
id UUID,
username var... |
<reponame>epmd-edp/admin-console
alter table codebase_docker_stream
add codebase_id int not null
constraint codebase_fk
references codebase; |
<gh_stars>1-10
------------------------------------------------------------------------------
-- FILE: sql/mph_alliance_no_economic.sql
-- AUTHOR: D. / <NAME>
-- PURPOSE: Database modifications by MPH
------------------------------------------------------------------------------
DELETE from Types WHERE Type='DIPLOAC... |
<filename>sql/yjbb/600098.sql<gh_stars>0
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600098',@CutoffDate = N'2017-09-30',@EPS = N'0.2174',@EPSDeduct = N'0',@Revenue = N'175.51亿',@RevenueYoy = N'8.96',@RevenueQoq = N'29.18',@Profit = N'5.93亿',@ProfitYoy = N'-40.11',@ProfiltQoq = N'-27.74',@NAVPerUnit = N'5.8450',@ROE = N'3.83'... |
<reponame>dysfunctionals/soton-analytica-server<gh_stars>0
SELECT count(*)
FROM (
SELECT *
FROM input
INNER JOIN teamAssign
WHERE input.userID = teamAssign.userID
) |
CREATE TABLE `et` (
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
)
CHARACTER SET=utf8mb4
COLLATE=utf8mb4_unicode_ci
;
|
<gh_stars>0
-- R7 MÖLL
select k.isikukood, r.*, k.*, nk.*
from _r7 r
left join y_nimekujud3 nk
on r.perenimi = nk.perenimi
and r.eesnimi = nk.eesnimi
and (r.sünniaasta = left(nk.sünd, 4) or left(r.altSünd, 4) = left(nk.sünd, 4))
left join kirjed k
on k.emi_id = nk.id
and find_in_set(replace(k.allikas, '-', ''),... |
<reponame>hotstone-seo/hotstone-server<gh_stars>0
CREATE TABLE settings (
`key` VARCHAR (255) PRIMARY KEY,
`value` VARCHAR (255) NOT NULL,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
|
<reponame>meowhard/storefront<gh_stars>0
SET IDENTITY_INSERT [dbo].[Products] ON
INSERT INTO [dbo].[Products] ([Id], [Name], [Price], [Description], [LastUpdated], [CategoryId]) VALUES (1, 'Dress',2.99, 'A Dress', NULL, 1)
SET IDENTITY_INSERT [dbo].[Products] OFF
|
<reponame>dev4s/old-batch-scripts
-- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Czas wygenerowania: 08 Cze 2010, 12:38
-- Wersja serwera: 5.1.41
-- Wersja PHP: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
select name,
round(bytes/1024/1024,2) as mbytes,
resizeable
from v$sgainfo; |
DELIMITER $$
CREATE PROCEDURE teste(IN nome VARCHAR(200))
BEGIN
IF nome<>'x' THEN
INSERT INTO crud_cargo VALUES (15,nome,15.5,'Executei o if da procedure!');
ELSE
INSERT INTO crud_cargo VALUES (16,'x',0.3,'Executei o else da procedure!');
END IF;
END $$
DELIMITER ;
|
DROP TABLE "notion_meal";
DROP TABLE "notion_image";
DROP TABLE "notion_recipe";
ALTER TABLE gphotos_photos DROP COLUMN "image_id";
DROP TABLE "images"; |
<reponame>khaledElnagar/egypt-state-city
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 30, 2018 at 12:24 PM
-- Server version: 5.6.22-71.0
-- PHP Version: 5.6.35-1+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT ... |
<gh_stars>1-10
ALTER TABLE DOKUMENT_METADATA ALTER COLUMN BRUKER_ID TYPE VARCHAR(19); |
/*1. Написать представление, в котором необходимо
вывести перечень магазинов с указанием их места
расположения. При этом название страны следует
вывести на английском языке и в сокращенном виде
(например, United States – US).*/
IF OBJECT_ID ( 'dbo.tmpTable', N'U' ) IS NOT NULL
DROP table dbo.tmpTable;
GO
sel... |
-- MySQL Script generated by MySQL Workbench
-- Fri Sep 11 16:57:15 2020
-- 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_MODE=@@SQL_MODE, SQL_MODE='ON... |
CREATE FUNCTION [dbo].[hlsysum_querybusinessadminrootorgunits]
(
@agentid INT
)
RETURNS TABLE AS RETURN
(
SELECT ou.orgunitid, ou.orgunitdefid, CONVERT(NVARCHAR(255), ou.name) AS orgunitname, CONVERT(INT, ISNULL(qhc.childcnt, 0)) AS childcnt, CONVERT(INT, ISNULL(qac.admincnt, 0)) AS admincnt
FROM [dbo].[hls... |
<reponame>abmpicoli/Superpowers
ALTER TABLE Units
ADD CannotEmbark INTEGER DEFAULT 0;
INSERT INTO CustomModDbUpdates(Name, Value) VALUES('GLOBAL_CANNOT_EMBARK', 1); |
<filename>SQLSamples(Archived)/AvailabilityGroupsSamples/ClusterLess_AG/AG_Setup.sql
CREATE AVAILABILITY GROUP ClusterLessAG
WITH (
AUTOMATED_BACKUP_PREFERENCE = SECONDARY,
FAILURE_CONDITION_LEVEL = 3,
HEALTH_CHECK_TIMEOUT = 600000,
CLUSTER_TYPE = NONE,
DB_FAILOVER = ON,
DT... |
-- insert2.test
--
-- execsql {
-- CREATE TABLE t1(log int, cnt int);
-- PRAGMA count_changes=on;
-- }
CREATE TABLE t1(log int, cnt int);
PRAGMA count_changes=on; |
<gh_stars>10-100
WITH
selected_tumor_pairs AS
(
SELECT * FROM analysis.silver_set
),
selected_aliquots AS
(
SELECT tumor_barcode_a AS aliquot_barcode, case_barcode, 'P' AS sample_type FROM selected_tumor_pairs
UNION
SELECT tumor_barcode_b AS aliquot_barcode, case_barcode, 'R' AS sample_type FROM selected_tumor_pair... |
create database BlogTutorial
go
use BlogTutorial
go
CREATE LOGIN BlogTutorial WITH PASSWORD = '<PASSWORD>';
GO
CREATE USER BlogTutorial FOR LOGIN BlogTutorial;
GO
ALTER ROLE [db_owner] ADD MEMBER [BlogTutorial]
GO
|
<reponame>Kennydao/sql-challenge<gh_stars>0
-- Exported from QuickDBD: https://www.quickdatabasediagrams.com/
-- Link to schema: https://app.quickdatabasediagrams.com/#/d/7hPtMz
-- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here.
-- DROP DATABASE IF EXISTS Employees_db;
-- C... |
use db_estoque;
/* populando a tabela */
INSERT INTO tb_marcas (nome, ativo) VALUES("Nike", true);
INSERT INTO tb_marcas (nome, ativo) VALUES("H&M", true);
INSERT INTO tb_marcas (nome, ativo) VALUES("Zara", true);
INSERT INTO tb_marcas (nome, ativo) VALUES("<NAME>", true);
INSERT INTO tb_marcas (nome, ativo) VALUES("... |
library OpioidCDS_STU3 version '0.1.0'
using FHIR version '1.8'
include OMTKLogic version '0.1.0' called OMTKLogic
codesystem "SNOMED": 'http://snomed.info/sct'
valueset "Illicit Drug Screening": 'illicit-drug-urine-screening'
valueset "Opioid Drug Screening": 'opioid-urine-screening'
code "Positive": '10828004' f... |
create database logistical default charset utf8;
use logistical; |
<gh_stars>1-10
--****************************************************************
--
-- Copyright Contributors to the GenevaERS Project.
-- SPDX-License-Identifier: Apache-2.0
--
--***********************************************************************
--* ... |
<reponame>riddopic/chef-server<gh_stars>100-1000
-- Verify keys_update_trigger
BEGIN;
-- XXX Add verifications here.
ROLLBACK;
|
/* Drop Tables */
DROP TABLE test_data;
DROP TABLE test_data_child;
DROP TABLE test_tree;
/* Create Tables */
-- 测试数据
CREATE TABLE test_data
(
id varchar(64) NOT NULL,
test_input varchar(200),
test_textarea varchar(200),
test_select varchar(10),
test_select_multiple varchar(200),
test_r... |
-- phpMyAdmin SQL Dump
-- version 4.4.1.1
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: 2015-07-21 20:15:42
-- 服务器版本: 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=@@CHARACTER_SET_CLIENT */;
/*!4010... |
CREATE INDEX index_childpage ON core_page (id_parent,page_order);
UPDATE core_stylesheet SET source=0x3C3F786D6C2076657273696F6E3D22312E30223F3E0D0A3C78736C3A7374796C6573686565742076657273696F6E3D22312E302220786D6C6E733A78736C3D22687474703A2F2F7777772E77332E6F72672F313939392F58534C2F5472616E73666F726D223E0D0A0D0A3C787... |
-- @testpoint:openGauss关键字stdout(非保留),同时作为表名和列名带引号,并进行dml操作,stdout列的值最终显示为1000
drop table if exists "stdout" CASCADE;
create table "stdout"(
c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer,
c_real real, c_double real,
c_decimal decimal(38), c_number number(38), c_numeric numeric... |
<reponame>afuads/qto<filename>src/sql/pgsql/qto/tables/91.create-table-test_empty_table.sql
---- DROP TABLE IF EXISTS test_empty_table ;
SELECT 'create the "test_empty_table" table'
;
CREATE TABLE test_empty_table (
guid UUID NOT NULL DEFAULT gen_random_uuid()
, id bigint UNIQUE N... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.