sql stringlengths 6 1.05M |
|---|
-- liquibase formatted sql
-- changeset Lang:l-state-1
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for L_STATE
-- ----------------------------
DROP TABLE IF EXISTS `L_STATE`;
CREATE TABLE `L_STATE`
(
`KEY` VARCHAR(36) NOT NULL COMMENT '「key」- 省会主键',
... |
-- // CLOUD-86059 convert certificates to base64
-- Migration SQL that makes the change goes here.
UPDATE securityconfig SET clientkey = encode(clientkey, 'base64')::bytea;
UPDATE securityconfig SET clientcert = encode(clientcert, 'base64')::bytea;
UPDATE securityconfig SET servercert = encode(servercert, 'base64')::b... |
REM ** DEBUG THESE STEPS BY turning ON the OUTPUTs **********************************************
set serveroutput off verify off
set termout off
define stg_types = '&1'
REM *********************************************************************************************
REM ** RUN AS PRE_ETL_OWNER
REM ******************... |
<filename>uninstalldb.sql
USE `mysql`;
DROP FUNCTION IF EXISTS `cassandra`;
|
ALTER TABLE `purchase_committee` ADD `pc_purchasethrough` VARCHAR(255) NOT NULL AFTER `pc_dept`;
ALTER TABLE `purchase_committee` CHANGE `pc_creation date` `pc_creationdate` DATE NOT NULL;
ALTER TABLE `purchase_committee` CHANGE `pc_rep2` `pc_rep2` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL, CHANGE ... |
ALTER TABLE `ecommerce_product_attributes` DROP INDEX IF EXISTS `id_key`;
ALTER TABLE `ecommerce_shipments` DROP INDEX IF EXISTS `number`;
|
<reponame>RiordanFols/diplom
insert into usr (id, username, name, surname, middle_name, passport_id, passport_series, password, is_active, spent)
VALUES (150, 'pavel99', 'Pavel', 'Chernov', 'Vladimirovich', 234123, 1050, '123456', true, 512.25),
(151, 'manager', 'Anton', 'Turkov', 'Alexandrovich', 0, 0, '123456'... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 08 Jul 2021 pada 00.45
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.2.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
--PART I – Queries for Diablo Database
--Problem 1. Number of Users for Email Provider
--Find number of users for email provider from the largest to smallest, then by Email Provider in ascending order.
SELECT SUBSTRING(u.Email,CHARINDEX('@' ,u.Email,1)+1,LEN(u.Email)) AS 'Email Provider'
,COUNT(u.Id) AS 'Numb... |
<gh_stars>0
--------------------------------------------------------------------------------
-- Initialization --------------------------------------------------------------
--------------------------------------------------------------------------------
----------------------------------------------------------------... |
<reponame>Sofiya9/task-list
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Мар 14 2018 г., 10:49
-- Версия сервера: 5.7.20
-- Версия PHP: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
CREATE TABLE submissions (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id) NOT NULL,
project_id INTEGER REFERENCES projects(id) NOT NULL
)
|
USE seed;
DROP TABLE IF EXISTS sys_filter_chain;
CREATE TABLE sys_filter_chain (
id BIGINT(19) NOT NULL COMMENT '权限过滤链ID',
url VARCHAR(255) DEFAULT NULL COMMENT '目标URL',
filter VARCHAR(30) DEFAULT NULL COMMENT '过滤器名称',
sort_code INT(10) DEFAULT NULL COMMENT '排序码',
created_at DATETIME DEFAULT NULL C... |
-- Extracts and outputs events and facts from CDM data. Bringing the
-- data together in this way allows one to easily query event sequences
-- and thus patient histories. A fact is just like an event except that
-- it doesn't have any temporal information attached.
-- Copyright (c) 2018 <NAME>. This is free softwa... |
CREATE TABLE IF NOT EXISTS guild_data (
guild_id BIGINT NOT NULL PRIMARY KEY,
prefix VARCHAR(5) NOT NULL,
prefix_case_insensitive BOOLEAN NOT NULL DEFAULT true
);
CREATE TABLE IF NOT EXISTS guild_disabled (
guild_id BIGINT NOT NULL PRIMARY KEY,
command_name VARCHAR(30)[],
channel_id BIGINT[... |
USE sakila;
SELECT actor.first_name, actor.last_name, film.title, film.description
FROM actor
LEFT JOIN film_actor
ON actor.actor_id = film_actor.actor_id
LEFT JOIN film
ON film_actor.film_id = film.film_id
WHERE film.title IS NULL;
-- cliente que invirtió más en el último año
SELECT c.customer_id, c.first_name, c.la... |
<gh_stars>1-10
CREATE TABLE [dbo].[bid] (
[ID] BIGINT IDENTITY (1, 1) NOT NULL,
[Name] VARCHAR (200) NOT NULL,
CONSTRAINT [PK_bid_ID] PRIMARY KEY CLUSTERED ([ID] ASC),
CONSTRAINT [ix_bid_Name] UNIQUE NONCLUSTERED ([Name] ASC)
);
|
CREATE TABLE IF NOT EXISTS `admins` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(45) NOT NULL,
`password` varchar(100) NOT NULL,
`fullName` varchar(45) NOT NULL,
`JWTToken` varchar(300) DEFAULT NULL,
`createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` timestamp NOT NULL DEFAU... |
-- fts3cov.test
--
-- execsql {
-- INSERT INTO t1(t1) VALUES('optimize');
-- SELECT substr(hex(root), 1, 2) FROM t1_segdir;
-- }
INSERT INTO t1(t1) VALUES('optimize');
SELECT substr(hex(root), 1, 2) FROM t1_segdir; |
<gh_stars>10-100
# Updates schema from version 1 to version 2
ALTER TABLE QC MODIFY fastqc1_max_sequence_length INT UNSIGNED;
ALTER TABLE QC MODIFY fastqc1_min_sequence_length INT UNSIGNED;
ALTER TABLE QC MODIFY fastqc1_sequences_flagged_as_poor_quality INT UNSIGNED;
ALTER TABLE QC MODIFY fastqc1_total_sequences INT UN... |
<filename>atd-vzd/migrations/migration_units_2019-11-07--1026.sql
--
-- Enforces unique records in the Units table
--
create index atd_txdot_units_unique_index
on atd_txdot_units (crash_id, unit_nbr); |
-- Dumping database structure for burgers_db
CREATE DATABASE IF NOT EXISTS `burgers_db`;
USE `burgers_db`;
-- Dumping structure for table burgers_db.burgers
CREATE TABLE IF NOT EXISTS `burgers` (
`id` int NOT NULL AUTO_INCREMENT,
`burger_name` varchar(50) NOT NULL DEFAULT '0',
`devoured` tinyint(1) NOT NULL DEFA... |
<filename>src/FamUnion.Db/StoredProcedures/spSaveAddressByEntityTypeAndId.sql
CREATE PROCEDURE [dbo].[spSaveAddressByEntityTypeAndId]
@userId nvarchar(100),
@entityType nvarchar(100),
@entityId uniqueidentifier,
@description nvarchar(255),
@line1 nvarchar(100),
@line2 nvarchar(100),
@city nvarchar(100),
@stat... |
<filename>web/spring-data-rest-demo/src/main/resources/db/migration/h2/V2__insert_sample_data.sql
INSERT INTO USERS (id, email, password, name, enabled, last_password_reset_date) VALUES
(1, '<EMAIL>', <PASSWORD>', 'Admin', true, null),
(2, '<EMAIL>', <PASSWORD>', '<PASSWORD>', true, null)
;
INSERT INTO ROLES (id, nam... |
<reponame>tharangar/k8s-webserver
-- PHPOE-2086
DROP TABLE `import_mapping`;
ALTER TABLE `z2086_import_mapping` RENAME `import_mapping`;
DROP TABLE `survey_forms`;
ALTER TABLE `z2086_survey_forms` RENAME `survey_forms`;
DROP TABLE `survey_questions`;
ALTER TABLE `z2086_survey_questions` RENAME `survey_questions`;
-... |
<reponame>regyssilveira/firedac-demos
create table transactions (
id integer not null,
descricao varchar(100) not null,
constraint pk_transacations
primary key(id)
);
SET TERM ^ ;
CREATE OR ALTER TRIGGER tr_transaction_BI FOR transactions
ACTIVE BEFORE INSERT POSITION 0
as
begin
select
coalesce(ma... |
<reponame>adrianmahjour/db2-samples
-----------------------------------------------------------------------------
-- (c) Copyright IBM Corp. 2007 All rights reserved.
--
-- The following sample of source code ("Sample") is owned by International
-- Business Machines Corporation or one of its subsidiaries ("IBM") and ... |
<filename>cql-engine-fhir/src/test/resources/org/opencds/cqf/cql/data/fhir/TestCodeRef.cql
library TestCodeRef version '1'
using FHIR
codesystem "SNOMED": 'http://snomed.info/sct'
codesystem "LOINC": 'http://loinc.org'
code "XYZ Code": '185349003' from "SNOMED"
code "ABC Code": '55284-4' from "LOINC"
define CodeRef1... |
create class test_class (date_col date, time_col time, timestamp_col timestamp, datetime_col datetimeltz, datetime_col1 datetimeltz);
insert into test_class values (DATE '01/01/1971', TIME '09:00:00', TIMESTAMP '01/01/1972 10:30:00', datetimeltz '1970-01-01 12:00:00.000', datetimeltz '1970-01-01 12:00:00.000');
insert... |
-- @testpoint:opengauss关键字reuse(非保留),作为函数名
--关键字不带引号-成功
drop function if exists reuse;
create function reuse(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
--清理环境
drop function reuse;
--关键字带双引号-成功
drop function if exists "reuse";
create function "reuse"(i integer)
returns integer
a... |
use crhdybcsctttyd85;
select * from USER_CHARS; |
-- PHASE 2, QUERY #1
SELECT city, state, population_estimate_2018
FROM cities;
-- RESULTS:
-- city | state | population_estimate_2018
-- ---------------+----------------------+--------------------------
-- New York | New York | 8398748
-- Los Angeles | Cal... |
insert into LINKS(url)
values ('https://news.sina.cn');
|
CREATE UNIQUE INDEX "CONTOSO"."IDX_CUSTOMERS_CUSTOMER_ID_NAME_CREDIT_LIMIT" ON "CONTOSO"."CUSTOMERS" ("CUSTOMER_ID", "NAME")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEF... |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1:3306
-- Thời gian đã tạo: Th8 25, 2021 lúc 03:34 PM
-- Phiên bản máy phục vụ: 5.7.21
-- Phiên bản PHP: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4010... |
<reponame>Shtereva/CSharp-DB-Fundametals<gh_stars>0
SELECT tem.ProductName, tem.ProductAverageRate, tem.DistributorName, tem.DistributorCountry FROM
(SELECT p.Name AS [ProductName],
AVG(f.Rate) AS [ProductAverageRate],
d.Name AS [DistributorName],
co.Name AS [DistributorCountry],
COUNT(d.Name) OVER (PARTI... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 19, 2021 at 01:36 PM
-- 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... |
<filename>banco_sql_loja_seu_jose.sql
create database loja_de_pecas;
use loja_de_pecas;
create table pecas (
codigo_de_barras bigint primary key,
nome varchar(45) not null,
modelo_do_carro varchar(50) not null ,
fabricante varchar (50) not null,
preco_de_custo decimal (8,2) not null,
preco_de_venda decimal (8,2) not n... |
<reponame>URAmiRBin/steamdb
-- ranks top selling games according to how many time people have bought a game
SELECT
game_id,
RANK ( ) OVER ( ORDER BY COUNT(game_id) DESC ) top_selling
FROM
user_games
GROUP BY
game_id; |
-- mysql -h localhost -u root -p
-- creando base de datos
create database sistema_riego
-- accediendo a base de datos
use sistema_riego
-- CREANDO TABLAS DE REGISTRO
CREATE TABLE roles (
id_rol integer NOT NULL,
desc_rol varchar (32) NOT NULL,
PRIMARY KEY(id_rol)
) ENGINE=INNODB;
... |
use tier_0;
select 'Generating start groups' AS '';
CREATE TEMPORARY TABLE start_groups (select id from meetup_groups where country_name="United Kingdom" and category_id=34);
select 'Generating start events' AS '';
CREATE TEMPORARY TABLE start_events (select distinct(event_id) from meetup_groups_events where group_id... |
--
-- Volcado de datos para la tabla `modelos`
--
INSERT INTO `marcas` (`name`) VALUES
('Dahua'),
('DELL'),
('EPSON'),
('EZ-IP'),
('G-FAST'),
('Genérica'),
('Genius'),
('Grandstream'),
('Hitachi'),
('HP'),
('Lanier'),
('Lenovo'),
('LG'),
('Logitech'),
('Sagecom'),
('Samsung'),
('Seisa'),
('TCL'),
('TP-LINK'),
('TP-LIN... |
IF $(OneTimeLoad) = 1
BEGIN
DECLARE @Video TABLE
(
VideoKey INT NOT NULL PRIMARY KEY,
SectionKey INT NOT NULL,
VideoServiceKey INT NOT NULL,
VideoServiceVideoId VARCHAR(11) NULL,
Url NVARCHAR(500) NULL,
StartTime TIME(7) NULL,
CreatedByUserKey INT NOT NUL... |
<reponame>DataHandwerk/DataHandwerk-toolkit-mssql
CREATE SYNONYM [sys_dwh].[extended_properties] FOR [sys].[extended_properties];
GO
EXECUTE sp_addextendedproperty @name = N'AntoraReferencingList', @value = N'* xref:repo_sys.ExtendedProperties.adoc[]', @level0type = N'SCHEMA', @level0name = N'sys_dwh', @level1... |
SELECT COUNT(ST.StoryId) as Count FROM StoryTag ST LEFT JOIN Story S ON S.Id = ST.StoryId WHERE ST.TagId = ?;
|
<reponame>Stolym/RAGEMP
select * from bindings where type = :type:;
|
<filename>src/test/resources/sql/insert/088a995e.sql
-- file:arrays.sql ln:385 expect:true
insert into arr_tbl values ('{1,5,3}')
|
SET FOREIGN_KEY_CHECKS = 0;
CREATE TABLE `contact` ( `contact_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `email` varchar(64) COLLATE utf8mb4_bin NOT NULL, `first_name` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL, `last_name` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL, `phone_number` varchar(64) COLLATE utf8mb4_b... |
<reponame>CarlosMbp/IngerGym
-- MySQL dump 10.13 Distrib 8.0.14, for Win64 (x86_64)
--
-- Host: localhost Database: posts
-- ------------------------------------------------------
-- Server version 8.0.14
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CH... |
/*
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may... |
<gh_stars>1-10
-- db_patches
INSERT INTO `db_patches` (`issue`, `created`) VALUES('POCOR-3253', NOW());
-- workflow_models
RENAME TABLE `workflow_models` TO `z_3253_workflow_models`;
DROP TABLE IF EXISTS `workflow_models`;
CREATE TABLE IF NOT EXISTS `workflow_models` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name`... |
<filename>DMS5/FindAnalysisJob.sql
/****** Object: StoredProcedure [dbo].[FindAnalysisJob] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE dbo.FindAnalysisJob
/****************************************************
**
** Desc:
** Returns result set of Analysis Jobs
** satisfying ... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: May 31, 2020 at 11:57 PM
-- Server version: 5.7.23
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `krqnscqx_RWFA`
--
-- ---------------------... |
ALTER TABLE custom_domain DROP COLUMN "updated_at";
ALTER TABLE custom_domain DROP COLUMN "updated_by";
|
CREATE INDEX CONCURRENTLY IF NOT EXISTS address_postcode_idx ON Address USING gist (postcode gist_trgm_ops); |
<gh_stars>100-1000
#
# Table structure for table equiv of yubikey_mapping
#
CREATE TABLE IF NOT EXISTS `otp`.`yubikey_mappings` (
`otp_id` VARCHAR(12) NOT NULL ,
`username` VARCHAR(64) NOT NULL ,
PRIMARY KEY (`otp_id`(12))
);
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3312
-- Generation Time: Jul 18, 2018 at 06:37 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
<gh_stars>0
SELECT
D1.val AS subject,
DP1.val AS predicate
FROM
Triples T
JOIN Dictionary DP1 ON T.predicate=DP1.ID
JOIN Dictionary D1 ON T.subject=D1.ID
JOIN Dictionary D2 ON T.object=D2.ID
WHERE
D2.val='person:Paul_Erdoes';
|
<gh_stars>0
--Data Analysis
--1
SELECT Employees.emp_no,
Employees.last_name,
Employees.first_name,
Employees.sex,
Salaries_1.salary
FROM Employees
INNER JOIN Salaries_1 ON
Employees.emp_no = Salaries_1.emp_no;
--2
SELECT first_name, last_name, hire_date
FROM Employees
WHERE hire_date > '31-12-1985';
--3
SELE... |
<gh_stars>0
---------------------------------------------------------------
-- view: vw_opendata_issues
---------------------------------------------------------------
-- drop view vw_opendata_issues;
create or replace view vw_opendata_issues as
select
to_char(ch.date_charged, 'YYYY-MM-DD') as date_issued,
ch.charge... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th3 08, 2021 lúc 03:41 AM
-- Phiên bản máy phục vụ: 10.4.16-MariaDB
-- Phiên bản PHP: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 15 Jul 2021 pada 06.32
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 8.0.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<reponame>widya22/CI.3.E41181728_P4
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 09 Jul 2021 pada 10.09
-- Versi server: 10.4.16-MariaDB
-- Versi PHP: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!401... |
<reponame>knonm/oracle-utils
SET LINESIZE 300
COLUMN owner FORMAT A10
COLUMN r_owner FORMAT A10
COLUMN constraint_name FORMAT A25
COLUMN r_constraint_name FORMAT A25
COLUMN search_condition FORMAT A30
COLUMN column_name FORMAT A15
COLUMN table_name FORMAT A25
SELECT c.owner,
c.constraint_name,
c.constra... |
<reponame>Thomas-S-B/sqltoolsservice
insert top (10) into mytable values (10, 11);
|
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Gegenereerd op: 02 dec 2020 om 18:24
-- Serverversie: 8.0.22
-- PHP-versie: 8.0.0RC4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- SQL - PostgreSQL 9.6
SELECT
MOD(number1, number2)
FROM
decimals
;
|
-- intpkey.test
--
-- execsql {
-- SELECT * FROM t1 WHERE b=='hello'
-- }
SELECT * FROM t1 WHERE b=='hello' |
<filename>XFILES/xdbpm/XDBPM_XMLSCHEMA_SEARCH.sql
/* ================================================
* Oracle XFiles Demonstration.
*
* Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software ... |
GRANT select on test_db.test_table1 TO dbus;
GRANT select on test_db.test_table2 TO dbus;
GRANT select on test_db1.test1_table1 TO dbus;
flush privileges;
|
/** Exercicio 3 **/
create database Empresa;
Use Empresa;
create table Departamento(
IdDepartamento int not null,
NomeDepartamento varchar(40),
constraint PK_IdDepartamento primary key (IdDepartament)
)
create table Cargo(
IdCargo int not null,
NomeCargo varchar(50),
SalarioBase float... |
<gh_stars>1-10
/*数据库1 demo1*/
CREATE TABLE `user_account` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户id',
`name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '姓名',
`age` int(4) DEFAULT NULL COMMENT '年龄',
`creator` bigint(20) DEFAULT NULL COMMENT '创建人',
`... |
<filename>Hello-World/hello_world_chandu6111.sql
'''
LANGUAGE: MySQL
AUTHOR: chandu6111
GITHUB: https://github.com/chandu6111
'''
mysql>select "Hello world" as message;
'''
Output:
+-------------+
| message |
+-------------+
| Hello world |
+-------------+
'''
|
INSERT INTO samply.configuration(name, setting, visible) values('EXPORT_TIMEOUT_IN_MINUTES', '360', false);
|
<filename>kata-files/lesson2/hsql/expected/MYLARGESCHEMA/sp/SP505.sql
CREATE PROCEDURE SP505(OUT MYCOUNT INTEGER) SPECIFIC SP505_46658 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE245;SELECT COUNT(*)INTO MYCOUNT FROM TABLE90;SELEC... |
CREATE TABLE test_broken (
id SMALLINT UNSIGNED NULL AUTO_INCREMENT,
value1 VARCHAR(45) NOT NULL,
value2 VARCHAR(45) NOT NULL,
val_enum enum('postgresql','rocks') null,
last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id),
KEY idx_actor_last_name (value2)... |
<filename>data/cityon.sql
/*
SQLyog Ultimate v10.42
MySQL - 5.5.38-0ubuntu0.12.04.1 : Database - cityon
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET ... |
SELECT
relname as "Table",
pg_size_pretty(pg_total_relation_size(relid)) As "Size",
pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size"
FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;
|
-- type mismatch between first select item in select lilst and the attribute component in vclass foo_u
autocommit off;
create class foo
(
component string,
quantity integer
);
create vclass foo_u
(
component string,
quantity integer
)
as select set (select component from foo), quantity from foo;
rollback work;... |
<filename>L2J_DataPack/sql/walker_routes.sql
DROP TABLE IF EXISTS `walker_routes`;
CREATE TABLE `walker_routes` (
`route_id` int(11) NOT NULL default '0',
`npc_id` int(11) NOT NULL default '0',
`move_point` int(9) NOT NULL,
`chatText` varchar(255) default NULL,
`move_x` int(9) NOT NULL default '0',
`move_y`... |
use emb2065;
drop table if exists smartSolutionsContact;
create table smartSolutionsContact(
messageID int NOT NULL AUTO_INCREMENT primary key,
firstName varchar(255) not null,
lastName varchar(255) not null,
email varchar(50) not null,
phone varchar(20) not null,
messageText varchar(255) not nul... |
insert into Customer values ('<NAME>', 24, '<EMAIL>'),
('<NAME>', 39, '<EMAIL>'), ('<NAME>', 42, '<EMAIL>'),
('<NAME>', 52, '<EMAIL>'),('<NAME>', 34, '<EMAIL>'),
('<NAME>',22,'<EMAIL>'),('<NAME>',28,'<EMAIL>'),
('<NAME>', 31, '<EMAIL>'),('<NAME>', 45, '<EMAIL>'),
('<NAME>', 27, '<EMAIL>'), ('<NAME>', 27, '<EM... |
CREATE TABLE [dbo].[Contact] (
[ContactID] INT IDENTITY (1, 1) NOT NULL,
[Name] VARCHAR (255) NOT NULL,
[EmailAddress] VARCHAR (255) NOT NULL,
[LastModified] DATE NOT NULL,
[LastModifiedBy] VARCHAR (255) NOT NULL,
[AccountID] INT NOT NULL,
... |
<reponame>mkingopng/Jamaica<filename>queries/unique_ccs.sql
SELECT DISTINCT GL52003 AS 'cc'
FROM GL520120; |
-- MySQL dump 10.13 Distrib 5.6.24, for osx10.10 (x86_64)
--
-- Host: localhost Database: policeshootings
-- ------------------------------------------------------
-- Server version 5.6.24
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESU... |
<reponame>sadatmalik/Fusion
-- 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVIS... |
# Old category ID: 5
# New post type: 'grant'
UPDATE wp_posts AS p
INNER JOIN wp_term_relationships AS tr ON p.ID = tr.object_id
INNER JOIN wp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
INNER JOIN wp_terms AS t ON t.term_id = tt.term_id
SET p.post_type = 'grant'
WHERE tt.taxonomy = 'category... |
<gh_stars>1-10
/*
use tempdb
go
--This VIEW should be created as soon as TEMPDB is flushed and created again after SQL restart
CREATE VIEW all_task_usage
AS
SELECT session_id,
SUM(internal_objects_alloc_page_count) AS task_internal_objects_alloc_page_count,
SUM(internal_objects_dealloc_page_count)... |
<reponame>GiveCampUK/GiveCRM<gh_stars>10-100
CREATE TABLE [dbo].[Donation]
(
ID int identity(1,1) NOT NULL,
MemberID int NOT NULL,
[Date] date NOT NULL,
Amount decimal(18,4) NOT NULL,
CampaignID int NULL
)
|
<gh_stars>1-10
-- DropIndex
DROP INDEX "Component_fileId_key";
|
-- file:create_index.sql ln:15 expect:true
CREATE INDEX onek_unique2 ON onek USING btree(unique2 int4_ops)
|
<reponame>Tovli/MadeiraToolbox
USE [DB_DBA]
GO
IF SCHEMA_ID('Perfmon') IS NULL
BEGIN
DECLARE @Command NVARCHAR(MAX) = N'CREATE SCHEMA [Report]';
EXEC (@Command);
END;
GO
-- =============================================
-- Author: <NAME>
-- Create date: 11-11-2014
-- Description: the procedure evaluates Dynam... |
CREATE PROCEDURE [dbo].[BugNet_Issue_UpdateLastUpdated]
@IssueId Int,
@LastUpdateUserName NVARCHAR(255)
AS
SET NOCOUNT ON
DECLARE @LastUpdateUserId UNIQUEIDENTIFIER
SELECT @LastUpdateUserId = UserId FROM Users WHERE UserName = @LastUpdateUserName
BEGIN TRAN
UPDATE BugNet_Issues SET
LastUpdateU... |
<gh_stars>0
CREATE VIEW [dbo].[vw_Kiroku_Log]
AS
SELECT
[dt_event] AS [Timestamp]
,a.[nvc_blockname] AS [Block]
,[nvc_logtype] AS [Log Type]
,[nvc_logdata] AS [Log Data]
,c.[ui_applicationid] AS [Application]
FROM [tbl_Kiroku_KLogs] a
LEFT OUTER JOIN [tbl_Kiroku_KBlocks] b
ON a.[ui_blockid] = b.[ui_blockid]
LEFT O... |
<reponame>vskurikhin/daybook
/*
* This file was last modified at 2020.07.09 14:59 by <NAME>.
* This is free and unencumbered software released into the public domain.
* For more information, please refer to <http://unlicense.org>
* changelogs-2020-04-15-db-999.db_record.postgresql.sql
* $Id$
*/
UPDATE db.db_reco... |
CREATE TABLE IF NOT EXISTS book
(
aggregate_id uuid PRIMARY KEY,
title text,
price text,
isbn text,
publisher text
);
|
<reponame>anubra266/codebase
--! Previous: sha1:76e4653c56f8f3df86637ca87a9eec157114b0d1
--! Hash: sha1:d77754facf8a367b9e34eb82b9f8644f609a12ed
-- Enter migration here
ALTER TABLE question ALTER COLUMN help_text TYPE json USING help_text::json;
ALTER TABLE matter_template DROP CONSTRAINT IF EXISTS matter_template_c... |
================================================================================
CREATE USER newuser if not exists WITH PASSWORD 'password';
================================================================================
CREATE USER newuser if not exists WITH PASSWORD 'password';
--------------------------------------... |
CREATE TABLE t1 (c1 integer primary key,
c2 integer not null,
c3 integer not null,
c4 integer not null,
c5 integer not null,
c6 integer not null,
unique (c2),
constraint key_c3 unique (c3),
foreign key (c4) references t3,
grouping foreign key (c2) references t2 (c1),
constraint fk_c5 foreign key (c5) references othe... |
<gh_stars>0
ALTER TABLE `yjshop`.`yj_comment`
CHANGE COLUMN `user_id` `member_id` int(11) NOT NULL DEFAULT 0,
CHANGE COLUMN `user_ip` `user_ip` varchar(20) COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户ip' AFTER `member_id`,
CHANGE COLUMN `entity` `entity` varchar(80) COLLATE utf8_general_ci NOT NULL,
CHAN... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.