text stringlengths 1 1.05M |
|---|
--test update(varchar) for list partition(have NULL value) with null value.
create table list_test(id int ,
test_char char(50),
test_varchar varchar(2000),
test_bit bit(16),
test_varbit bit varying(20),
test_nchar nchar(50),
test_nvarchar nchar varying(2000),
test_string string,
test_dat... |
delete from egwtr_donation_details;
delete from egwtr_donation_header;
-----------------START--------------------
Insert into egwtr_donation_header (id,category,usagetype,minpipesize,maxpipesize,propertytype,active,createddate,lastmodifieddate,createdby,lastmodifiedby,version) values (31,6,8,5,6,4,'true',to_timestamp(... |
USE `RMBilling3`;
DROP FUNCTION IF EXISTS `fnGetAutoAddIP`;
DELIMITER |
CREATE FUNCTION `fnGetAutoAddIP`(
`p_CompanyGatewayID` INT
) RETURNS int(11)
BEGIN
DECLARE v_AutoAddIP_ INT;
SELECT
CASE WHEN REPLACE(JSON_EXTRACT(cg.Settings, '$.AutoAddIP'),'"','') > 0
THEN
CAST(REPLACE(JSON_EXTRACT(cg.Settings, '$.... |
EXPLAIN VERBOSE SELECT x,y FROM "t" |
-- ----------------------------
-- 日期:2018-12-30 19:43:50
-- MySQL - 5.5.53-MariaDB : Database - flyfly
-- ----------------------------
CREATE DATAbase IF NOT EXISTS `flyfly` DEFAULT CHARACTER SET utf8 ;
USE `flyfly`;
-- ----------------------------
-- Table structure for `f_admin`
-- ----------------------------
D... |
select coalesce(commission_pct, 0) as commision_pct,
salary as gaji,
mod(2, 4) as sisa_bagi,
power((salary / 1000), 2) as pangkat,
sqrt(50) as akar
from employees;
|
SELECT
to_char(li.created_at, 'YYYY-MM') AS month,
COUNT(*) AS list_item_count
FROM api_facilitylistitem li
JOIN api_source s ON li.source_id = s.id
WHERE status = 'ERROR_MATCHING'
AND s.create = true
AND to_char(li.created_at, 'YYYY-MM') < to_char(now(), 'YYYY-MM')
GROUP BY to_char(li.created_at, 'YYYY-MM')
ORDER ... |
create database if not exists mafanr_juz;
USE mafanr_juz;
CREATE TABLE IF NOT EXISTS `api_release` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`api_id` varchar(255) NOT NULL COMMENT 'API ID',
`path_type` int(11) DEFAULT '0' COMMENT '是否是路径映射类型,0代表否,1代表是',
`service` varchar(255) NOT NULL COMMENT 'serv... |
{#-
{{ star(
from=ref('transform_policy_endorsement_coverages'),
except=['Total_Premium']
relation_alias= 'prem',
contains_item = 'Premium', --OPTIONAL
include_or_exclude_contains_item = 'include' --OPTIONAL
) }}
This example would retrive all premium values like (bi_... |
DROP GROUP test.root_table_1 |
INSERT INTO burger (name) VALUES ('Meatball sandwich');
INSERT INTO burger (name) VALUES ('Chili sandwich');
INSERT INTO burger (name) VALUES ('Gyro');
INSERT INTO burger (name, devoured) VALUES ('Chicken sandwich', true);
INSERT INTO burger (name, devoured) VALUES ('Turkey club with no bacon', true); |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 03, 2021 at 11:46 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.2.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
CREATE TABLE `custom_vectors` (
`sentiment_score` decimal(5,5) NOT NULL,
`length_page_text` int(11) NOT NULL,
`length_title_text` int(11) NOT NULL,
`length_url` int(11) NOT NULL,
`num_prop_nouns` int(11) NOT NULL,
`num_kw_login` int(11) NOT NULL,
`num_kw_logout` int(11) NOT NULL,
`num_kw_createaccount` ... |
CREATE PROCEDURE [ZFP_DEL_ACCT_RL_SECURITY](
@P_ACCT_SEQ_ID INT,
@P_SE_SEQ_ID INT,
@P_ADDUPD_BY INT,
@P_ErrorCode INT OUTPUT
)
AS
BEGIN
DELETE FROM
ZFC_SECURITY_ACCTS_RLS
WHERE
RLS_SE_SEQ_ID IN(SELECT RLS_SE_SEQ_ID FROM ZFC_SECURITY_RLS_SE WHERE SE_SEQ_ID = @P_SE_SEQ_ID)
AND ACCT_SEQ_ID = @P_ACCT_... |
SELECT tab0.v1 AS v1 , tab2.v2 AS v2
FROM (SELECT obj AS v1
FROM gn__parentCountry$$1$$
WHERE sub = 'wsdbm:City236'
) tab0
JOIN (SELECT obj AS v1 , sub AS v2
FROM sorg__nationality$$3$$
) tab2
ON(tab0.v1=tab2.v1)
JOIN (SELECT sub AS v2
FROM wsdbm__likes$$2$$
WHERE obj = 'wsdbm:Product... |
/* Formatted on 10/6/2014 8:14:58 PM (QP5 v5.126.903.23003) */
-- TABLE: INV.INV_RECEIPT_SEQUENCE
-- DROP TABLE INV.INV_RECEIPT_SEQUENCE;
CREATE TABLE INV.INV_RECEIPT_SEQUENCE (SEQ_NO NUMBER NOT NULL)
TABLESPACE RHODB
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (PCTINCREASE 0 BUFFER_POOL DEFAULT)
LOGGING
NOC... |
# NOT LIKE well prety straight forward like LIKE query this means not like if we put in the special operator like 'W%' will make it that don't get data start with W
SELECT title FROM books WHERE title LIKE 'W';
SELECT title FROM books WHERE title LIKE 'W%';
SELECT title FROM books WHERE title LIKE '%W%';
SELECT ... |
SELECT tab0.v1 AS v1 , tab6.v7 AS v7 , tab4.v5 AS v5 , tab5.v6 AS v6 , tab3.v4 AS v4 , tab8.v9 AS v9 , tab2.v3 AS v3 , tab7.v8 AS v8 , tab1.v2 AS v2 , tab9.v10 AS v10
FROM (SELECT obj AS v1
FROM wsdbm__follows$$1$$
WHERE sub = 'wsdbm:User71825'
) tab0
JOIN (SELECT sub AS v1 , obj AS v2
FROM wsdbm__... |
-- in.test
--
-- execsql {SELECT a FROM t1 WHERE b NOT IN (8,12,16,24,32) OR b=512 ORDER BY a}
SELECT a FROM t1 WHERE b NOT IN (8,12,16,24,32) OR b=512 ORDER BY a |
-- Table SEQUENCE_TABLE is an internal table required by DataNucleus.
-- NOTE: Some versions of SchemaTool do not automatically generate this table.
-- See http://www.datanucleus.org/servlet/jira/browse/NUCRDBMS-416
-- HIVE-21336 safeguards from failures from indices being too long
ALTER SESSION SET NLS_LENGTH_SEMANTI... |
select * from tb_categoria;
select * from tb_pizza;
select * from tb_produto;
Select id, produtos, qtde_produtos, valores_produtos FROM tb_produto WHERE valores_produtos > 45.0;
Select id, produtos, qtde_produtos, valores_produtos FROM tb_produto WHERE valores_produtos < 45.0;
Select id, produtos, qtde_produtos, v... |
USE [VipunenTK_DW]
GO
/****** Object: View [dbo].[v_oppilaitostyyppi_amm] Script Date: 31.3.2020 12:16:01 ******/
DROP VIEW IF EXISTS [dbo].[v_oppilaitostyyppi_amm]
GO
/****** Object: View [dbo].[v_oppilaitostyyppi_amm] Script Date: 31.3.2020 12:16:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
... |
CREATE INDEX block_headers_chain_work_index on block_headers (chain_work);
|
-- CREACION DE LAS TABLAS
CREATE TABLE ADMINISTRATOR
(
USER_ADMIN VARCHAR(20) NOT NULL,
PASSWORD VARCHAR(255) NOT NULL,
NAME VARCHAR(255) NOT NULL,
LAST_NAME VARCHAR(255) NOT NULL,
PHONE VARCHAR(9) NOT NULL,
EMAIL VA... |
SET @@global.sql_mode=(SELECT REPLACE(@@global.sql_mode, 'ONLY_FULL_GROUP_BY', ''))
GO
DROP TABLE IF EXISTS Doctor
GO
DROP TABLE IF EXISTS Patient
GO
DROP TABLE IF EXISTS InheritanceParent
GO
CREATE TABLE InheritanceParent
(
InheritanceParentId int NOT NULL,
TypeDiscriminator int ... |
--MULTISET, Containment operators
create class test_class (col_set MULTISET datetime);
insert into test_class(col_set) values ({'9999-12-31 23:59:59.999', '0001-01-01 00:00:00.000'});
insert into test_class(col_set) values ({'1900-12-31 12:30:00.888', '2000-01-01 01:01:01.111'});
insert into test_class(col_set) values... |
--
-- Tests on the pg_database_size(), pg_tablespace_size(), pg_relation_size(), etc.
-- functions.
--
-- These functions exist in PostgreSQL, but they have been modified in GPDB,
-- to collect the totals across segments, and to support AO / AOCS tables.
-- Hence, we better have extra tests for those things.
--
-- Th... |
-- @testpoint: opengauss关键字validator(非保留),作为游标名,部分测试点合理报错
--前置条件
drop table if exists explain_test cascade;
create table explain_test(cid int,fid int);
--关键字不带引号-成功
start transaction;
cursor validator for select * from explain_test order by 1;
close validator;
end;
--关键字带双引号-成功
start transaction;
cursor "validator" ... |
-- RNGSEED: 1
-- EXPLAIN (FORMAT JSON)
select ca_zip, ca_state, sum(ws_sales_price)
from web_sales, customer, customer_address, date_dim, item
where ws_bill_customer_sk = c_customer_sk
and c_current_addr_sk = ca_address_sk
and ws_item_sk = i_item_sk
and ( substr(ca_zip,1,5) in ('85669', '86197','8827... |
CREATE TABLE message (
id UUID NOT NULL PRIMARY KEY,
message_id VARCHAR(256) NOT NULL,
service VARCHAR(256) NOT NULL,
created_at TIMESTAMP NOT NULL,
sent_to_print_at TIMESTAMP NULL,
printed_at TIMESTAMP NULL,
additional_data JSON NULL
);
|
/* Copyright 2021 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writi... |
/*
Navicat Premium Data Transfer
Source Server : 192.168.1.200
Source Server Type : MySQL
Source Server Version : 80016
Source Host : 192.168.1.200:3306
Source Schema : project-bourse-data-kline
Target Server Type : MySQL
Target Server Version : 80016
File Encoding : 6... |
CREATE DATABASE `mysecurity` DEFAULT CHARACTER SET utf8;
USE `mysecurity`;
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(32) DEFAULT ... |
drop function if exists
build_attribute_index(text, text, text, text, boolean, text, text);
drop function if exists
revert_block(varchar, varchar);
-- Functions we meant to get rid of earlier, but used the wrong syntax for
-- PostgreSQL 9.6
drop function if exists
revert_block(varchar, int8, varchar, varchar);
... |
/*
Warnings:
- You are about to drop the column `type` on the `Expense` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "Expense" DROP COLUMN "type";
|
CREATE TABLE [dbo].[B_Group] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (255) NULL,
[Description] NVARCHAR (255) NULL,
[Preview] BIT NULL,
[Edit] BIT NULL,
[Status] INT NULL,
[C_Date] DATETIME N... |
CREATE TABLE `files` (
`id` int(20) unsigned NOT NULL auto_increment,
`hash` char(40) DEFAULT NULL,
`originalname` varchar(255) default NULL,
`filename` varchar(30) default NULL,
`size` int(15) DEFAULT NULL,
`date` int(15) DEFAULT NULL,
`ip` char(15) DEFAULT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `acc... |
{#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2017, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#}
{# ========================== Fetch Materialized View Properties ========================= #}
{% if (vid and datlastsysoid) or scid %}
SELECT
c.oid,
c.xm... |
create or replace package body ut_coverage is
/*
utPLSQL - Version 3
Copyright 2016 - 2021 utPLSQL Project
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/li... |
-- Remove configuration category_children table
DROP TABLE IF EXISTS fledge.category_children; |
/*
Usage:
EXEC ZGWCoreWeb.Set_Account_Choices
@P_ACCT = N'Anonymous',
@P_SE_SEQ_ID = 1,
@P_SE_NAME = 'System',
@P_Back_Color = '#ffffff',
@P_Left_Color = '#eeeeee',
@P_Head_Color = '#C7C7C7',
@P_Header_ForeColor = 'Black',
@P_Sub_Head_Color = '#b6cbeb',
@P_Row_BackColor = '#b6cbeb',
@P_Alternatin... |
UPDATE CONFIG set version = '7.0';
ALTER TABLE PROFILS ADD tenues_lecture BOOLEAN;
ALTER TABLE PROFILS ADD tenues_ajout BOOLEAN;
ALTER TABLE PROFILS ADD tenues_modification BOOLEAN;
ALTER TABLE PROFILS ADD tenues_suppression BOOLEAN;
ALTER TABLE PROFILS ADD tenuesCatalogue_lecture BOOLEAN;
ALTER TABLE PROFILS ADD tenu... |
-- ============== --
-- Create Schema --
-- ============== --
CREATE SCHEMA miner;
|
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 23, 2021 at 10:49 AM
-- Server version: 10.4.16-MariaDB
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- Argument number exception
select concat_ws();
select format_string();
-- A pipe operator for string concatenation
select 'a' || 'b' || 'c';
-- replace function
select replace('abc', 'b', '123');
select replace('abc', 'b');
-- uuid
select length(uuid()), (uuid() <> uuid());
-- position
select position('bar' in 'f... |
--+ holdcas on;
set names utf8;
drop table if exists t1;
create table t1 (id int,col_binary varchar(10) collate binary, col_euckr varchar(10) collate euckr_bin, col_utf8 varchar(10) collate utf8_bin, col_iso varchar(10) collate iso88591_bin);
insert into t1 values(1,'문자열문자열문자열', '문자열문자열문자열', '문자열문자열문자열', 'ÀÏÀÏÀÏÀÏÀÏÀÏÀ... |
-- {"id":1651,"name":"james","money":293.899778,"dateone":"2020-07-30 10:08:22","age":"33","datethree":"2020-07-30 10:08:22.123","datesix":"2020-07-30 10:08:22.123456","datenigth":"2020-07-30 10:08:22.123456789","dtdate":"2020-07-30","dttime":"11:08:22"}
CREATE TABLE source
(
id INT
, name STRING
... |
CREATE TABLE posts (
userid text,
blog_title text,
posted_at timestamp,
entry_title text,
content text,
category int,
PRIMARY KEY (userid, blog_title, posted_at)
);
|
# MySQL script to create database for Canvas Data schema version 1.16.0
SET default_storage_engine=InnoDB;
SET GLOBAL innodb_file_per_table=1;
DROP DATABASE IF EXISTS canvas_data;
CREATE DATABASE IF NOT EXISTS canvas_data DEFAULT CHARACTER SET utf8mb4;
USE canvas_data;
SET NAMES utf8mb4;
DROP TABLE IF EXISTS course_dim... |
sELECT * FROM STAVKA_PAKOVANJA -- PAKOVANJE
WHERE VRSTA_DOK = 10
AND BROJ_DOK = 4
|
WITH stats AS (
SELECT
total_stats.day,
total_stats.dayofweek,
total_stats.hourofday,
coalesce(total_stats.language, 'Other') AS
LANGUAGE,
total_stats.entity,
CAST(sum(extract(minute FROM previous_diff) * 60 + extract(second FROM previous_diff)) AS int8) AS to... |
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you ... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 13-Out-2020 às 20:00
-- Versão do servidor: 10.4.8-MariaDB
-- versão do PHP: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
--
-- Name: pgbench_accounts; Type: TABLE; Schema: public; Owner: d3l243
--
CREATE TABLE public.pgbench_accounts (
aid integer NOT NULL,
bid integer,
abalance integer,
filler character(84)
)
WITH (fillfactor='100');
ALTER TABLE public.pgbench_accounts OWNER TO d3l243;
--
-- Name: pgb... |
-- @testpoint: 创建行存分区表,合理报错
drop table if exists test_uuid_11;
create table test_uuid_11 (c1 uuid,c2 int) with(orientation=row, compression=no)
PARTITION BY RANGE (c1)
(
PARTITION P1 VALUES LESS THAN('11111111-1111-1111-1111-111111111111'),
PARTITION P2 VALUES LESS THAN('22222222-2222-2222-2222-2222222... |
-- Creating Table
use [IBatisNet]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Enumerations]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
drop table [dbo].[Enumerations]
END
CREATE TABLE [dbo].[Enumerations] (
[Enum_ID] [int] NOT NULL ,
[Enum_Day] [int] NOT NULL ,
[Enu... |
CREATE TABLE subdivision_BY (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_BY" ("id", "name", "level") VALUES (E'BY-HM', E'Mińsk', E'city');
|
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE TABLE "content"."ElementPermissionGrant"("id" uuid NOT NULL DEFAULT gen_random_uuid(), "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), "permissionSetId" uuid NOT NULL, "conferenceSlug" text NOT NULL, "groupId" uuid, "entit... |
-- @testpoint:opengauss关键字dispatch(非保留),自定义数据类型名为dispatch
--关键字dispatch作为数据类型不带引号,创建成功
drop type if exists dispatch;
CREATE TYPE dispatch AS (f1 int, f2 text);
select typname from pg_type where typname ='dispatch';
drop type dispatch;
--关键字dispatch作为用户名加双引号,创建成功
drop type if exists "dispatch";
CREATE TYPE "dispatch"... |
DELIMITER //
DROP PROCEDURE IF EXISTS mergeScoreArrays
//
CREATE DEFINER = sageAdmin PROCEDURE mergeScoreArrays
(IN score1_id int, IN score2_id int, OUT out_merged_scores mediumtext, OUT out_row_count int, OUT out_column_count int)
DETERMINISTIC
BEGIN
DECLARE v_data1 mediumtext;
DECLARE v_data1_type_id int;
DEC... |
CREATE PROCEDURE [workers].[DumpDataAndWait246]
(
@SecondWait TINYINT = 0
)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @Delay VARCHAR(8)
SELECT
@Delay = '00:00:0' + LEFT(ABS(CAST(CAST(NEWID() AS VARBINARY(192)) AS INT)),1)
INSERT INTO [dbo].[DataDump]
(
[SomeValue]
)
SELECT TOP 1
[stopword]
FROM
sys... |
CREATE TABLE IF NOT EXISTS `users` (
`id` varchar(36) NOT NULL,
`password` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,
`last_login` datetime(6) DEFAULT NULL,
`is_superuser` tinyint(1) NOT NULL,
`username` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
`first_nam... |
GRANT ALL PRIVILEGES ON *.* TO 'testUserIntrospection' @'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
CREATE TABLE `address` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`street` varchar(20) NOT NULL,
`city` varchar(20) NOT NULL,
`postalcode` varchar(10) NOT NULL,
`countryregion` varchar(20) NOT NULL,
`... |
-- Table cache_type
SET NAMES 'utf8';
TRUNCATE TABLE `cache_type`;
INSERT INTO `cache_type` (`id`, `name`, `trans_id`, `ordinal`, `short`, `de`, `en`, `icon_large`, `short2`, `short2_trans_id`, `kml_name`) VALUES ('1', 'Unknown cache type', '535', '10', 'Other', 'unbekannter Cachetyp', 'Unknown cache type', 'unknown.gi... |
-- +goose Up
CREATE TABLE shapes (
id TEXT NOT NULL,
pt_lon_lat geography(POINT) NOT NULL,
pt_sequence integer NOT NULL,
dist_traveled DOUBLE PRECISION,
PRIMARY KEY (id, pt_sequence)
);
-- +goose Down
DROP TABLE shapes; |
--Borrado de tablas
drop table procesos_admision cascade constraints;
drop table personas cascade constraints;
drop table tipos_documento cascade constraints;
drop table tipos_identificacion cascade constraints;
drop table tipos_proceso cascade constraints;
drop table estados_civil cascade constraints;
drop table entr... |
--
-- Copyright 2010-2015 Boxfuse GmbH
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or ... |
alter table user_email
add password_expiry DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP;
|
SELECT @@SERVERNAME
SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS')
SELECT * FROM sys.dm_os_cluster_nodes
|
CREATE TABLE #Codesets (
codeset_id int NOT NULL,
concept_id bigint NOT NULL
)
;
INSERT INTO #Codesets (codeset_id, concept_id)
SELECT 10 as codeset_id, c.concept_id FROM (select distinct I.concept_id FROM
(
select concept_id from @vocabulary_database_schema.CONCEPT where concept_id in (4182210)
UNION ... |
create table ACT_GE_PROPERTY (
NAME_ varchar(64),
VALUE_ varchar(300),
REV_ integer,
primary key (NAME_)
);
create table ACT_GE_BYTEARRAY (
ID_ varchar(64),
REV_ integer,
NAME_ varchar(255),
DEPLOYMENT_ID_ varchar(64),
BYTES_ longvarbinary,
GENERATED_ bit,
primary key (ID_)
... |
-- Your SQL goes here
CREATE OR REPLACE FUNCTION payment_service.chargedback_transition_at(payment payment_service.catalog_payments)
RETURNS timestamp without time zone
LANGUAGE sql
STABLE
AS $function$
select created_at from payment_service.payment_status_transitions
where catalog_payment_id = $... |
CREATE OR REPLACE FUNCTION metabase.truncate_tables(schema_name VARCHAR, except_tables varchar[]) RETURNS void AS $$
DECLARE
statements CURSOR FOR
SELECT tablename FROM pg_tables
WHERE schemaname = schema_name and not (tablename = any(except_tables));
BEGIN
FOR stmt IN statements LOOP
EX... |
-- Verify perfume-catalog:02_constraints on pg
BEGIN;
-- XXX Add verifications here.
ROLLBACK;
|
SELECT
grundstueck.t_id AS tid,
grundstueck.entstehung,
grundstueck.nbident,
grundstueck.nummer,
grundstueck.egris_egrid,
gs_gueltigkeit.itfcode AS gueltigkeit,
grundstueck.gueltigkeit AS gueltigkeit_txt,
gs_vollstaendigkeit.itfcode AS vollstaendigkeit,
grundstueck.vollstaendigkeit A... |
SELECT DISTINCT
DPID,
ServerName as [DPName],
[Description],
SMSSiteCode,
IsPXE,
SccmPXE,
RemoveWDS,
DPType,
[Type]
FROM
v_DistributionPoints |
INSERT INTO KRNS_PARM_T (APPL_NMSPC_CD, NMSPC_CD, PARM_DTL_TYP_CD, PARM_NM, PARM_TYP_CD, TXT, PARM_DESC_TXT, CONS_CD, OBJ_ID, VER_NBR)
VALUES ('KUALI', 'KC-UNT', 'All', 'KIM_SHOW_BLANK_QUALIFIERS', 'CONFG', 'N', 'Whether to show the blank qualifiers in KIM Maintenance Screens', 'A', SYS_GUID(), 1);
INSERT INTO KRNS_P... |
use praktikum
go
select * from Foren where OberforumID is NULL order by Bezeichnung |
alter type run_status_enum rename to old_run_status_enum;
create type run_status_enum as enum(
'build_failed',
'building',
'carrot_failed',
'created',
'eval_aborted',
'eval_aborting',
'eval_failed',
'eval_queued_in_cromwell',
'eval_running',
'eval_starting',
'eval_submitted',... |
ALTER TYPE landlord.customersize RENAME TO customersize_old;
CREATE TYPE landlord.customersize AS ENUM ('PRIVATE', 'SMALL',
'MEDIUM', 'LARGE', 'ENTERPRISE');
ALTER TABLE landlord.customer
ALTER COLUMN customersize TYPE landlord.customersize USING customersize::text::landlord.customersize;
DRO... |
/* 1. Employees with Salary Above 35000
Create stored procedure usp_get_employees_salary_above_35000 that returns all employees’ first and last names
for whose salary is above 35000. The result should be sorted by first_name then by last_name alphabetically, and id ascending. */
DELIMITER $$
CREATE PROCEDURE usp_get... |
/*Please add ; after each select statement*/
CREATE PROCEDURE usersByContinent()
BEGIN
SELECT continent, SUM(users) AS users FROM countries
GROUP BY continent
ORDER BY users DESC;
END |
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.1
-- Dumped by pg_dump version 13.1
-- Started on 2020-11-23 16:32:17
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalo... |
CREATE TABLE country (id NVARCHAR(2) NOT NULL, name NVARCHAR(64) NOT NULL, PRIMARY KEY (id));
INSERT INTO [country] ([id], [name]) VALUES ('AF', 'Afuganistani');
INSERT INTO [country] ([id], [name]) VALUES ('IS', 'Aisilandi');
INSERT INTO [country] ([id], [name]) VALUES ('CI', 'Aivore Kositi');
INSERT INTO [country] (... |
/*
https://docs.sentryone.com/help/enabling-extended-events
*/
--Disable old xe trace, if exists and enabled
IF EXISTS
(
SELECT * FROM dbo.FeatureFlag
WHERE [Name] = 'XeventsTrace' and [Enabled] = 1
)
UPDATE dbo.FeatureFlag
SET [Enabled] = 0
WHERE [Name] = 'XeventsTrace';
--Enable RingBuffer XE trace
IF NOT EXISTS
(... |
DROP DATABASE IF EXISTS `pig`;
CREATE DATABASE `pig` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
USE `pig`;
-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys... |
-- @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_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS mpp21090_dropcol_splitdefpt_addcol_dml_numeric;
... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 29, 2021 at 03:24 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
INSERT INTO eg_module (id, name, enabled, contextroot, parentmodule, displayname, ordernumber)
VALUES (nextval('SEQ_EG_MODULE') ,'Financials Budget Config', true, NULL, (select id from eg_module where name='Set-up'), 'Budget Control Type', 5);
Insert into eg_action(id,name,url,parentmodule,ordernumber,displayname,ena... |
DROP TABLE IF EXISTS mvc_tag2question;
DROP TABLE IF EXISTS mvc_tag;
--
-- Create table for User
--
DROP TABLE IF EXISTS mvc_user;
CREATE TABLE mvc_user
(
id INT AUTO_INCREMENT PRIMARY KEY NOT NULL,
acronym VARCHAR(64) UNIQUE NOT NULL,
email VARCHAR(127),
name VARCHAR(127),
password VARCHAR(255),
... |
BEGIN TRY
SELECT 100/0
SELECT 'no error';
END TRY
BEGIN CATCH
SELECT 'has erro';
END CATCH
GO
BEGIN TRY
SELECT 100/0
SELECT 'no error';
END TRY
BEGIN CATCH
END CATCH
GO
BEGIN TRY
SELECT 100;
SELECT 'no error';
END TRY
BEGIN CATCH
END CATCH
GO
BEGIN TRY
BEGIN TRY
SELECT 'generate error'
SELECT 100/0
END ... |
-- @testpoint:openGauss保留关键字reject作为作为表空间名,
--不带引号,合理报错
drop tablespace if exists reject;
CREATE TABLESPACE reject RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
--加双引号,创建成功
drop tablespace if exists "reject";
CREATE TABLESPACE "reject" RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
--清理环境
drop table... |
-- phpMyAdmin SQL Dump
-- version 3.2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generato il: 17 nov, 2010 at 04:00 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 */;
/*!40101 SET @OLD_CHARACTER_SET_... |
INSERT INTO roles(ID, ROLE) values (1,'Admin'),(2,'User') , (3,'Manager');
INSERT INTO Resume (resume_id, name, description, education, phone)
VALUES (101, 'PHP dev', 'Testing description php dev resume', 'IITU 3 course ITSE1909R group', '+77477782877');
INSERT INTO Resume (resume_id, name, description, education, p... |
create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB2" as (
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
select
cast(ID as
bigint
) as ID,
cast(CURRENCY as
varchar
) as CURRENCY,
cast(nullif(DATE, '') as ... |
-- UPDATE PLAN
-- 6 TABLES ARE BEING USED BY DBT
-- 6 NO_PII TABLES - CREATE THE INDIVIDUAL READ ROLES FOR THESE
-- 0 PII TABLE-- 0 VIEWS NEEDED
-- ADD THE read ROLES TO THE NO_PII GROUP ROLE
-- ADD THE NO_PII GROUP ROLE TO BOTH DBT ROLES
--RAW.ZIP_CODE_DATA.ALL_ZIP_CODES
--RAW.ZIP_CODE_DATA.AUSTRALIA_POSTALCODE_POPU... |
/* $PostgreSQL$ */
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION pg_freespace(regclass, bigint);
DROP FUNCTION pg_freespace(regclass);
|
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.2
-- Dumped by pg_dump version 9.6.3
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_messages = warning;
SET search_path = publi... |
PRINT 'Creating Messages table';
CREATE TABLE [BrighterOutbox]
(
[Id] [BIGINT] NOT NULL IDENTITY ,
[MessageId] UNIQUEIDENTIFIER NOT NULL ,
[Topic] NVARCHAR(255) NULL ,
[MessageType] NVARCHAR(32) NULL ,
[Timestamp] DATETIME NULL ,
[CorrelationId] UNIQUEIDENTIFIER NULL,
[ReplyTo] NVARCHAR(255)... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 21, 2021 at 01:22 PM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 7.4.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.