sql stringlengths 6 1.05M |
|---|
<filename>senior/mysql_senior.sql<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50556
Source Host : localhost:3306
Source Database : mysql_senior
Target Server Type : MYSQL
Target Server Version : 50556
File Encoding : 65001
Date: ... |
XQUERY
let $a := 3
return $a-1 |
--PRUEBAS SALTO_BUNGEE
INSERT INTO PARTIDA (duracion, turno, dificultad, estado) VALUES (15, 30, 'Facil','CARGANDO');
INSERT INTO EQUIPO (Nombre, letra, derrotas, victorias, idPartida) VALUES ('UNO','W',0,0,1);
INSERT INTO EQUIPO (Nombre, letra, derrotas, victorias, idPartida) VALUES ('DOS','R',0,0,1);
INSERT INTO GU... |
<filename>DMS5/V_Entity_Rename_Log.sql
/****** Object: View [dbo].[V_Entity_Rename_Log] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[V_Entity_Rename_Log]
AS
SELECT ERL.Entry_ID,
ERL.Target_Type,
ET.Name,
ERL.Target_ID,
ERL.Old_Name,
ERL.Ne... |
<gh_stars>1-10
/*
* Copyright (c) 2010-2014 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
DISTINCT c.room as room,
c.room.area as area
FROM ehr_lookups.cages c
where c.room != '' and c.room is not null
group by c.room,... |
<gh_stars>1-10
SELECT sequenceCount((CAST((( SELECT NULL ) AS rg, ( SELECT ( SELECT [], '<e', caseWithExpr([NULL], -588755.149, []), retention(addWeeks((CAST((-7644612.39732) AS DateTime)), -23578040.02833), (CAST(([]) AS DateTime)), (CAST(([010977.08]) AS String))), emptyArrayToSingle('') ) , '\0', toUInt64([], 't3hw@... |
create table if not exists perf_data_sources
(
id serial not null
constraint perf_data_sources_pk
primary key,
type text
); |
--
-- Copyright 2016-2021 Micro Focus or one of its affiliates.
--
-- 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... |
<filename>.migrations/V20200123054713__initial_table_create.sql
--
-- Definitions
--
CREATE TABLE IF NOT EXISTS task_def (
definition_id character varying PRIMARY KEY,
alias character varying,
image character varying NOT NULL,
group_name character varying NOT NULL,
memory integer,
cpu integer,
gpu integer... |
<reponame>opengauss-mirror/Yat
-- @testpoint: mod函数用于自定义函数返回值
drop function if exists dd_mod;
create or replace function dd_mod() return number
is
begin
return mod('434234',454);
end;
/
select dd_mod();
drop function if exists dd_mod; |
<filename>reconv.sql
-- phpMyAdmin SQL Dump
-- version 4.4.15.9
-- https://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Lun 28 Mai 2018 à 23:13
-- Version du serveur : 5.6.37
-- Version de PHP : 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... |
<reponame>RafaelMoreira1180778/LAPR3-1920
create or replace procedure addPoi(pi_id in VARCHAR, pi_lat in NUMBER, pi_long in NUMBER, pi_elev in NUMBER,
pi_desc in CHAR) is
begin
INSERT INTO place(id_place, latitude_place, longitude_place, elevation, description)
VALUES(pi_id, pi_lat, pi_long, pi_elev, pi_desc);... |
<filename>migrations/2019-06-07-115542_chanindex/up.sql<gh_stars>0
CREATE INDEX channelindex ON messages(channel);
|
etuhteh ;
oeutoeuoeu;
oethulroeethulrtoetu; |
<gh_stars>0
--liquibase formatted sql
--changeset michael:30
create table MC.ROLE (
ID bigint primary key,
NAME character varying(255) NOT NULL UNIQUE,
PARENT_ID bigint
);
insert into MC.ROLE (ID, NAME) values (1, 'subject');
insert into MC.ROLE (ID, NAME) values (2, 'admin');
--rollback drop table MC.RO... |
CREATE OR REPLACE FUNCTION remove_numbers_from_name(name TEXT)
RETURNS VARCHAR AS $$
SELECT translate(name, '0123456789', '');
$$ LANGUAGE SQL;
|
<filename>private/database/tables/data/user_site_page_content_item_jumbotron.sql
insert into `user_site_page_content_item_jumbotron`(`id`,`site_id`,`page_id`,`content_id`,`data_id`,`button_label`) values
(1,1,1,1,1,'Learn more'),
(2,2,2,10,2,'Learn more'),
(3,3,3,19,3,'Learn more');
|
<gh_stars>1-10
--CREATE VIEW WHICH WILL BE DISPLAYING TYPES OF COMFORT WITH AGGREGATED PRICES FOR EACH OF TYPE
BEGIN
FOR i IN (SELECT view_name FROM user_views
WHERE view_name = 'sum_price_view') LOOP
EXECUTE IMMEDIATE 'DROP VIEW sum_price_view';
END LOOP;
END;
/
CREATE VIEW sum_price_view
AS
SELECT R... |
begin;
update pokemon set available=true;
update pokemon set available=false where name in ('Mew', 'Celebi', 'Kecleon', 'Jirachi', 'Deoxys', 'Mime Jr.', 'Rotom', 'Regigigas', 'Phione', 'Manaphy', 'Darkrai', 'Shaymin', 'Arceus');
end; |
<filename>src/main/resources/db/migration/V1__create_schema.sql<gh_stars>1-10
CREATE TABLE IF NOT EXISTS users
(
id BIGSERIAL NOT NULL,
full_name TEXT,
avatar TEXT,
enabled BOOLEAN NOT NULL,
facebook_id TEXT,
google_id TEXT,
vk_id TEXT,
username TEXT,
... |
<filename>prisma/migrations/20210524131036_create_guilds_table/migration.sql
-- CreateEnum
CREATE TYPE "Language" AS ENUM ('en', 'nl');
-- CreateTable
CREATE TABLE "guilds" (
"id" TEXT NOT NULL,
"prefix" TEXT NOT NULL DEFAULT E'!',
"language" "Language" NOT NULL DEFAULT E'en',
"created_at" TIMESTAMPTZ ... |
CREATE TABLE IF NOT EXISTS user_notes (
id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
note VARCHAR NOT NULL,
user_id INT REFERENCES users(id) ON DELETE CASCADE,
alert_id INT REFERENCES alerts(id) ON DELETE CASCADE,
visibility VARCHAR NOT NULL CHECK (visibility IN ('Public', 'Private')),
created_at TI... |
use payroll
exec p_disable_employee_temporal_table
execute p_hire_employee @event_date='2019-02-13 00:00:00', @employee_ssn='909-67-3822', @employee_firstname='Rusty',@employee_lastname='Carz', @employee_hire_date='2019-02-13 00:00:00', @employee_jobtitle='Sales Associate', @employee_department='Hardware', @employee_p... |
<reponame>cspace-deployment/cspace-solr-ucb
-- docsubjects_view table, used in CineFiles denorm
-- CRH 2/23/2014
create table cinefiles_denorm.docsubjects_view as
SELECT
-- h1.name objectCSID,
cast(co.objectnumber as bigint) doc_id,
cinefiles_denorm.getdispl(ccn.item) subj
FROM
hierarchy h1
INNER JOIN co... |
-- CONTAINS --
-- recreate history procedures to ignore certain column(s)
-- drop history view
-- drop history table
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!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 utf8mb4 */;
ALTER TABLE `setting... |
drop table if exists test.lc;
CREATE TABLE test.lc (`date` Date, `name` LowCardinality(Nullable(String)), `clicks` Nullable(Int32)) ENGINE = MergeTree() ORDER BY date SETTINGS index_granularity = 8192;
INSERT INTO test.lc SELECT '2019-01-01', null, 0 FROM numbers(1000000);
SELECT date, argMax(name, clicks) FROM test.l... |
select integration_id, integration_type, api_id, title, akas
from aws.aws_api_gatewayv2_integration
where akas::text = '["{{output.resource_aka.value}}"]'
|
select 'basic';
select countMatches('', 'foo');
select countMatches('foo', '');
-- simply stop if zero bytes was processed
select countMatches('foo', '[f]{0}');
-- but this is ok
select countMatches('foo', '[f]{0}foo');
select 'case sensitive';
select countMatches('foobarfoo', 'foo');
select countMatches('foobarfoo', ... |
--.print "test3.sql starting"
.read /this/doesnt/exist.sql
|
<filename>pg_chameleon/sql/upgrade/203_to_204.sql
-- upgrade catalogue script 2.0.3 to 2.0.4
ALTER TABLE sch_chameleon.t_replica_batch
ADD COLUMN t_gtid_set text;
|
SELECT * FROM sysmessages |
<filename>db/schema.sql
DROP DATABASE IF EXISTS workplace_db;
CREATE DATABASE workplace_db;
USE workplace_db;
CREATE TABLE department (
id INT NOT NULL,
name VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE role (
id INT NOT NULL,
name VARCHAR(30) NOT NULL,
salary DECIMAL NOT NULL,
... |
-- drop set_article
drop function if exists i_article_modify(id integer, title varchar(27),
content text, drafted boolean, tags smallint[], author_id integer);
create function i_article_modify(integer, varchar(27), text,
boolean, smallint[], integer)
returns ... |
use Wintertalentiade
select * from T_Athlets order by AthletLastName asc, AthletFirstName asc |
/*
Remove AdminPageSubscriber table
*/
DROP TABLE [dbo].[AdminPageSubscriber]
GO
|
<filename>APEX/Upgrade/patch_21.2.20220421.sql
-- Patch 21.2.20220421
--------------------------------------------------------
-- DDL for Table BLOG_LIST_OF_VALUES
--------------------------------------------------------
create table blog_list_of_values(
id number( 38, 0 ) not null,
row_version number( 38, 0 ) no... |
CREATE TABLE users(
id INTEGER AUTO_INCREMENT,
first_name VARCHAR(30),
last_name VARCHAR(30),
email VARCHAR(60),
password VARCHAR(20),
is_locked INTEGER,
is_verified INTEGER,
created_at DATETIME,
updated_at DATETIME,
last_accessed DATETIME,
img_url VARCHAR(100),
PRIMARY KEY (id, e... |
-- update audience and article to now
update audience set crawl_time = crawl_time + (select now() - crawl_time from audience order by crawl_time desc limit 1);
update article set crawl_time = crawl_time + (select now() - crawl_time from article order by crawl_time desc limit 1);
|
CREATE TABLE [dbo].[Research] (
[kdID] INT NOT NULL,
[ResearchType] TINYINT NOT NULL,
[ResearchPercent] REAL CONSTRAINT [DF_Research_ResearchPercent] DEFAULT (0) NOT NULL,
[Points] BIGINT CONSTRAINT [DF_Research_Points] DEFAULT (0) NOT NULL,
[Scientists] INT... |
<reponame>HSLdevcom/jore-graphql-import<gh_stars>1-10
create schema if not exists jore;
GRANT ALL ON SCHEMA jore TO CURRENT_USER;
DO
$$
BEGIN
CREATE TYPE jore.MODE AS ENUM ('BUS', 'TRAM', 'RAIL', 'SUBWAY', 'FERRY');
EXCEPTION
WHEN duplicate_object THEN NULL;
END
$$;
|
INSERT INTO WWS_COUNTRIES (ID, NAME, ISO3, ISO2, PHONECODE, CAPITAL, CURRENCY, CREATED_AT, UPDATED_AT, FLAG, WIKIDATAID) VALUES (188, 'Saint Vincent And The Grenadines', 'VCT', 'VC', '+1-784', 'Kingstown', 'XCD', 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... |
INSERT INTO "Chinook"."InvoiceLine" ("InvoiceLineId","InvoiceId","TrackId","UnitPrice","Quantity") VALUES (469,88,2826,1.99,1)
;INSERT INTO "Chinook"."InvoiceLine" ("InvoiceLineId","InvoiceId","TrackId","UnitPrice","Quantity") VALUES (1876,347,907,0.99,1)
;INSERT INTO "Chinook"."InvoiceLine" ("InvoiceLineId","InvoiceI... |
<reponame>WFP-VAM/HRM
CREATE TABLE "public".config (
dataset_filename varchar NULL,
satellite_grid varchar NULL,
satellite_config json NULL,
id serial NOT NULL,
"indicator" varchar NULL,
"comment" varchar NULL,
"output" varchar NOT NULL DEFAULT 'regression'::character varying,
log bool NULL DEFAULT false,
base... |
-- file:groupingsets.sql ln:36 expect:true
insert into gstest4
values (1,1,b'0000','1'), (2,2,b'0001','1'),
(3,4,b'0010','2'), (4,8,b'0011','2'),
(5,16,b'0000','2'), (6,32,b'0001','2'),
(7,64,b'0010','1'), (8,128,b'0011','1')
|
# snp.sql was originally generated by the autoSql program, which also
# generated snp.c and snp.h. This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly
# automatic way.
#Polymorphism data from dbSnp XML or genotyping arrays
CREATE TABLE snp (
bin smal... |
<reponame>paullewallencom/php-978-1-7839-8162-5
insert into students
values( 1,
"John",
"Doe",
"3225 Woodland Park St",
"Houston",
"TX",
"77082"
);
|
-- Administrador
INSERT INTO users(username,password,enabled) VALUES ('admin1','<PASSWORD>', TRUE);
INSERT INTO authorities(id,username,authority) VALUES (1,'admin1','admin');
-- Clientes
INSERT INTO users(username,password,enabled) VALUES ('enrmorvaz','administrador',TRUE);
INSERT INTO authorities(id,username,authori... |
<gh_stars>0
CREATE SCHEMA IF NOT EXISTS blog;
CREATE TABLE IF NOT EXISTS blog.users (
id BIGINT PRIMARY KEY,
username VARCHAR(255) NOT NULL
);
CREATE TABLE IF NOT EXISTS blog.posts (
id BIGINT PRIMARY KEY,
title VARCHAR(600) NOT NULL,
slug VARCHAR(600) NOT NULL,
text_cont... |
/*该SQL为项目必须执行的脚本*/
CREATE TABLE `sys_province` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增列',
`province_code` varchar(40) NOT NULL COMMENT '省份代码',
`province_name` varchar(50) NOT NULL COMMENT '省份名称',
`short_name` varchar(20) NOT NULL COMMENT '简称',
`lng` varchar(20) DEFAULT NULL COMMENT '经度',
`lat` va... |
<reponame>devoteamgcloud/bvi
-- billing_data
SELECT
LEFT(FORMAT_UTC_USEC(usage_start_time),10) AS base_date,
service.description AS service.product,
sku.description AS sku.resource_type,
usage_start_time AS start_time,
usage_end_time AS end_time,
IFNULL(cost,0) AS cost,
currency AS currency,
currency_c... |
DROP TABLE IF EXISTS sellercategory;
DROP TABLE IF EXISTS sellers;
DROP TABLE IF EXISTS goodscategoryleveltwo;
DROP TABLE IF EXISTS goodscategorylevelone;
DROP TABLE IF EXISTS mainconf;
CREATE TABLE mainconf (
PK INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
TITLE VARCHAR(20) NOT NULL,
PAGE_LOAD_INTERV... |
-- @testpoint: 不支持对回收站对象执行DQL操作select,合理报错
--step1: 查询enable_recyclebin默认值; expect:显示默认值off
show enable_recyclebin;
--step2: 修改enable_recyclebin为on; expect:修改成功
alter system set enable_recyclebin to on;
select pg_sleep(2);
show enable_recyclebin;
--step3: 如果表存在清除表且清除回收站; expect:表清除成功且回收站清除成功
drop table if exists t_t... |
<filename>lab6/db lab6.sql<gh_stars>0
CREATE TABLE [Cariages].[dbo].[LongJourneys] (
id int IDENTITY(1,1) NOT NULL,
carId int,
driverId int,
departure smalldatetime,
[weight] numeric(18,0),
distance numeric(18,0),
arrival smalldatetime,
departureDate date,
departureTime time(7),
arrivalDate date,
... |
{{
config(alias=dbt_resto.get_table_alias(this))
}}
select '{{ this.table }}' as actual,
concat('verify_get_table_alias', '{{ var("table_suffix") }}') as expected |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 16-10-2019 a las 22:49:47
-- Versión del servidor: 10.1.13-MariaDB
-- Versión de PHP: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... |
<reponame>saten-999/PersonalDictionary
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5ubuntu0.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 16, 2021 at 07:16 AM
-- Server version: 5.7.33-0ubuntu0.18.04.1
-- PHP Version: 7.2.24-0ubuntu0.18.04.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
S... |
-- version 4.7.7\
-- https://www.phpmyadmin.net/\
--\
-- Servidor: localhost\
-- Tiempo de generaci\'f3n: 19-03-2018 a las 04:26:07\
-- Versi\'f3n del servidor: 5.6.38\
-- Versi\'f3n de PHP: 7.2.1\
\
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";\
SET time_zone = "+00:00";\
\
--\
-- Base de datos: `arte_app_local`\
--\
\
-- -... |
<reponame>MitchGuth/theLocalExperience
CREATE TABLE contributions(
postId SERIAL PRIMARY KEY NOT NULL,
latitude NUMERIC,
longitude NUMERIC,
title TEXT,
description TEXT,
tags TEXT,
userId TEXT,
photoUrl TEXT NOT NULL,
time TEXT
);
CREATE TABLE users(
userId SERIAL PRIMARY KEY NO... |
/*
* sprockit.[DeserialiseProcesses]
* Copyright (c) 2020-2021 <NAME> (<EMAIL>)
* http://richardswinbank.net/sprockit
*
* Deserialise process list from XML & sync to database
*/
CREATE PROCEDURE [sprockit].[DeserialiseProcesses] (
@processes XML
) AS
SET NOCOUNT ON
IF @processes IS NULL
BEGIN
RAISERROR ... |
SET @sName = 'bx_forum';
-- SETTINGS
SET @iCategId = (SELECT `id` FROM `sys_options_categories` WHERE `name`=@sName LIMIT 1);
DELETE FROM `sys_options` WHERE `name`='bx_forum_labels';
INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
('bx_fo... |
<gh_stars>10-100
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.1.63-community - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL version: 7.0.0.4053
-- Date/time: 201... |
<gh_stars>0
CREATE SCHEMA `psims`;
USE `psims`;
-- ----------------------------
-- Table structure for password
-- ----------------------------
DROP TABLE IF EXISTS `password`;
CREATE TABLE `password` (
`pwd` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records ... |
CREATE TEMPORARY TABLE tmp_t1 AS SELECT * FROM typeall_l;
WITH cte_on_tmptbl ( c1, c2, c3 )
AS
(
SELECT col_int, col_chr, col_vrchr1 FROM tmp_t1
)
SELECT * FROM cte_on_tmptbl;
DROP TABLE tmp_t1;
|
<reponame>nineinchnick/trino-cicd<filename>sql/ci-cd/longest-steps-of-longest-jobs.sql<gh_stars>1-10
WITH
longest_job_names AS (
SELECT name
FROM
jobs
WHERE ((owner = 'trinodb') AND (repo = 'trino'))
GROUP BY 1
ORDER BY sum((completed_at - started_at)) DESC
LIMIT 10
)
SELECT
s.name step_name
... |
/*-------------------------------------------------------------------------
*
* Copyright (c) 2013, Max Planck Institute for Marine Microbiology
*
* This software is released under the PostgreSQL License
*
* Author: <NAME> <<EMAIL>>
*
* IDENTIFICATION
* sql/aa_sequence.test.sql
*
*------------------------------------... |
CREATE TABLE `cache` (
`key` CHAR(40) NOT NULL PRIMARY KEY,
`content_type` VARCHAR(100) NOT NULL,
`body` TEXT NOT NULL,
`tstamp` INTEGER UNSIGNED NOT NULL
);
|
-- Count total number of rows in a table
SELECT COUNT(*) FROM my_database.table_name;
-- Count the number of non null records in a column
SELECT COUNT(column_name) FROM my_database.table_name;
-- Count the number of distinct records in a column
SELECT COUNT(DISTINCT column_name) FROM my_database.table_name;
|
-- @testpoint:opengauss关键字bigint(非保留),作为字段数据类型(合理报错)
--前置条件
drop table if exists bigint_test cascade;
--关键字不带引号-合理报错
create table bigint_test(id int,name bigint);
--关键字带双引号-合理报错
create table bigint_test(id int,name "bigint");
--关键字带单引号-合理报错
create table bigint_test(id int,name 'bigint');
--关键字带反引号-合理报错
create tabl... |
CREATE TABLE IF NOT EXISTS users
( id INTEGER PRIMARY KEY AUTOINCREMENT
, username VARCHAR NOT NULL
, password CHAR(64)
, cert_fp CHAR(64)
, op_level INTEGER
, hostname VARCHAR
, CHECK (password IS NOT NULL OR cert_fp IS NOT NULL)
);
CREATE TABLE IF NOT EXISTS channels
( id ... |
UPDATE t_significados s
SET s.significado = '0'
WHERE s.dominio = 'POLITICA_VALIDACION_CLAVE_ACCESO'
AND s.codigo IN ('CAN_MIN_CARACTERES_ESPECIALES',
'CAN_MIN_LETRAS_ABECEDARIO',
'CAN_MIN_MAYUSCULAS',
'CAN_MIN_MINUSCULAS');
UPDATE t_significados s
... |
<filename>Alternanza.sql<gh_stars>0
----------- Con.Di.Class -----------
CREATE TABLE IF NOT EXISTS cdc(
id_cdc int AUTO_INCREMENT,
sezione char,
classe int,
anno_scolastico date,
PRIMARY KEY (id_cdc)
)ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
-------------------------------------
---... |
<filename>assets/sql/usuario.sql
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Tempo de geração: 24/08/2015 às 23:57
-- Versão do servidor: 5.6.21
-- Versão do PHP: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... |
<filename>teet.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 10, 2019 at 08:08 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... |
SELECT array_count(ARRAY['de','de','us']);
SELECT hstore_add('a=>1,b=>2'::hstore,'b=>1,c=>2'::inthstore);
SELECT hstore_add('a=>1.3,b=>2.5'::hstore,'b=>1.2,c=>2.4'::floathstore);
SELECT hstore_add('a=>1,b=>2'::hstore,'b=>1,c=>2'::inthstore);
SELECT hstore_sub('a=>2,b=>3'::hstore,'b=>1,c=>2'::inthstore);
SELECT hstore_s... |
<reponame>tushartushar/dbSmellsData<filename>data/open-source/extracted_sql/ndlib_curate_nd.sql<gh_stars>1-10
CREATE INDEX users_username ON users (username)
select count(*) from fedora_objects where obj_ingest_date < "2016-07-01" and resource_type not regexp '^(GenericFile|Hydramata_Group|LinkedResource|Person|Profil... |
drop database if exists cinema;
create database cinema;
use cinema;
--Tablas normales
create table Producto(
idProducto integer not null,
nombreProducto varchar(45) not null,
cantidad integer not null,
precio integer not null
);
alter table Producto add constraint Producto_pk primary key (idProduct... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Tempo de geração: 10/08/2020 às 18:06
-- Versão do servidor: 10.4.13-MariaDB
-- Versão do PHP: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... |
BEGIN;
LOCK users;
CREATE TABLE users_temp (LIKE users INCLUDING ALL);
INSERT INTO users_temp -- no target list in this case
SELECT row_number() OVER (ORDER BY id), email, name, created, number -- all columns in default order
FROM users;
ALTER SEQUENCE users_id_seq OWNED BY users_temp.id; -- make new table own s... |
-- file:numeric.sql ln:251 expect:true
INSERT INTO num_exp_div VALUES (5,6,'.17461941433576102689')
|
<reponame>letuananh/jamdict
/* Add meta info */
CREATE TABLE IF NOT EXISTS meta (
key TEXT PRIMARY KEY NOT NULL,
value TEXT NOT NULL
);
-------------------------------------------------------------------------------------
-- JMDict
-------------------------------------------------------------------------... |
<gh_stars>1000+
CREATE OR REPLACE PYTHON SCALAR SCRIPT TEST.MYHELLOWORLD() RETURNS VARCHAR(2000) AS
l = exa.import_script('LIB.MYLIB')
def run(ctx):
return l.helloWorld()
/
|
<gh_stars>1000+
-- 2017-09-04T08:22:02.715
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,Description,EntityType,FieldLength,Help,IsActive,IsA... |
alter session set "_ORACLE_SCRIPT"=true;
create user jb identified by pass;
grant connect, resource, dba to jb;
exit;
|
<reponame>Visualrainy/spring-boot-demo
insert into person(id, name, age, address) values (hibernate_sequence.nextval, '王云飞', 32, '合肥')
insert into person(id, name, age, address) values (hibernate_sequence.nextval, 'xx', 31, '北京')
insert into person(id, name, age, address) values (hibernate_sequence.nextval, 'yy', 30, '... |
<filename>problem/data_generation/data/ddl_to_data_schema_01.sql
CREATE TABLE Order_Line (
order_line_id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
purchase_order_id TEXT
);
CREATE TABLE Plan (
plan_id TEXT,
title TEXT
);
CREATE TABLE Pln_Orl ( --df: mult=2.0
plan_id TEXT,
order_line_id INT REF... |
CREATE TABLE user_presences (
user_id int NOT NULL,
last_seen_at timestamp,
PRIMARY KEY(user_id)
) |
CREATE OR REPLACE FUNCTION cdb_dataservices_server.obs_dumpversion(username text, orgname text)
RETURNS text AS $$
CONNECT cdb_dataservices_server._obs_server_conn_str(username, orgname);
SELECT cdb_observatory.obs_dumpversion();
$$ LANGUAGE plproxy VOLATILE PARALLEL UNSAFE;
-- We could create a super type for the... |
<reponame>karthikrameskum/motech
ALTER TABLE MOTECH_TASKS_TASKACTIONINFORMATION_VALUES MODIFY VALUE VARCHAR(500);
ALTER TABLE MOTECH_TASKS_TASKACTIONINFORMATION__HISTORY_VALUES MODIFY VALUE VARCHAR(500);
ALTER TABLE MOTECH_TASKS_TASKACTIONINFORMATION__TRASH_VALUES MODIFY VALUE VARCHAR(500); |
/****** Object: Table [security].[ApplicationRole] Script Date: 09.12.2019 15:03:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [security].[ApplicationRole](
[RoleName] [nvarchar](128) NOT NULL,
[Type] [nvarchar](128) NULL,
[Alias] [nvarchar](64) NULL,
CONSTRAINT [PK_ApplicationRole] P... |
DROP TABLE IF EXISTS `ts_train`;
CREATE TABLE `ts_train` (
`id` int(11) unsigned NOT NULL auto_increment,
`uid` int(11) unsigned NOT NULL,
`title` varchar(50) NOT NULL default '',
`description` VARCHAR( 500 ) NOT NULL default '' COMMENT '培训简介',
`address` varchar(255) default '',
`cost` int(11) unsig... |
<reponame>storycoding/storybyeveryone
CREATE DATABASE SBE;
\c sbe;
CREATE TABLE contacts (
id SERIAL PRIMARY KEY,
name varchar(24) NOT NULL,
email varchar(24) UNIQUE NOT NULL
);
INSERT INTO contacts(name, email) VALUES ('Nuno', '<EMAIL>'); |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.3.11
-- Generation Time: Aug 23, 2021 at 06:36 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
<gh_stars>0
SELECT * FROM customers LEFT JOIN orders ON customers.cid = orders.cid
WHERE orders.order_date < '2000-01-01' OR customers.name = 'Jones'
|
<filename>booking_hotel.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 08, 2021 at 08:04 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... |
-- Terminate connections to database DB_NAME
SELECT pg_terminate_backend(pg_stat_activity.pid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = 'DB_NAME'
AND pid <> pg_backend_pid(); |
CREATE TABLE [dbo].[MeetAttachment]
(
[Id] BIGINT IDENTITY(1, 1) NOT NULL,
[MeetId] BIGINT NOT NULL,
[UploadIp] NVARCHAR(16) NULL,
[UploadUtc] DATETIMEOFFSET NULL,
... |
CREATE DATABASE IF NOT EXISTS `sanitary_shop` DEFAULT CHARACTER SET utf8;
USE `sanitary_shop`;
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: sanitary_shop
-- ------------------------------------------------------
-- Server version 8.0.26
SET @OLD_CHARACTER_SET_CLIENT=@@CHA... |
/*
SQLyog Ultimate v9.63
MySQL - 5.5.5-10.1.21-MariaDB : Database - world_look
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_K... |
<filename>Intro to Computer Science/lab7/1.sql
SELECT
name
FROM
songs |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.