sql stringlengths 6 1.05M |
|---|
<filename>Mod03-DatabaseTechnology/SQL/06-DeptSelect.sql<gh_stars>10-100
SELECT * FROM emp
WHERE deptno != 10;
|
<reponame>Santiago2611/Math-Match
USE math_match;
-- -----------------
-- stored procedures
-- -----------------
DELIMITER ##
/*guardar estudiante*/
CREATE PROCEDURE sp_guardar_estudiante(nombre varchar(30),
apellidos varchar(30),
fecha_nac date,
grado int,
email varchar(80),
clave varchar(35),
sexo varchar(15))
BEG... |
-- ALTER TABLE esr_Import DROP CONSTRAINT IF EXISTS adattachmententry_esrimport;
ALTER TABLE esr_import ADD CONSTRAINT adattachmententry_esrimport FOREIGN KEY (ad_attachmententry_ID)
REFERENCES ad_attachmententry
DEFERRABLE INITIALLY DEFERRED;
|
<filename>sql/il.sql
/*
Navicat MySQL Data Transfer
Source Server : gursoykoc.com
Source Server Version :
Source Host :
Source Database :
Target Server Type : MYSQL
Target Server Version : 50163
File Encoding : 65001
Date: 2012-06-06 10:34:39
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... |
use mysql;
grant all privileges on *.* to [your_mysql_name]@'%' identified by "your_mysql_pwd";
flush privileges;
-- MySQL Script generated by MySQL Workbench
-- 09/03/18 15:57:19
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @O... |
CREATE OR REPLACE PACKAGE pkg_product
AS
/**
* Backend for Editform and Gridfilter demos.
*
* Copyright (c) 2013 Tavendo GmbH. Licensed under the Apache 2.0 license.
*/
/**
* RPC/Event URI prefix
*/
BASEURI CONSTANT VARCHAR2(200) := 'http://tavendo.de/webmq/demo/product#';
/**
... |
<reponame>FuriousLlama/PSP<filename>database/mssql/scripts/dbscripts/PSP_PIMS_S29_00/Build/82_DML_PIMS_VOLUME_UNIT_TYPE.sql
/* -----------------------------------------------------------------------------
Delete all data from the PIMS_VOLUME_UNIT_TYPE table and repopulate.
. . . . . . . . . . . . . . . . . . . . . . . ... |
<reponame>gminteer/hr-buddy
USE hr_buddy;
DROP TABLE IF EXISTS employee;
DROP TABLE IF EXISTS role;
DROP TABLE IF EXISTS department;
CREATE TABLE department(
id INTEGER UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30) NOT NULL
);
CREATE TABLE role(
id INTEGER UNSIGNED AUTO_INCREMENT PRIMARY KEY,
title VARC... |
<gh_stars>0
DROP TABLE IF EXISTS `shuyang_book`;
CREATE TABLE IF NOT EXISTS `shuyang_book` (
`id` mediumint(6) unsigned NOT NULL AUTO_INCREMENT,
`realname` varchar(20) DEFAULT NULL,
`userid` mediumint(6) NOT NULL,
`username` varchar(20) DEFAULT NULL,
`email` varchar(40) DEFAULT NULL,
`mobile` varchar(11) DE... |
<gh_stars>0
--Post-Deployment Script Template
----------------------------------------------------------------------------------------
-- This file contains SQL statements that will be appended to the build script.
-- Use SQLCMD syntax to include a file in the post-deployment script.
-- Example: :r .... |
<gh_stars>0
create table app_scan_laps
(
id int auto_increment
primary key,
car varchar(1000) null,
lap_time int null,
location varchar(1000) null,
user varchar(1000) null,
create_time timestamp null
);
create table app_scan_points
(
id ... |
DROP DATABASE IF EXISTS test_01516;
CREATE DATABASE test_01516 ENGINE=Ordinary; -- Full ATTACH requires UUID with Atomic
USE test_01516;
DROP TABLE IF EXISTS primary_key_test;
CREATE TABLE primary_key_test(v Int32, PRIMARY KEY(v)) ENGINE=ReplacingMergeTree ORDER BY v;
INSERT INTO primary_key_test VALUES (1), (1),... |
CREATE OR REPLACE
ALGORITHM = UNDEFINED VIEW `db_9aa830_learnev`.`studentengagementreport_todaysengagementbyurl` AS
SELECT
`db_9aa830_learnev`.`studentlearningeventlog`.`StudentElectronicMailAddress` AS `StudentElectronicMailAddress`
, `db_9aa830_learnev`.`studentlearningeventlog`.`LeaningAppUrl` AS `LeaningAp... |
START TRANSACTION;
-- update the version
UPDATE sec_schema_version SET version_value='52' WHERE version_key='schema_patch';
ALTER TABLE sec_bond ALTER COLUMN interestaccrual_date DROP NOT NULL;
ALTER TABLE sec_bond ALTER COLUMN interestaccrual_zone DROP NOT NULL;
ALTER TABLE sec_bond ALTER COLUMN firstcou... |
#standardSQL
# 08_39b: SRI header
CREATE TEMPORARY FUNCTION extractHeader(payload STRING, name STRING)
RETURNS STRING LANGUAGE js AS '''
try {
var $ = JSON.parse(payload);
var header = $._headers.response.find(h => h.toLowerCase().startsWith(name.toLowerCase()));
if (!header) {
return null;
}
return heade... |
-- Revert upsert_project_github_metadata
BEGIN;
DROP FUNCTION IF EXISTS upsert_project_github_metadata(
p_project_id project_github_metadata.project_id%TYPE,
p_repo_name project_github_metadata.repo_name%TYPE,
p_repo_owner project_github_metadata.repo_owner%TYPE,
p_token project_github_metadata.token%TYPE
);
... |
<reponame>asesidaa/gc-local-server<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- 主机: 127.0.0.1
-- 生成日期: 2022-03-27 10:24:19
-- 服务器版本: 10.4.22-MariaDB
-- PHP 版本: 8.1.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
ALTER TABLE `ta_switch_view_user`
ADD COLUMN `buc_id` varchar(32) NULL COMMENT 'BUCID' |
--
-- The contents of this file are subject to the license and copyright
-- detailed in the LICENSE and NOTICE files at the root of the source
-- tree and available online at
--
-- http://www.dspace.org/license/
--
----------------------------------------------------
-- Data Migration for XML/Configurable Workflow
--
... |
ALTER TABLE RPTBANCO
ADD CONSTRAINT FK_RPTBANCO_PLANILLA
FOREIGN KEY(CODPLANILLA)
REFERENCES PLANILLA(CODPLANILLA);
ALTER TABLE PLANILLA
ADD CONSTRAINT FK_PLANILLA_TRABAJADOR
FOREIGN KEY(CODTRABAJADOR)
REFERENCES TRABAJADORES(CODTRABAJADOR);
ALTER TABLE REG_HRS_LABORADAS
ADD CONSTRAINT FK_HORAS_LAB_TRABAJA... |
DROP TABLE PM25_24g_cons;
CREATE TABLE PM25_24g_cons
SELECT `Kod stacji` AS Measure_Date, 'MpKrakowWIOSBulw6118' AS Station_Code, `MpKrakowWIOSBulw6118` AS Pollution_Level FROM `2002_pm2.5_24g`
UNION ALL SELECT `Kod stacji` AS Measure_Date, 'MpKrakowWIOSPrad6115' AS Station_Code, `MpKrakowWIOSPrad6115` AS Pollution_Le... |
drop table managers;
drop table cart;
drop table orderTable;
drop table customers;
drop table locationTable;
drop table product;
drop table item;
create table managers(
id int identity primary key,
firstName nvarchar(100) not null,
lastName nvarchar(100) not null,
emailAddress nvarchar(100) not null
);
create tab... |
select name,description from Events where Events.venueId = 0;
select firstname,lastname from Artist outer join ArtistToEvent on Artist.id = ArtistToEvent.artistId
and ArtistToEvent.eventId = 0; |
<gh_stars>0
drop table assignments cascade;
drop table keyword_exercise_groups cascade;
drop table keywords;
drop table exercise_groups cascade;
drop table exercise_groups_keywords cascade;
drop table assignment_status cascade;
drop table exercises cascade;
drop table levels cascade;
drop table user_stats cas... |
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 18, 2019 at 06:10 AM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
-- http://www.sqlserver-dba.com/2011/09/this-is-a-followup-on-my-earlier-post-of-sql-server-test-data-generation-testing-tools-i-had-some-requests-for-my-set-up-pr.html
SELECT TOP 20 C_CUSTKEY, C_NAME, SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)) AS REVENUE, C_ACCTBAL,
N_NAME, C_ADDRESS, C_PHONE, C_COMMENT
FROM CUSTOMER, ORD... |
CREATE TABLE `ORDER` (
`id_Order` INT NOT NULL AUTO_INCREMENT,
`order` VARCHAR(50) COLLATE utf8_unicode_ci default NULL,
`isServed` BOOLEAN default NULL,
`isPaid` BOOLEAN default NULL,
PRIMARY KEY (`id_Order`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `INGREDIENT` (... |
START TRANSACTION;
ALTER TABLE "FinisherItems" ALTER COLUMN "StartDate" TYPE timestamptz;
ALTER TABLE "FinisherItems" ALTER COLUMN "FinishDate" TYPE timestamptz;
ALTER TABLE "Events" ALTER COLUMN "EventDate" TYPE timestamptz;
COMMIT;
|
create database ask2;
use ask2;
show tables;
create table business(
bid int,
name varchar(30) not null,
category varchar(20) not null,
city varchar(15) not null,
country varchar(17) not null,
primary key (bid),
check (bid>0)
)engine=innodb;
create table user(
uid int,
name varchar(20) not nul... |
<reponame>danieldiamond/gitlab-analytics
with base as (
SELECT *
FROM {{ source('salesforce', 'user_role') }}
)
SELECT *
FROM base |
-- file:insert_conflict.sql ln:135 expect:true
insert into insertconflicttest values (11, 'Cherry') on conflict (key, lower(fruit)) do update set fruit = excluded.fruit
|
CREATE TABLE foo (bar text);
ALTER TABLE foo RENAME bar TO baz; |
/*
Navicat MySQL Data Transfer
Source Server : 悉尼服务器
Source Server Type : MySQL
Source Server Version : 50736
Source Host : 172.16.58.3:3306
Source Schema : ette
Target Server Type : MySQL
Target Server Version : 50736
File Encoding : 65001
Date: 16/01/2022 16:48:52
... |
-- Sku'Bu -41655
DELETE FROM `creature_loot_template` WHERE (`entry`=41655);
INSERT INTO `creature_loot_template` VALUES
(41655, 53010, 38, 1, 1, 1, 1),
(41655, 68198, 10, 1, 5, 1, 1),
(41655, 58268, 5, 1, 4, 1, 1),
(41655, 58256, 0.33, 1, 7, 1, 1),
(41655, 68197, 0.30, 1, 3, 1, 1),
(41655, 62087, 0.28, 1, 5, 1, 1),
(4... |
/*
* File: 19_site_table.sql
* File Created: Wednesday, 6th May 2020 1:52:38 pm
* Author: <NAME>
* Last Modified: Wednesday, 6th May 2020 1:53:15 pm
* Modified By: <NAME>
* -----
* (c) 2020, WHO/AFRO/UCN/ESPEN
*/
/*
* Variable to rename <%v_ab_cde_fgh_1_site%>
*/
select * from <%v_ab_cde_fgh_1_site%>
|
<filename>src/sql/table_company.sql
-- public.company definition
-- Drop table
-- DROP TABLE public.company;
CREATE TABLE public.company (
name text NOT NULL,
description text NULL,
street_name text NULL,
house_number text NULL,
postal_code text NULL,
locality text NULL,
country text NULL,
email text NULL,
... |
drop table if exists estado;
drop table if exists cidade;
create table estado(ibge int, nome varchar(100), sigla varchar(2), regiao varchar(80), municipios int);
insert into estado(ibge, nome, sigla, regiao, municipios) values(11, 'Rondônia', 'RO', 'Região Norte', 52);
insert into estado(ibge, nome, sigla, regiao, muni... |
<filename>superfly-sql/mi/R1.0.0/R1.0.0_SSO_ROOT.sql
drop database if exists sso;
create database sso default character set utf8 collate utf8_general_ci;
grant all privileges on sso.* to 'sso'@'localhost' identified by '123sso123' with grant option;
|
-- ----------------------------
-- Table structure for sms_flash_promotion_session
-- ----------------------------
DROP TABLE IF EXISTS `sms_flash_promotion_session`; |
-- 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 may... |
CREATE VIEW VIEW85 (C1) AS SELECT 1 FROM TABLE274 UNION SELECT 1 FROM TABLE164 UNION SELECT 1 FROM TABLE155
GO |
declare
v_count NUMBER;
v_stat VARCHAR2(32767);
begin
SELECT COUNT(*) INTO v_count
FROM USER_TABLES WHERE TABLE_NAME = 'CHANGE_LOG_TABLES';
if v_count = 0 then
v_stat := q'[
CREATE TABLE CHANGE_LOG_TABLES
(
ID NUMBER(11,0) NOT NULL,
TABLE_NAME VARCHAR2(32) NOT NULL,
VIEW_NA... |
-- @testpoint: pg_stat_get_numscans(oid)函数的异常校验,合理报错
-- -- testpoint:空值、多参、少参、oid错误、超范围、表不存在
select pg_stat_get_numscans('') from PG_CLASS a where a.relname = 'sales';
select pg_stat_get_numscans(a.oid,a.oid,a.oid) from PG_CLASS a where a.relname = 'sales';
select pg_stat_get_numscans() from PG_CLASS a where a.relname ... |
-- @testpoint:opengauss关键字leading(保留),作为函数名
--关键字不带引号-合理报错
create function leading(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
--关键字带双引号-成功
create function "leading"(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
--清理环境
drop function "leadin... |
<gh_stars>100-1000
select count(*) from altable;
|
/*
DESCRIBE `wiki`;
+------------+--------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------------------+----------------+
| id | int(11) | NO | PRI | NULL ... |
<reponame>christophanneser/Bao-for-Presto<gh_stars>0
SELECT acc.location, count(*)
FROM
site as s,
so_user as u1,
question as q1,
answer as a1,
tag as t1,
tag_question as tq1,
badge as b,
account as acc
WHERE
s.site_id = q1.site_id
AND s.site_id = u1.site_id
AND s.site_id = a1.site_id
AND s.site_id = t1.site_id
AND s.s... |
-- This table is created temporarily inside MySQL, but this data will eventally be
-- stored in a "big data" database table.
-- The data is extracted by dophot, NOT tphot. We could also do with the FITS header
-- from the files, or just use the .obs files. Do we ultimately want to store the data
-- in a FLAT table s... |
create table Category
(
id int auto_increment
primary key,
name varchar(191) not null,
constraint `Category.name_unique`
unique (name)
)
collate = utf8mb4_unicode_ci;
create table Event
(
id int auto_increment
primary key,
name varchar(191) not null,
lo... |
<filename>ScriptsSQL/1.dbuser_creacion .sql
CREATE USER 'usuario'@'localhost' IDENTIFIED BY 'usuario';
GRANT ALL PRIVILEGES ON * . * TO 'usuario'@'localhost';
GRANT ALL PRIVILEGES ON `BDUsuarios` . * TO 'usuario'@'localhost';
FLUSH PRIVILEGES;
|
<reponame>Jasata/utu-schooner<gh_stars>0
--
-- Course data for DTE20068-3002 (2021)
--
PRAGMA foreign_keys=1;
INSERT INTO course
VALUES
(
'DTE20068-3002',
'DTE20068',
'Embedded Microprocessor Systems',
'2021-10-25',
'2021-12-20',
'0-5/60',
'Exercise privilege is automatically earned once total of 355 points has been... |
SELECT s.FirstName,
s.LastName,
COUNT(TeacherId) AS TeachersCount
FROM STUDENTS AS s
INNER JOIN StudentsTeachers AS st
ON st.StudentId = s.Id
GROUP BY FirstName, LastName
ORDER BY LastName |
<gh_stars>0
create table frac_schedule
(
id int identity,
api14 varchar(14) not null,
api10 varchar(10),
operator varchar(100),
operator_alias varchar(50),
wellname varchar(100),
fracstartdate date,
fracenddate date,
tvd int,
shllat float,
shllon float,
bhllat float,
bhllon float,
days_to_fracstartdate as... |
CREATE PROCEDURE tSQLt.Fail
@Message0 NVARCHAR(MAX) = '',
@Message1 NVARCHAR(MAX) = '',
@Message2 NVARCHAR(MAX) = '',
@Message3 NVARCHAR(MAX) = '',
@Message4 NVARCHAR(MAX) = '',
@Message5 NVARCHAR(MAX) = '',
@Message6 NVARCHAR(MAX) = '',
@Message7 NVARCHAR(MAX) = '',
@Message8 NVARCH... |
drop table if exists TB_ATTR_INFO;
/*==============================================================*/
/* Table: TB_ATTR_INFO */
/*==============================================================*/
create table TB_ATTR_INFO
(
ATTR_ID varchar(30) not null comment '附属物品编号',
... |
CREATE PROCEDURE [dbo].[uspDeleteTestConnection]
-- Add the parameters for the stored procedure here
@TestName nvarchar(10)
AS
BEGIN
SET NOCOUNT ON;
-- Insert statements for procedure here
delete from TestConnection
where testname = @TestName
END |
<reponame>mare-on/chat-bot
--
-- <NAME>
--
DELIMITER ;;
DROP FUNCTION IF EXISTS LEVENSHTEIN;;
CREATE FUNCTION LEVENSHTEIN(s1 VARCHAR(255) CHARACTER SET utf8, s2 VARCHAR(255) CHARACTER SET utf8)
RETURNS INT
BEGIN
DECLARE cv0, cv1 VARBINARY(256) DEFAULT 0x00;
DECLARE s1_char CHAR CHARACTER SET utf8;
DECLARE s... |
<reponame>jorgemhtdev/rogerthat-ios-client<filename>MCResources/Assets/db/update_51_to_52.sql
ALTER TABLE friend ADD COLUMN organization_type INTEGER DEFAULT 0; |
<filename>data/cql_scripts/create-timeseries.cql
/*
Schema for storing raw ISD-lite hourly weather data.
More can be read about these weather sets here: http://www.ncdc.noaa.gov/oa/climate/isd/
*/
DROP KEYSPACE IF EXISTS isd_weather_data;
CREATE KEYSPACE isd_weather_data WITH REPLICATION = { 'class' : 'SimpleStrategy'... |
<reponame>egarzaswat/imcoolwithit.com
CREATE TABLE IF NOT EXISTS `#__jshopping_categories` (
`category_id` int(11) NOT NULL auto_increment,
`category_image` varchar(255),
`category_parent_id` int(11) NOT NULL,
`category_publish` tinyint(1) unsigned NOT NULL default '1',
`category_ordertype` tinyint(1) unsigned NOT NULL... |
<filename>html/mediawiki/maintenance/archives/patch-ipb_by_text.sql
-- Adding colomn with username of blocker and sets it.
-- Required for crosswiki blocks.
ALTER TABLE /*$wgDBprefix*/ipblocks
ADD ipb_by_text varchar(255) binary NOT NULL default '';
UPDATE /*$wgDBprefix*/ipblocks
JOIN /*$wgDBprefix*/user ON... |
<reponame>mmcloughlin/goperf<filename>app/db/query/packages.sql
-- name: Pkg :one
SELECT * FROM packages
WHERE uuid = $1 LIMIT 1;
-- name: ModulePkgs :many
SELECT * FROM packages
WHERE module_uuid = $1
ORDER BY relative_path;
-- name: InsertPkg :exec
INSERT INTO packages (
uuid,
module_uuid,
relative_path... |
<gh_stars>10-100
/*
* A didactical implementation of operator classes to add meaning to field
* and be able to index them in a specific way.
* Once the operator class is in place, it is possible to execute queries
* to see different output.
* The index can be created with something like
CREATE INDEX idx_cf... |
<reponame>Dimiorz/A.F.I.M
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 14-10-2020 a las 21:41:13
-- Versión del servidor: 10.4.10-MariaDB
-- Versión de PHP: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSAC... |
<gh_stars>0
/****** Object: StoredProcedure [dbo].[app_PatronReadingLog_Insert] Script Date: 01/05/2015 14:43:24 ******/
--Create the Insert Proc
CREATE PROCEDURE [dbo].[app_PatronReadingLog_Insert] (
@PID INT,
@ReadingType INT,
@ReadingTypeLabel VARCHAR(50),
@ReadingAmount INT,
@ReadingPoints INT,
@Logging... |
/*
insert into flytjandi (ID, nafn, faeddur, daudur, lysing, aldur)
VALUES
('1', '<NAME>', '1994', '2018','<NAME> (/ˈbiːbər/; born March 1, 1994)[2][3] is a Canadian singer and songwriter. After a talent manager discovered him through his YouTube videos covering songs in 2008 and he signed to RBMG, Bieber released his ... |
<filename>database-schema/scripts/20180716153000_create_application.sql
CREATE TABLE applicationmanagement.application (
-- Application fields
id UUID NOT NULL
,local_authority_code VARCHAR(10) NOT NULL
,app_type_code VARCHAR(10) NOT NULL
,is_payment_taken BOOLE... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 11, 2020 at 03:45 AM
-- Server version: 10.3.15-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... |
<reponame>LibrariesWest/reporting-solution<filename>db_scripts/tables/tbl_orderline.sql<gh_stars>0
---------------------------------------------------------------
-- table: orderline
---------------------------------------------------------------
-- drop table orderline;
create table orderline
(
key integer not null... |
INSERT INTO `locations` (`id`, `country_id`, `name`, `created_at`, `updated_at`) VALUES
(1, 56, 'Korcula', '2021-11-29 19:00:00', '2021-11-29 19:00:00'),
(2, 56, 'Split', '2021-11-29 19:00:00', '2021-11-29 19:00:00'),
(3, 56, 'Dubrovnik', '2021-11-29 19:00:00', '2021-11-29 19:00:00'),
(4, 56, 'Hvar', '2021-11-29 19:00... |
CREATE TABLE IF NOT EXISTS `migrations` (
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 29, 2022 at 02:23 PM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 8.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>priv/repo/structure.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.2
-- Dumped by pg_dump version 10.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_functio... |
<reponame>nerocui/youchatt2.0
DELETE FROM moments
WHERE id=$1
|
<gh_stars>0
DROP TABLE improvement IF EXISTS;
CREATE TABLE improvement (
id INT AUTO_INCREMENT PRIMARY KEY,
content VARCHAR(200) NOT NULL,
created_at DATE
) ENGINE = INNODB; |
<gh_stars>0
-- Write insert queries to populate Libraries
INSERT INTO Libraries (title, url, field_trip, createdAt, updatedAt) VALUES ('Sky Zone Fort Lauderdale', 'https://www.skyzone.com/', true, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO Libraries (title, url, field_trip, createdAt, updatedAt) VALUES ('Rapids... |
-- Create databases which are not automatically created out of the code
CREATE DATABASE ippr;
CREATE DATABASE ippr_security;
CREATE DATABASE ippr_store;
-- Create User for the services to access the DB
CREATE USER 'ippr'@'localhost' IDENTIFIED WITH mysql_native_password BY '<PASSWORD>';
GRANT ALL PRIVILEGES ON * . * T... |
;with
valTbl as
(
select *
from
( values
(0, 'NoChartGeneration')
, (1, 'RegularChartGeneration')
, (2, 'ForceChartGeneration')
) as a (notificationTypeId, notificationTypeName)
)
insert into NotificationType
select valTbl.*
from valTbl
left outer join NotificationType on valTbl.notificationTyp... |
<filename>brief04/database/structure.sql
drop
database if exists brief4db;
create
database brief4db DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
use
brief4db;
drop table if exists users;
create table users
(
usersId int(16) primary key auto_increment not null,
usersLevel int(1) not null,
user... |
CREATE TABLE [AppPlot] (
[PlotNum] DOUBLE CONSTRAINT [PrimaryKey] PRIMARY KEY UNIQUE NOT NULL
)
|
<reponame>Shuttl-Tech/antlr_psql<gh_stars>10-100
-- file:rangetypes.sql ln:485 expect:true
create function inoutparam_succeed(out i anyelement, inout r anyrange)
as $$ select upper($1), $1 $$ language sql
|
--
-- Copyright © 2020 <NAME>
--
-- 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... |
drop table if exists computer;
drop table if exists company;
create table company
(
id bigint not null auto_increment,
name varchar(255),
constraint pk_company primary key (id)
)
;
create table computer
(
id bigint not null auto_increment,
name varchar(255),
introduced timestamp N... |
create table ACT_RU_JOBDEF (
ID_ varchar(64) NOT NULL,
REV_ integer,
PROC_DEF_ID_ varchar(64) NOT NULL,
PROC_DEF_KEY_ varchar(255) NOT NULL,
ACT_ID_ varchar(255) NOT NULL,
JOB_TYPE_ varchar(255) NOT NULL,
JOB_CONFIGURATION_ varchar(255),
SUSPENSION_STATE_ integer,
primary key (ID_)
)... |
<reponame>yymmiinngg/wikift<filename>wikift-server/src/main/resources/wikift-update.sql
# wikift 1.0.0 update schema
USE wikift;
SET FOREIGN_KEY_CHECKS = 0;
ALTER TABLE users ADD u_email VARCHAR(50);
ALTER TABLE users ADD u_active BOOLEAN DEFAULT TRUE COMMENT '该账号是否激活';
ALTER TABLE users ADD u_lock BOOLEAN DEFAULT FA... |
CREATE DATABASE IF NOT EXISTS ${DB};
USE ${DB};
DROP TABLE IF EXISTS AIRLINE_PERF_EXT;
-- NOTE: This version of the create seems to cause issue when submitted through JDBC with
-- applications like DBVis or Squirrel. Beeline works fine. A trimmed (commentless) version
-- is available through create_alt.sql
C... |
create table tab_a
(
tab_a_id number(9) not null,
tab_a_a_id number(8),
constraint pk_tab_a primary key (tab_a_id),
constraint fk_recursive foreign key (tab_a_a_id) references tab_a (tab_a_id)
);
|
ALTER TABLE `m_savings_product`
CHANGE COLUMN `allow_overdraft_min_balance` `enforce_min_required_balance` TINYINT(1) NOT NULL DEFAULT '0' AFTER `min_required_balance`;
ALTER TABLE `m_savings_account`
CHANGE COLUMN `allow_overdraft_min_balance` `enforce_min_required_balance` TINYINT(1) NOT NULL DEFAULT '0' AFTER `mi... |
<filename>src/test/isolation2/sql/gdd/dml_locks_only_targeted_table_in_query.sql
DROP TABLE IF EXISTS part_tbl_upd_del;
-- check gdd is on
show gp_enable_global_deadlock_detector;
CREATE TABLE part_tbl_upd_del (a int, b int, c int) PARTITION BY RANGE(b) (START(1) END(2) EVERY(1));
INSERT INTO part_tbl_upd_del SELECT ... |
-- @testpoint: next_day函数参数week为英文
select next_day('2019-08-08','Sunday'),next_day('2019-08-08','Monday'),next_day('2019-08-08','Tuesday'),next_day('2019-08-08','Wednesday'),next_day('2019-08-08','Thursday'),next_day('2019-08-08','Friday'),next_day('2019-08-08','Saturday')
from sys_dummy; |
CREATE TABLE alter_table (
id INT,
name VARCHAR(50),
fKey INT
);
CREATE TABLE table_fk (
id INT
); |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 14, 2017 at 02:27 PM
-- 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... |
<gh_stars>0
EXEC [EST].[Proc_yjbb_Ins] @Code = N'603533',@CutoffDate = N'2017-09-30',@EPS = N'0.27',@EPSDeduct = N'0',@Revenue = N'12.30亿',@RevenueYoy = N'48.45',@RevenueQoq = N'5.43',@Profit = N'9740.10万',@ProfitYoy = N'104.46',@ProfiltQoq = N'-9.16',@NAVPerUnit = N'2.3973',@ROE = N'12.50',@CashPerUnit = N'0.4750',@Gr... |
<reponame>narbit/Dapper.GraphQL<gh_stars>0
INSERT INTO Person (Id, MergedToPersonId, FirstName, LastName, SupervisorId, CareerCounselorId, CreateDate) VALUES (1, 1, 'Hyrum', 'Clyde', NULL, NULL, '2019-01-01');
INSERT INTO Person (Id, MergedToPersonId, FirstName, LastName, SupervisorId, CareerCounselorId, CreateDate) V... |
<filename>src/main/resources/SkillBankDB.sql
.open SKILLBANK.db
CREATE TABLE USER (
user_id INT,
username VARCHAR(30),
PRIMARY KEY (user_id)
);
CREATE TABLE SKILL (
user_id INT,
skill_id INT,
skill_name VARCHAR(30),
hours DOUBLE CHECK (hours >= 0),
UNIQUE (skill_name),
PRIMARY KE... |
<filename>prisma/migrations/20220527001031_one_to_many_verification/migration.sql
/*
Warnings:
- You are about to drop the column `verification_request_id` on the `BookPublication` table. All the data in the column will be lost.
- You are about to drop the column `verification_request_id` on the `ExternalResearc... |
<filename>perdiksi_jumlah_karyawan.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Waktu pembuatan: 26 Nov 2021 pada 14.41
-- Versi server: 8.0.27-0ubuntu0.20.04.1
-- Versi PHP: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
STA... |
DROP TABLE `poll`;
|
UPDATE `sys_cron_jobs` SET `time` = '1 */12 * * *' WHERE `name` = 'bx_spy' AND `time` = '0 0 * * *';
UPDATE `sys_options` SET `VALUE` = '10000' WHERE `Name` = 'bx_spy_update_time' AND `VALUE` = '5000';
UPDATE `sys_options` SET `VALUE` = '' WHERE `Name` = 'bx_spy_guest_allow' AND `VALUE` = 'on';
UPDATE `sys_p... |
-- MySQL dump 10.14 Distrib 5.5.41-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: master
-- ------------------------------------------------------
-- Server version 5.5.41-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.