text stringlengths 1 1.05M |
|---|
CREATE TABLE TiposParticular (
_id INTEGER PRIMARY KEY AUTOINCREMENT,
descricao VARCHAR
);
CREATE TABLE TiposPublico (
_id INTEGER PRIMARY KEY AUTOINCREMENT,
descricao VARCHAR,
PRIMARY KEY(_id)
);
CREATE TABLE MeioDeTransporte (
_id INTEGER NOT NULL AUTOINCREMENT,
descricao VARCHAR,
PRIMARY KEY(_id)
)... |
--
insert into public.book
(title, year)
values ('Spring Boot Essentials', 2018),
('Postgresql Essentials', 2019)
ON CONFLICT DO NOTHING; |
UPDATE shoelace_data
SET sl_name = s.sl_name,
sl_avail = s.sl_avail + shoelace_arrive.arr_quant,
sl_color = s.sl_color,
sl_len = s.sl_len,
sl_unit = s.sl_unit
FROM shoelace_arrive shoelace_arrive, shoelace_ok shoelace_ok,
shoelace_ok old, shoelace_ok new,
shoelace shoelace... |
-- misc tests : wrong separators, special cases
create table tab1 (name char varying, t1 time, d1 date, d2 datetime, t2 timestamp,i1 integer ,b bit varying);
insert into tab1 values('gigi',time'11:21:31',date'2001-10-10',datetime'2002-11-01 03:11:45',timestamp'2006-10-02 21:21:10',3,b'001011101100');
insert into tab1 ... |
-- unary minus and plus
select -100;
select +230;
select -5.2;
select +6.8e0;
select -key, +key from testdata where key = 2;
select -(key + 1), - key + 1, +(key + 5) from testdata where key = 1;
select -max(key), +max(key) from testdata;
select - (-10);
select + (-key) from testdata where key = 32;
select - (+max(key)... |
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS structuretimers_discordwebhook;
DROP TABLE IF EXISTS structuretimers_notificationrule;
DROP TABLE IF EXISTS structuretimers_notificationrule_exclude_alliances;
DROP TABLE IF EXISTS structuretimers_notificationrule_exclude_corporations;
DROP TABLE IF EXISTS structureti... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 25, 2017 at 11:56 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
/* src/pl/plperl/plperl--1.0.sql */
/*
* Currently, all the interesting stuff is done by CREATE LANGUAGE.
* Later we will probably "dumb down" that command and put more of the
* knowledge into this script.
*/
CREATE LANGUAGE plperl;
COMMENT ON LANGUAGE plperl IS 'PL/Perl procedural language';
|
/*
create country table
create prefecture table
create region table (country, prefectureへの外部キーを設定する)
create brewery table (regionへの外部キーを設定する)
*/
USE ponsyukey;
CREATE TABLE country
(
id smallint NOT NULL,
name varchar(100) NOT NULL
);
ALTER TABLE country ADD CO... |
CREATE TABLE view_transactions (
id BIGSERIAL,
block_height BIGINT,
block_hash VARCHAR NOT NULL,
block_time BIGINT NOT NULL,
hash VARCHAR NOT NULL,
index INT NOT NULL,
success BOOLEAN NOT NULL,
code INT NOT NULL,
log VARCHAR NOT NULL,
fee JSONB NOT NULL,
fee_payer VARCHAR NOT... |
-- @testpoint:openGauss保留关键字localtimestamp作为作为表空间名,
--不带引号,合理报错
drop tablespace if exists localtimestamp;
CREATE TABLESPACE localtimestamp RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
--加双引号,创建成功
drop tablespace if exists "localtimestamp";
CREATE TABLESPACE "localtimestamp" RELATIVE LOCATION 'hdfs_tablespac... |
CREATE OR REPLACE VIEW insurance_claim AS
SELECT
TO_CHAR(PM.updated_at, 'Month') AS "Month",
EXTRACT(YEAR FROM PM.updated_at) AS "Year",
SUM(PM.amount * I.rate / 100) AS "Loss"
FROM
"Order" O, "Insurance" I, "Payment" PM
WHERE O.insurance_id = I.insurance_id
AND O.payment_id = PM.payment_id
... |
CREATE TABLE IF NOT EXISTS `severities` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`severity` TINYINT(4) NOT NULL,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modified_at` TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1; |
CREATE DATABASE IF NOT EXISTS `web_customer_tracker` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `web_customer_tracker`;
-- MySQL dump 10.13 Distrib 5.6.13, for osx10.6 (i386)
--
-- Host: 127.0.0.1 Database: web_customer_tracker
-- ------------------------------------------------------
-- Server version 5.6.16
/... |
-- Table aliases.
SELECT
cust_name,
cust_contact
FROM customers AS c,
orders AS o,
orderitems AS oi
WHERE
c.cust_id = o.cust_id
AND oi.order_num = o.order_num
AND prod_id = 'RGAN01';
-- Self Join.
SELECT
c1.cust_id,
c1.cust_name,
c1.cust_contact
FROM customers c1,
customers c2
WHERE
c1.cust_na... |
-- MySQL dump 10.13 Distrib 5.7.26, for Linux (x86_64)
--
-- Host: localhost Database: teamc-2019summer
-- ------------------------------------------------------
-- Server version 5.7.26-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA... |
-- description: create short link clicks table
-- authoredAt: 1492352011
-- up:
CREATE TABLE short_link_clicks (
link_id varchar,
timestamp timestamp,
country_code varchar,
ip_address varchar,
PRIMARY KEY(link_id, timestamp, country_code)
) WITH CLUSTERING ORDER BY (timestamp DESC);
-- down:
DROP TABL... |
CREATE TABLE IF NOT EXISTS quiz (
id SERIAL PRIMARY KEY,
meeting_slug VARCHAR(100) REFERENCES meeting(slug)
ON UPDATE CASCADE
UNIQUE NOT NULL,
-- Number of points possible on this quiz.
points_possible smallint NOT NULL
CHECK (points_possible >= 0),
-- If this quiz is still ... |
----------------------------------- Mapping number 1 ----------------------------------------------
12 initial source relations =bent_ma_2_nl0_ce1..boot_adl_4_nl0_ce0..branch_ma_1_nl0_ce1..charge_ma_2_nl0_ce0..effect_adl_2_nl0_ce0..fruit_ad_3_nl0_ce0..great_ad_1_nl0_ce0..hollow_adl_3_nl0_ce0..mixed_ma_1_nl0_ce0..narro... |
SELECT nombre_organizacion, COUNT(id)
FROM iniciativa_actor
GROUP BY nombre_organizacion
HAVING COUNT(id) > 1
ORDER BY COUNT(id);
|
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Tempo de geração: 24/09/2021 às 21:33
-- Versão do servidor: 5.6.41-84.1
-- Versão do PHP: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... |
--create range partition table with time data type and three partitions having no maxvalue,then insert data to this table,then delete record where the separated field value is less than the boundary value
create table range_test(id int,
test_time time,
test_date date,
test_timestamp timestamp, pr... |
ALTER TABLE
public.roles
ADD
COLUMN can_add_member boolean NOT NULL DEFAULT FALSE;
ALTER TABLE
public.roles_environment_types DROP COLUMN invite;
-- =================
-- SEEDS
-- =================
-- developer cannot add
UPDATE
public.roles
SET
can_add_member = FALSE
WHERE
name = 'developer';
-- developer (... |
-- Alterando tabela vendas
ALTER TABLE vendas ADD observacoes TEXT DEFAULT NULL NULL;
|
IF OBJECT_ID('dbo.PG_Replace_Pattern') IS NOT NULL
DROP FUNCTION dbo.PG_Replace_Pattern
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: e-pavlichenko
-- CREATE date: 31.05.2018
-- Alter date: 31.05.2018
-- Description: Замена выражений LIKE на атомы ре... |
CREATE TABLE IF NOT EXISTS PREFECTURE
(
PREFECTURE_ID CHAR(2) NOT NULL,
PREFECTURE_NAME VARCHAR(30) NOT NULL,
PRIMARY KEY (PREFECTURE_ID)
);
CREATE TABLE IF NOT EXISTS CUSTOMER
(
CUSTOMER_ID INT NOT NULL AUTO_INCREMENT,
OLD_PREFECTURE_ID ... |
CREATE TABLE ms0a3
(
puk VARCHAR(24) DEFAULT '0' NOT NULL,
k01_sscpid VARCHAR(24),
k02_jnmkid VARCHAR(20),
f01_ywgnid VARCHAR(20),
f02_jnmkmc VARCHAR(20),
f03_bb VARCHAR(20),
bbb VARCHAR(200),
fb1 VARCHAR(20),
fb2 VARCHAR(20),
fb3 VARCHAR(20),
fb4 VARCHAR(20),
fb5 VARCHAR... |
Create Proc [Fountain].[usp_Get_Forename] (@Forename varchar(50) out)
as
Set Xact_Abort on
Set Nocount on
/*
Declare @Forename varchar(50)
exec Fountain.usp_Get_Forename @Forename out
Select @Forename
*/
Declare @NextSK int
Begin Tran
Select @NextSK = case when [LastAllocatedReferenceSK] = [MaxReferenc... |
-- script to create a table in server
-- DDL query to do so
CREATE TABLE IF NOT EXISTS force_name(
id INT,
name VARCHAR(256) NOT NULL
);
|
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 17 Mar 2021 pada 17.18
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
-- @testpoint:opengauss关键字source(非保留),作为数据库名
--关键字不带引号-成功
drop database if exists source;
create database source;
drop database source;
--关键字带双引号-成功
drop database if exists "source";
create database "source";
drop database "source";
--关键字带单引号-合理报错
drop database if exists 'source';
create database 'source';
--关键字带反... |
-- boundary3.test
--
-- db eval {
-- SELECT t2.a FROM t2 NATURAL JOIN t1
-- WHERE t1.rowid > 4294967296 ORDER BY t1.a DESC
-- }
SELECT t2.a FROM t2 NATURAL JOIN t1
WHERE t1.rowid > 4294967296 ORDER BY t1.a DESC |
ALTER TABLE scheduled_calls_table ADD patient_name varchar(255);
UPDATE scheduled_calls_table
SET patient_name = patient_details.patient_name
FROM patient_details
WHERE scheduled_calls_table.patient_details_id = patient_details.id;
ALTER TABLE scheduled_calls_table DROP column patient_details_id;
DROP TABLE patient_... |
INSERT INTO groups (group_id, group_code, group_name, create_datetime)
VALUES ('34dde3b1-15a1-4a19-8342-912b76d53727', 'GC_DEL_1', 'Group 1 for deleting', '2021-10-15 21:35:52.043333'),
('2eeaaa92-df65-4110-9b9f-20178f65bd0c', 'GC_DEL_2', 'Group 2 for deleting', '2021-10-15 21:35:52.043333'),
('ca9a884f-c... |
-- Verify ggircs:swrs/transform/function/clone_schema on pg
BEGIN;
select pg_get_functiondef('swrs_transform.clone_schema(text, text, boolean, boolean)'::regprocedure);
ROLLBACK;
|
ALTER TABLE foods RENAME TO tmp;
CREATE TABLE foods (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
name VARCHAR NOT NULL,
expiry_date VARCHAR NOT NULL
);
INSERT INTO foods(id, name, expiry_date) SELECT id, name, expiry_date FROM tmp;
DROP TABLE tmp;
|
-- See the NOTICE file distributed with this work for additional information
-- regarding copyright ownership.
--
-- 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... |
drop table if exists a;
drop table if exists b;
drop table if exists t;
drop table if exists tr_action;
create table t(i int, j int, k int);
create unique index u_t_i on t(i);
create unique index u_t_j_k on t(j, k);
insert into t select rownum, rownum, rownum from _db_class limit 20;
create table tr_action(id int... |
--
-- Add index for alias check #__content
--
CREATE INDEX "#__content_idx_alias" ON "#__content" ("alias");
|
/* Copyright (c) 2006-2012 Regents of the University of Minnesota
For licensing terms, see the file LICENSE. */
/* This script adds support for the Google Transit Feed Specification. */
/* Run this script once against each instance of Cyclopath
@once-per-instance
*/
\qecho
\qecho This script add... |
CREATE OR REPLACE FUNCTION doi.chronmeta(dsid integer[])
RETURNS TABLE(datasetid integer, chronologies json)
LANGUAGE sql
AS $function$
WITH contactinfo AS (
SELECT
chrs.chronologyid,
json_agg(json_build_object('contactid', cnt.contactid,
'contactname', cnt.contactname,
'familyname'... |
--- string
create table t1 (s1 varchar(20), sn1 nchar varying(20));
insert into t1 values (2.00123e1,3);
select ceil(s1) from t1;
select ceil(sn1) from t1;
truncate table t1;
insert into t1 values ('asd',n'asd');
select ceil(s1) from t1;
select ceil(sn1) from t1;
drop table t1;
select (ceil('123'));
select (ceil... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 21, 2021 at 09:29 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- The init mysql scripts for gossip system
-- Table Article
CREATE TABLE IF NOT EXISTS `article` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(128) NOT NULL,
`unique_key` VARCHAR(1024) UNIQUE NOT NULL,
`url` VARCHAR(512) NOT NULL,
`deleted` BIGIN... |
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : CaretRegressor_svmPoly
-- Dataset : diabetes
-- Database : mysql
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model deployment code
WITH kernel_input_... |
{{ config(schema="test_normalization", tags=["top-level"]) }}
-- Final base SQL model
select
id,
currency,
date,
HKD_special___characters,
HKD_special___characters_1,
NZD,
USD,
_airbyte_emitted_at,
_airbyte_dedup_exchange_rate_hashid
from {{ ref('dedup_exchange_rate_scd') }}
-- dedup... |
.echo on
select '\' regexp '\b';
select ' ' regexp '\b';
select 'a' regexp '\b';
select ' ' regexp '\b';
select char(0x0A) regexp '\cJ';
select '123' regexp '\d+';
select '123a' regexp '\d+';
select 'abc' regexp '\D+';
select '123' regexp '\D+';
select char(0x0C) regexp '\f';
select char(0x0C) regexp '\cL';
select ... |
---------------------------------------------------------------
-- table: heading3
---------------------------------------------------------------
-- drop table heading1;
create table heading3
(
key integer not null,
library integer,
term text,
number_of_catalogs integer,
type integer,
headdsp_key integer,... |
--
-- Data for table `Package`
--
INSERT INTO `Package` (`id`, `name`, `description`) VALUES
(1, 'doctrine/annotations', NULL),
(2, 'doctrine/cache', NULL),
(3, 'doctrine/collections', NULL),
(4, 'doctrine/common', NULL),
(5, 'doctrine/dbal', NULL),
(6, 'doctrine/inflector', NULL),
(7, 'doctrine/lexer', NULL),
(8, 'fz... |
-- Escreva um comando que devolva o número de empregados. O resultado deve ser
-- semelhante ao que se segue.
SELECT COUNT(emp) "Total de Empregados"
FROM emp
; |
ALTER TABLE "chat"."Reaction" ADD COLUMN "remoteServiceId" text NULL;
|
SELECT n.nspname AS schema,
c.relname AS table,
c.reltablespace,
CASE WHEN c.reltablespace > 0
THEN (SELECT t.spcname
FROM pg_tablespace
WHERE oid = c.reltablespace)
ELSE '' END
FROM pg_class c
JOIN pg_authid a ON (a.OID = c.relowner)
JOIN... |
SET IDENTITY_INSERT [dbo].[Address] ON
INSERT INTO [dbo].[Address] ([id], [building_no], [street], [city], [postal_code], [RowVersion]) VALUES (1, 1, N'Topolowa', N'Buk', N'64-320', 1)
INSERT INTO [dbo].[Address] ([id], [building_no], [street], [city], [postal_code], [RowVersion]) VALUES (2, 2, N'Kwiatowa', N'Dopiewo'... |
-- version 0.5
ALTER TABLE guilds ADD COLUMN WelcomeChannel integer;
|
SELECT id, creation_date, last_access_date, up_votes, down_votes, reputation, views
FROM [bigquery-public-data:stackoverflow.users]
|
SELECT
*
FROM [core].[Batch]
WHERE [CreationTime] > DATEADD(MINUTE, @minutesAgo * -1, GETDATE()) |
ALTER TABLE kyma_component_config DROP COLUMN source_url;
|
CREATE SYNONYM [SqlNet].[HolidayRemove] FOR [SqlNet].[ConfigurationHolidayRemove];
|
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 02, 2017 at 09:22 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
DROP VIEW view_name;
DROP VIEW database_name.view_name;
DROP VIEW IF EXISTS database_name.view_name; |
CREATE TABLE IF NOT EXISTS signoz_index (
timestamp DateTime64(9) CODEC(Delta, ZSTD(1)),
traceID String CODEC(ZSTD(1)),
spanID String CODEC(ZSTD(1)),
parentSpanID String CODEC(ZSTD(1)),
serviceName LowCardinality(String) CODEC(ZSTD(1)),
name LowCardinality(String) CODEC(ZSTD(1)),
kind Int32 CODEC(ZSTD(1))... |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50529
Source Host : localhost:3306
Source Database : market
Target Server Type : MYSQL
Target Server Version : 50529
File Encoding : 65001
Date: 2013-06-26 04:51:58
*/
DROP DATABASE IF EXISTS mar... |
select title, tags, akas
from aws.aws_dms_replication_instance
where arn = '{{ output.resource_aka.value }}'; |
DROP PROCEDURE IF EXISTS sp_get_user_attributes;
delimiter //
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_get_user_attributes`(p_username varchar(255))
begin
select 'email' as 'key', email as 'value' from users where username=p_username
union select 'firstname' as 'key', firstname as 'value' from users where userna... |
CREATE TABLE tokens(
key TEXT,
token TEXT
) |
ALTER TABLE "public"."file" DROP COLUMN "base_file_id";
|
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 05-Dez-2020 às 00:06
-- Versão do servidor: 10.4.10-MariaDB
-- versão do PHP: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... |
--# (C) Copyright IBM Corp. 2020 All Rights Reserved.
--# SPDX-License-Identifier: Apache-2.0
--# db-library version 1.0
/*
If you do not have e.g. the EXPLAIN tables or ADMIN_MOVE_TABLE in SYSTOOLS one or two views will fail
as some views depend on objects in SYSTOOLS schema.
You can either ignore such err... |
-- Provide a query that shows the total number of tracks in each playlist.
-- The Playlist name should be include on the resulant table.
-- #15
select
p.name as PlaylistName,
count (t.TrackId) as Number_Of_Tracks
from
Playlist p,
PlaylistTrack plt,
Track t
where
plt.PlaylistId = p.PlaylistId
and
plt.... |
/* These are here so `grep` will find them if we ever change things: */
/* PhabricatorProjectProjectHasMemberEdgeType::EDGECONST = 13 */
/* PhabricatorObjectHasSubscriberEdgeType::EDGECONST = 21 */
INSERT IGNORE INTO {$NAMESPACE}_project.edge (src, type, dst, dateCreated)
SELECT src, 21, dst, dateCreated FROM {$NAM... |
DROP VIEW IF EXISTS rich_guilds;
DROP INDEX IF EXISTS payment_details_email_index;
DROP TRIGGER IF EXISTS guild_tg_estate_worth_check
ON guild;
DROP FUNCTION IF EXISTS check_guild_estate_worth();
DROP FUNCTION IF EXISTS normalize_guilds_month_money();
CREATE VIEW rich_guilds AS
SELECT *
FROM guild
WHERE estate_w... |
-- 日志表新增执行时间字段
ALTER TABLE ${_prefix}gen_table ADD COLUMN data_source_name varchar(64);
COMMENT ON COLUMN ${_prefix}gen_table.data_source_name IS '数据源名称';
-- 新增在线文档Swagger菜单
INSERT INTO ${_prefix}sys_menu (menu_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names, menu_name,... |
CALL somefunction('test', @test1, test2, test3('test'), "test4"); |
-- Tlachtli +3 Culture instead +2
update Building_YieldChanges set YieldChange = 3 where BuildingType = 'BUILDING_TLACHTLI' and YieldType = 'YIELD_CULTURE';
-- Aztecs have +50% production towards melee units
insert or ignore into Modifiers (ModifierId, ModifierType) values ('TRAIT_AZTECS_FIVE_SUNS_MELEE_PRODUCTION', 'M... |
#standardSQL
# 02_35: Distribution of duplicate font-family values per page
CREATE TEMPORARY FUNCTION getFonts(css STRING)
RETURNS ARRAY<STRING> LANGUAGE js AS '''
try {
var reduceValues = (values, rule) => {
if ('rules' in rule) {
return rule.rules.reduce(reduceValues, values);
}
if (!('declaration... |
-- we have to truncate the users table, due to the migration being incompatible (can't have default values for these columns)
truncate "user" cascade;
alter table "user"
rename column display_name to username;
alter table "user"
add unique (username),
add column over_18 boolean not null,
... |
-- MySQL dump 10.13 Distrib 8.0.25, for Linux (x86_64)
--
-- Host: localhost Database: laravel-vue-cli-auth
-- ------------------------------------------------------
-- Server version 8.0.25-0ubuntu0.20.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@... |
-- Change nullability
ALTER TABLE customers
ALTER COLUMN user_id SET NOT NULL,
ALTER COLUMN dod_id DROP NOT NULL;
-- Fix any nullable columns to store null instead of empty string
UPDATE customers SET dod_id = NULL WHERE dod_id = '';
UPDATE customers SET first_name = NULL WHERE first_name = '';
UPDATE customer... |
-- This script must be run by a MySQL user with admin privileges
GRANT SELECT, INSERT, DELETE, UPDATE ON adbcjtck.* TO adbcjtck@localhost IDENTIFIED BY 'adbcjtck';
DROP DATABASE IF EXISTS adbcjtck;
CREATE DATABASE adbcjtck;
USE adbcjtck;
DROP TABLE IF EXISTS simple_values;
CREATE TABLE simple_values (
int_val int... |
create table if not exists reacts
(
id int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
name varchar(30) not null,
thumbnail_url varchar(250) not null,
created_at timestamp default current_timestamp,
updated_at timestamp default current_timestamp
);
create table if not ... |
-- file:prepared_xacts.sql ln:13 expect:true
INSERT INTO pxtest1 VALUES ('aaa')
|
drop table if exists ACT_RU_IDENTITYLINK cascade; |
-- @testpoint:openGauss保留关键字 full 作为列名带反引号(合理报错)
drop table if exists test_tbl;
create table test_tbl(
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(38),
c_char char(50) default null, c_... |
with transactions as (
select *
from {{ var('transactions') }}
),
transaction_lines as (
select *
from {{ var('transaction_lines') }}
),
transaction_lines_w_accounting_period as ( -- transaction line totals, by accounts, accounting period and subsidiary
select
transaction_lines.transaction_id... |
INSERT INTO WWS_COUNTRIES (ID, NAME, ISO3, ISO2, PHONECODE, CAPITAL, CURRENCY, CREATED_AT, UPDATED_AT, FLAG, WIKIDATAID) VALUES (147, 'Montenegro', 'MNE', 'ME', '382', 'Podgorica', 'EUR', TO_TIMESTAMP('2018-07-20 16:41:03','YYYY-MM-DD HH24:MI:SS'), TO_TIMESTAMP('2019-08-02 21:38:23','YYYY-MM-DD HH24:MI:SS'), 1, 'Q236')... |
# Wiktionary kik http://wiktionary.org/ CC BY-SA
00007846-n kik:lemma mundu
00017222-n kik:lemma mũmera
00017222-n kik:lemma mĩmera
00017222-n kik:lemma muti
00017222-n kik:lemma miti
00250259-n kik:lemma maendeleo
00584367-n kik:lemma wira
01792640-n kik:lemma ngoko
02206856-n kik:lemma njuki
02233338-n kik:lemma nyej... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 24, 2018 at 09:19 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
INSERT INTO user_table(uid, active)
VALUES ('c1fe6f0d-420e-4161-a134-9c2342e36c95', true),
('504a2de5-b525-4a74-b2f6-03c7bda719b9', true),
('d273e6f9-bbf5-4126-bd7b-643ffc601291', true),
('e273e6f9-bbf5-4126-bd7b-643ffc601800', true),
('e273e6f9-bbf5-4126-bd7b-643ffc601801', true),
('... |
--test data User
INSERT INTO User (lastName, firstName, username, password)
VALUES('Abbass', 'Cai', 'pinkurinal', 'hungry07');
INSERT INTO User (lastName, firstName, username, password)
VALUES('Edrosa', 'Raine', 'raineaway', 'hungry07');
--test data Calendar
INSERT INTO Calendar (calenName, calenColor, uID)
VALUES('W... |
-- track login state and csrf tokens in the database
--
-- this allows for seamless switching between servers, and also for the api
-- server to be able to authenticate requests based on session cookies without
-- actually reading the session at all.
--
-- One alternative considered was to just put php sessions in the ... |
--DROP VIEW "de.metas.fresh".product_ingredients_v;
CREATE OR REPLACE VIEW "de.metas.fresh".product_ingredients_v AS
select
p.Name as productName,
p.CustomerLabelName,
p.additional_produktinfos,
p.Ingredients,
p.Value ... |
/*
Difficulty: Easy
https://www.hackerrank.com/challenges/japanese-cities-name/problem
Query the names of all the Japanese cities in the CITY table. The COUNTRYCODE for Japan is JPN.
The CITY table is described as follows:
+-------------+--------------+
| Field | Type |
+-------------+--------------+
... |
-- file:event_trigger.sql ln:270 expect:true
CREATE TABLE evttrig.part_1_10 PARTITION OF evttrig.parted (id)
FOR VALUES FROM (1) TO (10)
|
-- Currently being addressed in https://github.com/jOOQ/jOOQ/issues/8846
-- and https://github.com/jOOQ/jOOQ/issues/8834
-- This is correct code according to MySQL but it fails in JOOQ
-- JOOQ doesn't allow multiple clauses in ALTER statements, if you use the standard workaround and turn it into
-- two clauses like so... |
use db;
DROP PROCEDURE IF EXISTS getExamples; |
select timestamptz'2015-10-8 15:00:00 Australia/Darwin';
select timestamptz'2015-10-8 15:00:00 Australia/Perth';
select timestamptz'2015-10-8 15:00:00 Australia/Eucla';
select timestamptz'2015-10-8 15:00:00 Australia/Brisbane';
select timestamptz'2015-10-8 15:00:00 Australia/Lindeman';
select timestamptz'2015-10-8 15:0... |
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : CaretRegressor_ctree2
-- Dataset : RandomReg_10
-- Database : monetdb
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model deployment code
WITH "DT_node... |
alter table if exists cd_pipeline_third_party_service rename to cd_pipeline_service; |
CREATE PROCEDURE [dbo].[themes_sel]
(
@theme_id INT = null
)
AS
BEGIN
SET NOCOUNT ON
IF @theme_id IS NOT NULL
SELECT * FROM dbo.themes WHERE theme_id = theme_id;
ELSE
SELECT * FROM dbo.themes
ORDER BY theme_name;
END
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.