sql stringlengths 6 1.05M |
|---|
--liquibase formatted sql
--changeset platform:p_revoke_analytics_user splitStatements:false stripComments:false runOnChange:true
CREATE OR REPLACE PROCEDURE p_revoke_analytics_user(p_user_name text,p_table_name text default null)
LANGUAGE plpgsql
AS $procedure$
DECLARE
c_obj_pattern TEXT := 'report%v';
r RECORD;
... |
<reponame>jorgemhtdev/rogerthat-ios-client
-- Create table message
CREATE TABLE message (
"key" TEXT PRIMARY KEY,
parent_key TEXT,
sender TEXT,
message TEXT,
timeout INTEGER,
"timestamp" INTEGER,
flags INTEGER,
needs_my_answer INTEGER,
branding TEXT,
sortid INTEGER,
FOREIGN KEY (parent_key) REFERENCES messag... |
DELETE FROM t_user;
INSERT INTO t_user (name, age, email) VALUES
('张三', 18, '<EMAIL>'),
('李四', 20, '<EMAIL>'),
('Tom', 28, '<EMAIL>'),
('Sandy', 21, '<EMAIL>'),
('Bob', 24, '<EMAIL>');
DELETE FROM t_exam_item;
INSERT INTO t_exam_item (name, content, price, create_time, update_time) VALUES
('腹部彩色多普勒','肝、胆、脾、胰,双肾,输尿管,膀胱... |
<reponame>ashton1cav/esx_wanted
ALTER TABLE `users`
ADD COLUMN `wanted` INT(11) NOT NULL DEFAULT '0'; |
<gh_stars>100-1000
ALTER TABLE foo.foo ADD COLUMN baz BIGINT NOT NULL DEFAULT 0;
INSERT INTO ops (op) VALUES ('migration V0002__Add_baz_column_to_foo.sql');
|
drop function if exists f_load_exe();
drop table if exists src_table_exe;
drop table if exists main_table_exe;
drop table if exists map_table_exe;
create table src_table_exe ( id_natural integer, value varchar, id_file int);
create table main_table_exe (id_auto integer, id_natural integer, value varchar, record_type v... |
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.6.35, for osx10.9 (x86_64)
--
-- Host: localhost Database: laraclassified
-- ------------------------------------------------------
-- Server version 5.6.35
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE... |
<filename>tools/Jurisdictions_DB/Scripts/Tables/tbl_standard_sets.sql
--
-- Table [dbo].[tbl_standard_sets]
--
CREATE TABLE [dbo].[tbl_standard_sets]
(
[standard_sets_key] UNIQUEIDENTIFIER NOT NULL ROWGUIDCOL CONSTRAINT [df_tbl_standard_sets_standard_sets_key] DEFAULT(NEWSEQUENTIALID()),
[jurisdictions_key]... |
<filename>glavkniga/gklients/modules/core/db/update/postgres/17/170707-2-updateGkNews01.sql
alter table GKLIENTS_GK_NEWS add column DELETE_TS timestamp ;
alter table GKLIENTS_GK_NEWS add column DELETED_BY varchar(50) ;
|
<reponame>Fandia9050/OSI<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 24, 2021 at 04:43 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/... |
<filename>prisma/migrations/20220105133203_create_courses_modules/migration.sql
-- CreateTable
CREATE TABLE "courses_modules" (
"id" TEXT NOT NULL,
"course_id" TEXT NOT NULL,
"module_id" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "courses_modules_pkey" P... |
create table users (email varchar(50) primary key, name varchar(20), password varchar(20));
create table jobs (html int, pdf int, startdate date, enddate date, pii int, '508' int, govdelivery int, bulletin int, authorit int, email varchar(50), foreign key(email) references users(email));
|
use questionnaire;
create table if not exists users (
id varchar(255) not null,
student_num bigint,
password varchar(255),
graduate bool,
entered bool,
PRIMARY KEY (id)
);
create table if not exists professors (
id varchar(255) not null ,
lab_name varchar(255),
prof_name varchar(2... |
<gh_stars>1-10
-- https://sqlzoo.net/wiki/SELECT_names
-- Q7: Find the countries that have three or more a in the name.
select name from world where name like '%a%a%a%';
-- Q8: Find the countries that have "t" as the second character.
select name from world where name like '_t%';
-- Q10: Find the countries that have... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 24, 2019 at 11:47 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... |
<gh_stars>1-10
CREATE TABLE IF NOT EXISTS user ( id INTEGER PRIMARY KEY, name VARCHAR NOT NULL )
CREATE TABLE IF NOT EXISTS entry ( id INTEGER PRIMARY KEY, entry_key TEXT, feed_id INTEGER, FOREIGN KEY(feed_id) REFERENCES entry(id) )
CREATE TABLE IF NOT EXISTS points ( id INTEGER PRIMARY KEY, person TEXT, points INTEGER... |
<reponame>ruhulamin01749/Inventory-Management-System<filename>inventory.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 26, 2018 at 05:35 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUT... |
<reponame>KrylixZA/FinancialPeace-Database<filename>src/Freedom/Stored_Procedures/pr_UpdateDebtAccountTargetPayoffDateForUser.sql
DELIMITER //
CREATE OR REPLACE PROCEDURE pr_UpdateDebtAccountTargetPayoffDateForUser(IN $debtAccountId VARCHAR(36),
I... |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 08, 2020 at 08:56 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<filename>assets/sql/create_hashing_database/routines/SP_RemoveNode.sql
create
definer = root@localhost procedure SP_RemoveNode(IN _ID tinyint)
BEGIN
delete
from `mysql-dynamic-cluster`.node
where node_id = _ID;
end;
|
<gh_stars>1-10
DROP TABLE IF EXISTS user;
DROP TABLE IF EXISTS post;
DROP TABLE IF EXISTS comment;
DROP TABLE IF EXISTS like;
DROP TABLE IF EXISTS tag;
DROP TABLE IF EXISTS post_tag;
DROP TABLE IF EXISTS post_image;
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
password TE... |
<gh_stars>10-100
-- file:create_table.sql ln:442 expect:false
CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES IN (int '1')
|
CREATE TABLE ACS_WS.DEMAND_RESPONSE (
"index" NUMBER(19),
DATA_YEAR DATE,
UTILITY_NUMBER NUMBER,
CUSTOMERS NUMBER,
SAVINGS_MWH FLOAT(126),
POTPEAKDS_MW FLOAT(126),
ACTUALPEAKDS_MW FLOAT(126),
INCENTIVES FLOAT(126),
COSTS FLOAT(126)
);
CREATE TABLE ACS_WS.OPERATIONS_DATA (
"index" NUMBER(19),
DATA_YEAR DATE,... |
CREATE TABLE "FLAT"
( "COLLECTION_OBJECT_ID" NUMBER,
"CAT_NUM" VARCHAR2(40 CHAR),
"ACCN_ID" NUMBER NOT NULL ENABLE,
"COLLECTION_ID" NUMBER NOT NULL ENABLE,
"INSTITUTION_ACRONYM" VARCHAR2(20 CHAR),
"COLLECTION_CDE" VARCHAR2(10),
"COLLECTION" VARCHAR2(30 CHAR),
"COLLECTING_EVENT_ID" NUMBER,
"DATE_B... |
<filename>dbmate/db/migrations/20201204200302_friends_procedures.sql
-- migrate:up
CREATE PROCEDURE add_friend(usernameA VARCHAR(255), usernameB VARCHAR(255))
LANGUAGE SQL
AS $$
INSERT INTO users_followers(username, username_follower, access_type, is_emergency_contact)
VALUES (usernameA, usernameB, 'Permanent', tr... |
--CREATE PROCEDURE dbo.[ps_SelectAccount]
--@Account_ID [int]
--AS
--select
-- Account_ID as Id,
-- Account_FirstName as FirstName,
-- Account_LastName as LastName,
-- Account_Email as EmailAddress
--from Accounts
--where Account_ID = @Account_ID |
<gh_stars>1-10
/* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... |
<reponame>UltimateSoftware/DOI
GO
CREATE TABLE [DOI].[SysPartitions]
(
[database_id] [int] NOT NULL,
[partition_id] [bigint] NOT NULL,
[object_id] [int] NOT NULL,
[index_id] [int] NOT NULL,
[partition_number] [int] NOT NULL,
[hobt_id] [bigint] NOT NULL,
[rows] [bigint] NULL,
[filestream_filegroup_id] [smallint] NOT N... |
CREATE TABLE task (
id BIGSERIAL PRIMARY KEY,
name TEXT NOT NULL,
start_time TIMESTAMP WITH TIME ZONE NOT NULL,
end_time TIMESTAMP WITH TIME ZONE
);
|
DROP VIEW IF EXISTS view_persediaan_barang4_awayan;
CREATE VIEW view_persediaan_barang4_awayan AS
SELECT
*,
saldo * harga AS jumlah_harga
FROM
view_persediaan_barang3_awayan
WHERE
1 = 1 AND
saldo > 0 AND
id_skpd = 34;
GRANT ALL PRIVILEGES ON view_persediaan_barang4_awayan TO lap_awayan;
REVOKE INSERT, UPDATE, D... |
<filename>Source/module/Application/src/Application/System/SqlScripts/StoredProcedure/usp_updateRegulation.sql
-- Cập nhật Điều tiết giá vé
--
-- usp_updateRegulation 'DG2014', '2014-11-12', '2014-11-28', -20, N'Đám giỗ'
Create Procedure usp_updateRegulation
@id nchar(10),
@dateFrom char(10),
@dateTo char(10),
@pe... |
/*
Deployment script for DW_SUCOS
This code was generated by a tool.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
*/
GO
SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER ON;
SET NUMERIC_ROUNDABORT OFF;
GO
:setvar D... |
<filename>mysql-dump/sampledb.sql
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: db
-- Generation Time: Dec 26, 2019 at 05:59 PM
-- Server version: 8.0.18
-- PHP Version: 7.4.1
CREATE DATABASE IF NOT EXISTS sampledb; USE sampledb;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMI... |
<filename>src/PokerLeagueManager.DB.QueryStore/Tables/LookupGamePlayersDto.sql
CREATE TABLE [dbo].[LookupGamePlayersDto]
(
[DtoId] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY,
[GameId] UNIQUEIDENTIFIER NOT NULL,
[PlayerName] VARCHAR(MAX) NOT NULL,
[Placing] INT NOT NULL,
[Winnings] INT NOT NULL,
[PayIn] IN... |
CREATE DEFINER=`admin`@`192.168.1.2` PROCEDURE `saveUserEventServant`(IN
user_ID INT, servant_ID SMALLINT)
BEGIN
/*Uses a cursor to obtain the max priority for each event (related to user servant) to be saved based on a servant.
Changelog
12/18/2020: Fixed logic for eventCursor. Gets the correct priority for e... |
-- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 22, 2019 at 02:53 PM
-- Server version: 5.6.40-84.0-log
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
<reponame>yradsmikham/OHDSIonAzure
CREATE TABLE [dbo].[relationship] (
[relationship_id] VARCHAR (20) NOT NULL,
[relationship_name] VARCHAR (255) NOT NULL,
[is_hierarchical] VARCHAR (1) NOT NULL,
[defines_ancestry] VARCHAR (1) NOT NULL,
[reverse_relationship_id] VA... |
<gh_stars>0
/*
Warnings:
- You are about to drop the column `avosetGoOnlineId` on the `account` table. All the data in the column will be lost.
*/
-- DropForeignKey
ALTER TABLE `account` DROP FOREIGN KEY `Account_avosetGoOnlineId_fkey`;
-- AlterTable
ALTER TABLE `account` DROP COLUMN `avosetGoOnlineId`;
|
CREATE TABLE course (
cid int(11) NOT NULL AUTO_INCREMENT,
cname varchar(100) DEFAULT NULL,
ccode varchar(45) DEFAULT NULL,
credits decimal(3,1) DEFAULT NULL,
class varchar(45) DEFAULT NULL,
program_year int(11) DEFAULT NULL,
PRIMARY KEY (cid)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
CREATE... |
<reponame>angeloricardoweb/nodejs-learning
CREATE TABLE usuarios(
nome VARCHAR(255),
email VARCHAR(100),
idade INT
);
INSERT INTO usuarios(nome, email, idade)
VALUE(
'João',
'<EMAIL>',
27
);
//seleciona uma databases
USE databaseTeste;
//mostra as tabelas
SHOW TABLES;
... |
-- MySQL dump 10.13 Distrib 5.5.62, for Win64 (AMD64)
--
-- Host: localhost Database: laravel-training
-- ------------------------------------------------------
-- Server version 5.5.5-10.6.4-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACT... |
<filename>examples/out/examples/pgsql_database_example_tablespace.sql
-- ----------------------------
-- -- Database for user_spaces
-- ----------------------------
CREATE TABLESPACE "user_spaces" LOCATION '/var/tables/user_spaces';
|
DROP PROCEDURE IF EXISTS `octo_tweet`.`spDataValues_Insert`;
DELIMITER //
CREATE PROCEDURE `octo_tweet`.`spDataValues_Insert`(
IN Data_source_id int,
IN Data_value float,
IN Data_interval_start_datetime datetime,
IN Data_interval_start_offset time,
IN Data_interval_end_datetime datetime,
IN Da... |
SELECT D.Name AS Department, E.Name AS Employee, E.Salary AS Salary
FROM
Employee E,
(SELECT Max(Salary) AS MaxSalary, DepartmentId FROM Employee GROUP BY DepartmentId) T,
Department D
WHERE E.Salary = T.MaxSalary AND E.DepartmentId = T.DepartmentId AND D.Id = T.DepartmentId;
|
<filename>src/test/resources/sql/create_sequence/feacc6bc.sql
-- file:stats_ext.sql ln:63 expect:true
CREATE SEQUENCE tststats.s
|
USE [perpetuumsa]
GO
--PART 1 INSERT BLINDER
--------------------------------------------
--New Module: The Blinder
--Not purchasable, targetpainter category item
--INSERT entitydefaults, aggregatevalues
--Date: 2019/03/30
--------------------------------------------
--Insert the Blinder definition - a targetpainter c... |
INSERT INTO `yq_oss`.`sys_menu` (`code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ( 'test', '0', '[0],', '测试生成', '', '/test', '99', '1', '1', NULL, '1', '0');
INSERT INTO `yq_oss`.`sys_menu` (`code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`... |
\echo Recreating extra views...
CREATE OR REPLACE VIEW solaruser.million_metric_avg_hour_costs AS
SELECT a.node_id,
max(u.email) AS owner,
round(avg(a.prop_count))::integer AS avg_hourly_prop_count,
(avg(a.prop_count) * 24::numeric * 30::numeric / 1000000::numeric * 7::numeric)::numeric(6,2) AS month_cost... |
ALTER TABLE hb_extranet_users
ADD COLUMN gender INTEGER,
ADD COLUMN phone_number VARCHAR(20),
ADD COLUMN newsletter INTEGER DEFAULT 0;
|
<gh_stars>0
-- Autogenerated: do not edit this file
CREATE TABLE processor (
id BIGINT IDENTITY NOT NULL PRIMARY KEY ,
created_at TIMESTAMP NOT NULL,
updated_at TIMESTAMP NOT NULL,
name VARCHAR(255) NOT NULL,
data_to_process VARCHAR(1000) NOT NULL,
data_result VARCHAR(255) NULL,
url_to_call VARCHAR(2048) NOT N... |
<gh_stars>1-10
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table chart (
id integer autoincrement not null,
data_file_id integer,
type_chart varchar(255),
legend ... |
IF OBJECT_ID('inventory.get_customer_type_id_by_customer_id') IS NOT NULL
DROP FUNCTION inventory.get_customer_type_id_by_customer_id;
GO
CREATE FUNCTION inventory.get_customer_type_id_by_customer_id(@customer_id integer)
RETURNS integer
AS
BEGIN
RETURN
(
SELECT inventory.customers.customer... |
SELECT
toFloat64('inf'),
toFloat64('-inf'),
toFloat64('INF'),
toFloat64('-INF'),
toFloat64('Infinity'),
toFloat64('-Infinity'),
toFloat64('nan'),
toFloat64('-nan'),
toFloat64('NAN'),
toFloat64('-NAN'),
toFloat64('NaN'),
toFloat64('-NaN'),
toFloat64('+NaN'),
toFloat64OrZero('in'),
toFloat64OrZero('-in'),
toFloat64OrZer... |
<gh_stars>10-100
-- 920 Number of drug era records by drug era start month
--insert into @results_schema.heracles_results (cohort_definition_id, analysis_id, stratum_1, count_value)
select c1.cohort_definition_id,
920 as analysis_id,
YEAR(drug_era_start_date)*100 + month(drug_era_start_date) as stratum_1,
cast(... |
ALTER INDEX testschema."Pk_$%{}[]()&*^!@""'`\/#a"
RESET (FILLFACTOR);
|
<reponame>Asterionworld/ether<filename>OpenSim/Data/MySQL/Resources/001_RegionStore.sql
BEGIN;
CREATE TABLE `prims` (
`UUID` varchar(255) NOT NULL,
`RegionUUID` varchar(255) default NULL,
`ParentID` int(11) default NULL,
`CreationDate` int(11) default NULL,
`Name` varchar(255) default NULL,
`SceneGroupID` ... |
<filename>sql/_13_issues/_21_2h/cases/cbrd_23998.sql
drop table if exists tbl;
create table tbl (a int);
insert into tbl values(3);
alter table tbl add column b int;
insert into tbl values(4,4);
select /*+ select_record_info */ t_reprid from tbl;
drop table if exists tbl;
create table tbl (a char(20000));
insert into ... |
--TEST: test with bit strings and blob/clob data types and normal syntax
create table stddev_samp_bbc(
col1 bit(20),
col2 bit varying,
col3 blob,
col4 clob,
col5 double
);
insert into stddev_samp_bbc values(B'1011', X'abc', X'0', '123', 123.5678);
insert into stddev_samp_bbc values(B'1011', x'bcd', X'1', '111... |
<filename>db/seeds.sql
INSERT INTO burger (name) VALUES ('Burger');
INSERT INTO burger (name) VALUES ('Cheese Burger');
INSERT INTO burger (name, devour) VALUES ('Bacon Cheese', true);
INSERT INTO burger (name, devour) VALUES ('Chicken', true);
INSERT INTO burger (name, devour) VALUES ('Chicken Bacon', true);
INSERT IN... |
<reponame>jchenx2/jt
/*
Navicat Premium Data Transfer
Source Server : 小说
Source Server Type : MySQL
Source Server Version : 50727
Source Host : 192.168.3.11:3306
Source Schema : jt_fiction_bak
Target Server Type : MySQL
Target Server Version : 50727
File Encoding : 650... |
DELIMITER $$
CREATE TABLE `logs` (
`log_id` int(11) NOT NULL AUTO_INCREMENT,
`account_id` int(11) DEFAULT NULL,
`old_sum` decimal(14,4) DEFAULT NULL,
`new_sum` decimal(14,4) DEFAULT NULL,
PRIMARY KEY (`log_id`)
);$$
CREATE TRIGGER tr_balance_after_update
AFTER UPDATE
ON accounts
FOR EACH ROW
BEGIN
INSERT I... |
-- phpMyAdmin SQL Dump
-- version 4.5.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 27-09-2016 a las 23:19:54
-- Versión del servidor: 5.7.11
-- Versión de PHP: 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
<reponame>Nuuta/parking
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Mer 16 Mai 2018 à 11:16
-- Version du serveur : 5.7.9
-- Version de PHP : 7.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
<reponame>dpan-5/hw11-employee-tracker
USE employee_DB;
CREATE TABLE department (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30),
PRIMARY KEY (id)
);
INSERT INTO department(name)
VALUES ("Engineering"), ("Finance"), ("HR"), ("Marketing");
SELECT * FROM department; |
<gh_stars>0
CREATE TABLE `reviewers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `fundraisers` (
`id`... |
<reponame>d-saitou/spring-mvc-example
insert into example.m_user_role(user_id,role_id,description) values ('admin','0001',null);
insert into example.m_user_role(user_id,role_id,description) values ('user','0002',null);
|
--
-- create tables
--
CREATE TABLE products (
id INTEGER PRIMARY KEY AUTOINCREMENT,
code VARCHAR(15),
name VARCHAR(255),
description TEXT,
price NUMERIC(10, 2),
state TEXT,
size TEXT,
maintenance NUMERIC(10, 2),
huren NUMERIC(10, 2)
);
--
-- populate with data
--
-- generared using
-- curl ... |
SET SQL_SAFE_UPDATES=0;
UPDATE page_user SET state = 'invited' WHERE state = 'pending' AND page_id IN (SELECT id FROM page WHERE type = 'organization');
|
<gh_stars>0
-- 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Sche... |
CREATE TABLE orders (
id bigserial primary key,
customer_name varchar(60) NOT NULL,
product_name varchar(20) NOT NULL,
order_date timestamp NOT NULL
); |
<reponame>Foxpips/LayeredArchitecture<filename>Miscellaneous/StoredProcedures/Backup_2015 March 24/h3giOrderAmalgationSelection.sql<gh_stars>1-10
/*********************************************************************************************************************
* Procedure Name : [h3giOrderAmalg... |
DROP VIEW IF EXISTS "LocationFilmDto";
create view "LocationFilmDto"
as
select
lf."Id"
, lf."LocationId"
, c."Code" as "CountryCode"
, l."NameOrPostCode" as "LocationNameOrPostCode"
, f."Name" as "FilmName"
, f."MainUrl" as "FilmMainUrl"
from "LocationFilm" lf
... |
-- in4.test
--
-- execsql { SELECT * FROM t3 WHERE y IN () }
SELECT * FROM t3 WHERE y IN () |
<filename>drop_db_schema.sql
DROP VIEW MidageKunden;
DROP VIEW Zahlungsstatus;
DROP VIEW UebersichtKunden;
DROP VIEW Familienwohnungen;
DROP VIEW Reservierung;
DROP VIEW Buchung;
DROP TRIGGER BuchungStornieren;
drop function vollername;
DROP FUNCTION datediff;
DROP FUNCTION preis;
DROP SEQUENCE Standard_Seque... |
ALTER TABLE jobs.fulltext
DROP COLUMN queue;
ALTER TABLE jobs.fulltext RENAME TO fulltext_predict;
|
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
-- Copyright [2016-2019] EMBL-European Bioinformatics Institute
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may ob... |
<gh_stars>0
INSERT INTO USERS VALUES('user1','{bcrypt}$2a$10$5QKIt8PrA5nS.pokPKzAy.8CHnTtyUSIvgj423L0xUGfiBcb.l4fu',TRUE);
INSERT INTO USERS VALUES('user2','{bcrypt}$2a$10$cmiItGxHnv4DoWfAfVfX3eRlOHQZudeYSz9YFSvmDBDBpcd6NLutG',TRUE);
INSERT INTO USERS VALUES('user3','{bcrypt}$2a$10$HVKOanil.gctGV3WZ0682u0/UhF7f3nA4Hn5g... |
<filename>src/it/resources/schema-scripts-with-use-statements/fromB_toA_destructiveTrue.cql<gh_stars>1-10
// Test CQL script
//
// transition-before = B
// transition-after = A
// transition-destructive = true
USE test_cql_migration;
ALTER TABLE a_table DROP field2;
|
<reponame>mojaloop/central-kms<filename>src/main/resources/db/migration/V5__Healthchecks.sql<gh_stars>1-10
CREATE TABLE IF NOT EXISTS healthchecks (
id uuid NOT NULL,
sidecar_id UUID NOT NULL,
level INT NOT NULL,
created TIMESTAMPTZ NOT NULL,
status INT NOT NULL,
responded TIMESTAMPTZ,
respo... |
<reponame>chochohtunn/santedb
/**
* <feature scope="SanteDB.Persistence.Data.ADO" id="20171011-01" name="Update:20171011-01" applyRange="0.2.0.4-0.9.0.5" invariantName="npgsql">
* <summary>Update: Adds trigger constraints to ensure that relationships are of proper type</summary>
* <remarks></remarks>
* <isInstal... |
CREATE TABLE timeout_case (
user_id BIGINT PRIMARY KEY,
release_date TIMESTAMP
);
|
<gh_stars>0
-- @testpoint:opengauss关键字sysid(非保留),作为数据库名
--关键字不带引号-成功
drop database if exists sysid;
create database sysid;
drop database sysid;
--关键字带双引号-成功
drop database if exists "sysid";
create database "sysid";
drop database "sysid";
--关键字带单引号-合理报错
drop database if exists 'sysid';
create database 'sysid';
--关键... |
<reponame>opengauss-mirror/Yat
-- @testpoint: 测试利用select into语句给timestamp类型的变量赋值
--前置:创建表及插入数据
drop table if exists proc_select_into_18;
create table proc_select_into_18(c_int int ,c_integer integer not null ,c_bigint bigint,c_number number default 0.2332,c_number1 number(12,2),c_number2 number(12,6),c_double binary_d... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 16, 2021 at 01:09 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>orphans (1).sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Feb 07, 2022 at 09:49 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.4.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET... |
CREATE DATABASE dao;
use dao;
create table tb_users (
id_user int primary key auto_increment,
username varchar(120) not null,
password varchar(120) not null,
dt_create timestamp default now()
);
INSERT INTO tb_users(username, password, dt_create) VALUES("eltonjtoledo", "<PASSWORD>", now());
INSERT INTO tb_users(u... |
/*
table structure:
stops(id, name)
route(num, company, pos, stop)
*/
-- 1
-- How many stops are in the database.
SELECT COUNT(id)
FROM stops;
-- 2
-- Find the id value for the stop 'Craiglockhart'
SELECT id
FROM stops
WHERE name = 'Craiglockhart';
-- 3
-- Give the id and the name for the stops on the '4' 'LRT' s... |
CREATE TABLE pipelines
(
pipeline_id NVARCHAR(50) NOT NULL,
topic_id NVARCHAR(50) NOT NULL,
name NVARCHAR(50) NOT NULL,
type NVARCHAR(20) NOT NULL,
prerequisite_enabled TINYINT,
prerequisite_on NVARCHAR(MAX),
stages NVAR... |
-- use doctoraldb;
-- select * from instructor;
-- use doctoraldb;
-- select * from phdstudent;
-- use doctoraldb;
-- select * from course;
-- use doctoraldb;
-- select * from coursetaught;
-- use doctoraldb;
-- select * from gra;
-- use doctoraldb;
-- select * from gta;
-- use doctoraldb;
-- select * from milest... |
<gh_stars>0
alter table posts drop constraint chk_post_readables;
|
<filename>db/seeds.sql<gh_stars>0
SELECT * FROM burgers;
INSERT INTO burgers(burger_name, devoured)
VALUES ("Cheese Burger", TRUE),("Baconator", TRUE),("Portabello Burger", FALSE);
|
CREATE TABLE AKTIVITET_SENDT_PAA_KAFKA_V3 (
AKTIVITET_ID NUMBER(19) NOT NULL,
AKTIVITET_VERSJON NUMBER(19) NOT NULL,
SENDT TIMESTAMP not null,
"OFFSET" NUMBER(19) NOT NULL,
CONSTRAINT AKTIVITET_KAFKA_V3_PK PRIMARY KEY (AKTIVITET_ID, AKTIVITET_VERSJON),
CONSTRAINT KAFKA_V3_TIL_AKTIVITET FOREIGN... |
<filename>cmd/migrations/2_create_sms_table.tx.up.sql
CREATE TABLE IF NOT EXISTS public.sms
(
id bigserial NOT NULL,
notificationId bigserial NOT NULL,
smsId text NOT NULL UNIQUE,
code int8 NOT NULL,
status text NULL,
phrase text ... |
CREATE FUNCTION ufn_CalculateFutureValue
(@InitialSum DECIMAL(18, 4), @YearlyInterestRate FLOAT, @NumberOfYears INT)
RETURNS DECIMAL(18, 4)
AS
BEGIN
DECLARE @FutureValue DECIMAL(18, 4)
SET @FutureValue = @InitialSum * (POWER(1 + @YearlyInterestRate, @NumberOfYears))
RETURN @F... |
/*
Navicat Premium Data Transfer
Source Server : mysql5-local
Source Server Type : MySQL
Source Server Version : 50735
Source Host : localhost:3306
Source Schema : workflow
Target Server Type : MySQL
Target Server Version : 50735
File Encoding : 65001
Date: 11/02/202... |
/*
Navicat Premium Data Transfer
Source Server : 127.0.0.1
Source Server Type : MySQL
Source Server Version : 80027
Source Host : localhost:3306
Source Schema : dcat-admin
Target Server Type : MySQL
Target Server Version : 80027
File Encoding : 65001
Date: 18/02/2022... |
<filename>inventory_schema.sql
-- 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- ------------------------------------------... |
BEGIN;
CREATE OR REPLACE VIEW "liquid_feedback_version" AS
SELECT * FROM (VALUES ('1.2.2', 1, 2, 2))
AS "subquery"("string", "major", "minor", "revision");
ALTER TABLE "issue" DROP CONSTRAINT "clean_restriction";
ALTER TABLE "issue" ADD CONSTRAINT "only_closed_issues_may_be_cleaned"
CHECK ("cleaned" ISNULL OR ... |
<filename>datastore/migrations/0005_limit_triggers.down.sql
DROP TRIGGER limit_sites_update;
DROP TRIGGER limit_forecasts_update;
DROP TRIGGER limit_observations_update;
DROP TRIGGER fail_on_aggregate_delete_if_forecast;
-- DROP TRIGGER fail_on_site_delete_if_aggregate;
|
alter table shipments rename column method_id to shipping_method_id |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.