sql stringlengths 6 1.05M |
|---|
<gh_stars>1-10
--+ holdcas on;
--[er]Revoke user privilege twice
CALL login('dba','') ON CLASS db_user;
CREATE CLASS DCL1 (id INTEGER);
CALL add_user('DCL_USER1','DCL1') ON CLASS db_user;
GRANT SELECT ON DCL1 TO DCL_USER1;
REVOKE SELECT ON DCL1 FROM DCL_USER1;
REVOKE SELECT ON DCL1 FROM DCL_USER1;
CALL log... |
-- @testpoint: right函数与where结合
drop table if exists t_concat;
create table t_concat(id int,v_char varchar(10));
insert into t_concat values(1,'awsdaw');
select id,right(v_char,2) from t_concat where ascii(v_char) in (97,98) order by id;
drop table if exists t_concat; |
CREATE DATABASE IF NOT EXISTS larajwt CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER IF NOT EXISTS 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON larajwt.* TO 'root'@'%';
FLUSH PRIVILEGES;
|
-- -----------------------------------------------------------------------------
-- Script: employeesSchema.sql
-- Purpose: This script will create a schema for the employee manager application
-- -----------------------------------------------------------------------------
-- Author: <NAME>
-- Date: May 7, 20... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 27, 2020 at 03:55 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
create table ext_inventory (
room varchar2(20),
item varchar2(4000),
item_count varchar2(20)
)
organization external(
default directory deathstar_home
access parameters (
records delimited by newline skip 1
fields terminated by ','
optionally enclosed by '"'
)
location('inventory.csv')
)
reje... |
CREATE NONCLUSTERED INDEX [Accounts_AnnualReportCode_CVRIDX]
ON [dbo].[Accounts]([AnnualReportCode] ASC)
INCLUDE([FundGroupCode], [AccountPK], [OrgFK], [OPFundFK]) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NOR... |
ALTER TABLE public.linked_group_details ALTER COLUMN request_id TYPE bigint using request_id::bigint;
ALTER TABLE ONLY public.linked_group_details
ALTER COLUMN request_id SET NOT NULL;
ALTER TABLE ONLY public.linked_group_details
ADD CONSTRAINT uc_linked_group_details_request_id UNIQUE (request_id);
CREATE SEQUENCE ... |
-- phpMyAdmin SQL Dump
-- version 4.0.10.20
-- https://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 22, 2020 at 01:43 AM
-- Server version: 5.1.73
-- PHP Version: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT... |
--The following sample query gives you the top 25 stored procedures that
--have been recompiled.
--The plan_generation_num indicates the number of times the query has recompiled.
select top 25
sql_text.text,
sql_handle,
plan_generation_num,
execution_count,
dbid,
objectid
from sy... |
<reponame>tushartushar/dbSmellsData<filename>data/open-source/extracted_sql/bluzphp_framework.sql
SELECT id, username FROM users WHERE ip = :ip
SELECT name, email FROM users WHERE id =
SELECT name, email FROM users WHERE id = :id
SELECT * FROM users WHERE ip = ?
SELECT * FROM users');
CREATE TABLE auth ( userId BIGINT... |
<filename>Development/Core/TfsMigrationDBConsolidation/Tfs_Integration/Schema Objects/Tables/Keys/dbo.FIELD_EXCLUSION_COLLECTION.FK_FieldExclCollection.fkey.sql
ALTER TABLE [dbo].[FIELD_EXCLUSION_COLLECTION]
ADD CONSTRAINT [FK_FieldExclCollection]
FOREIGN KEY (WITypeMapId)
REFERENCES WI_TYPE_MAP_COLLECTION (Id)
|
<filename>packages/server/src/db/sql/schema.sql
CREATE EXTENSION IF NOT EXISTS pg_cron;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE IF NOT EXISTS players
(
id uuid DEFAULT uuid_generate_v4 (),
username VARCHAR(255) UNIQUE PRIMARY KEY NOT NULL,
online BOOLEAN DEFAULT false NOT NULL,
experie... |
<reponame>rieckpil/learning-samples
INSERT INTO person (id, dob, first_name, last_name) VALUES (1001, '1990-12-24', 'Mike', 'Deere');
INSERT INTO person (id, dob, first_name, last_name) VALUES (1002, '1999-01-12', 'Peter', 'Parker');
INSERT INTO person (id, dob, first_name, last_name) VALUES (1003, '1990-06-15', 'Bat',... |
/*
Warnings:
- A unique constraint covering the columns `[linkedin]` on the table `users` will be added. If there are existing duplicate values, this will fail.
- A unique constraint covering the columns `[github]` on the table `users` will be added. If there are existing duplicate values, this will fail.
*/
--... |
<reponame>platonai/pulsar<gh_stars>100-1000
-- noinspection SqlResolveForFile
-- noinspection SqlNoDataSourceInspectionForFile
INSERT INTO `asin`(
`id`,
`category`,
`col1`,
`col2`,
`img`,
`smallrank`,
`bigrank`,
`title`,
`desc`,
`asin`,
`brand`,
`soldby`,
`shipby`,
`price`,
... |
drop table if exists user_roles;
drop table if exists users;
CREATE TABLE users(
id SERIAL PRIMARY KEY,
username VARCHAR NOT NULL,
password VARCHAR NOT NULL,
enabled boolean NOT NULL DEFAULT TRUE,
UNIQUE (username)
);
create table user_roles (
id SERIAL PRIMARY KEY,
username VARCHAR NOT NULL,
role... |
<filename>db/seed/data_migration_lowercase.sql
BEGIN TRANSACTION;
UPDATE contact
SET github_id = lower(github_id), email = lower(email);
END TRANSACTION;
|
<filename>hplsql/src/test/queries/local/table_type.sql
TYPE T_TABLE IS TABLE OF STRING INDEX BY BINARY_INTEGER;
CREATE FUNCTION iterate_forward(tbl T_TABLE) RETURNS STRING
BEGIN
DECLARE s STRING = '';
DECLARE idx INT = tbl.FIRST;
WHILE idx IS NOT NULL LOOP
s = s || tbl(idx);
idx = tbl.NEXT(idx);
END LO... |
SELECT * FROM a2cpsdev.locations_base
|
<reponame>festivent/api
DROP FUNCTION IF EXISTS get_user_events(); |
<reponame>Arrackisarookie/library
/*
Navicat MySQL Data Transfer
Source Server : library
Source Server Version : 50527
Source Host : localhost:3306
Source Database : library
Target Server Type : MYSQL
Target Server Version : 50527
File Encoding : 65001
Date: 2018-11-23 22:06:17
*/
... |
<reponame>wasim2583/RTA<filename>DB/rta (2021-03-18).sql
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 18, 2021 at 04:43 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START ... |
CREATE TABLE [dbo].[GroupTypes]
(
[Id] INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
[Title] NVARCHAR(150) NOT NULL,
[IsDeleted] BIT NOT NULL DEFAULT 0,
[Created] DATETIMEOFFSET (7) CONSTRAINT [DF_GroupTypes_Created] DEFAULT (sysdatetimeoffset()) NOT NULL,
[Modified] DATETIMEOFFSET (7) CONSTRAINT [DF_GroupTypes... |
<reponame>JackDan9/soil
CREATE DATABASE IF NOT EXISTS `soil` DEFAULT CHARACTER SET utf8; |
<filename>SqlScript/book.sql<gh_stars>1-10
-- MySQL dump 10.13 Distrib 5.7.24, for Win32 (AMD64)
--
-- Host: localhost Database: book
-- ------------------------------------------------------
-- Server version 5.7.24
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_... |
<reponame>ChuanGoing/Start
/*
Navicat Premium Data Transfer
Source Server : ChuanGoing
Source Server Type : MySQL
Source Server Version : 50719
Source Host : localhost:3306
Source Schema : ChuanGoing
Target Server Type : MySQL
Target Server Version : 50719
File Encoding ... |
<reponame>JohnCale47/el_monitorro
CREATE INDEX feed_items_created_at_index ON feed_items(created_at);
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.4.13.1deb1
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Lun 14 Mars 2016 à 14:52
-- Version du serveur : 5.6.28-0ubuntu0.15.10.1
-- Version de PHP : 5.6.11-1ubuntu3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = ... |
<gh_stars>1-10
UPDATE environments
SET
name = ?,
description = ?,
data = ?,
session_type = ?,
session_header = ?,
session_name = ?,
session_auth_key = ?,
session_encryption_key = ?,
session_auth_key_rotate = ?,
session_encryption_key_rotate = ?,
show_javascript_errors = ?,
updated_at = CURRENT_T... |
--======================================================
--
-- Author: <NAME>
-- Usage: Script creates a procedure single_pk_test. In order to run/test the procedure use the run.sql script that can be found in the same directory of the project.
-- Database system supported/tested: SQL Server 2016
-- URL of the project:... |
<gh_stars>100-1000
create table oms_order_return_reason
(
id bigint auto_increment
primary key,
name varchar(100) null comment '退货类型',
sort int null,
status int(1) null comment '状态:0->不启用;1->启用',
create_time datetime null comment '添加时间'
)
co... |
DROP TABLE IF EXISTS `data`;
CREATE TABLE `data` (
`id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`data` longblob NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `session`;
CREATE TABLE `session` (
`id` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NO... |
-- @testpoint: 不支持在事务、函数和存储过程中使用 合理报错
--创建序列
drop sequence if exists test_seq_012;
CREATE sequence test_seq_012;
--查询cache值
select last_value,cache_value from test_seq_012;
--不支持在事务、函数和存储过程中使用
begin
alter sequence test_seq_012 cache 5;
end;
/
select last_value,cache_value from test_seq_012;
select nextval('test_s... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 29, 2018 at 09:51 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
<reponame>jkorczakowski/home-library-manager<filename>temp/V2__init_authors_group_table.sql
drop table if exists author_groups;
create table author_groups(
id int primary key auto_increment,
created bit
);
alter table authors add column author_group_id int null;
alter tab... |
/* t_compte_cmp */
INSERT INTO t_compte_cmp VALUES ('yves-quere','c9f4c517139ef5e72f903f21614258587fd23077e25c9e3d7767e831d8650453','Actif');
INSERT INTO t_compte_cmp VALUES ('mathieu-cariou','c9f4c517139ef5e72f903f21614258587fd23077e25c9e3d7767e831d8650453','Actif');
INSERT INTO t_compte_cmp VALUES ('alexandre-pere... |
DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE `burgers`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`burger_name` VARCHAR(255) NOT NULL,
`devoured` BOOLEAN DEFAULT false,
PRIMARY KEY (id)
); |
create extension "uuid-ossp";
create schema tx;
create table tx.transaction (id varchar(40) not null default uuid_generate_v4(),
dt timestamp not null default now(),
amount double precision not null, account_id character varying(40) not null, primary key (id));
insert into tx.transaction (amount, account_id)... |
select
`un_ami_pour_la_vie`.`user`.`id` AS `id`,
`un_ami_pour_la_vie`.`user`.`firm` AS `firm`,
`un_ami_pour_la_vie`.`user`.`asbl` AS `asbl`,
`un_ami_pour_la_vie`.`user`.`lastName` AS `lastName`,
`un_ami_pour_la_vie`.`user`.`firstName` AS `firstName`,
`un_ami_pour_la_vie`.`user`.`contPhonePv` AS `contPhonePv`,
`un_ami_... |
CREATE TABLE IF NOT EXISTS joueurs (
id_joueur INT NOT NULL AUTO_INCREMENT,
login VARCHAR(20) NOT NULL UNIQUE,
PRIMARY KEY (id_joueur)
);
CREATE TABLE IF NOT EXISTS parties (
id_partie INT NOT NULL AUTO_INCREMENT,
nom VARCHAR(255),
password VARCHAR(255),
createur INT,
date_debut DATETIME NOT NULL,
date_fin DA... |
CREATE PROCEDURE [dbo].[ProcVoptionTableOutWithDto]
AS
SELECT * FROM VoptionTableWithDto
|
DROP SCHEMA db CASCADE;
DROP SCHEMA dictionary CASCADE;
DROP TABLE dual;
DELETE FROM databasechangeloglock;
DELETE FROM databasechangelog;
|
/*
Navicat MySQL Data Transfer
Source Server : wvanheem_core_local
Source Server Version : 50509
Source Host : 127.0.0.1
Source Database : core
Target Server Version : 50509
File Encoding : utf-8
Date: 06/21/2012 18:10:25 PM
*/
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ... |
SET NAMES utf8mb4;
CREATE DATABASE IF NOT EXISTS `bap_pagination`;
USE `bap_pagination`;
# Dump of table country
# ------------------------------------------------------------
DROP TABLE IF EXISTS `country`;
CREATE TABLE `country` (
`code` char(3) NOT NULL DEFAULT '',
`name` char(52) NOT NULL DEFAULT '',
`con... |
<reponame>Noah-Huamzah/E-com-website<filename>db.sql
CREATE TABLE `orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`amount` varchar(20) DEFAULT NULL,
`currency` char(3) DEFAULT NULL,
`customer_name` varchar(255) DEFAULT NULL,
`card_name` varchar(255) DEFAULT NULL,
`card_number` varchar(20) DEFAULT NULL,
`... |
Drop database Unacesp;
Create database Unacesp;
Use Unacesp;
Create Table Empresa
(
CodEmp int primary key Auto_Increment,
NomeEmp Varchar (50) Not null,
EndEmp Varchar (50),
BairroEmp Varchar (50),
CidadeEmp Varchar (50),
NumEmp Smallint,
UfEmp Varchar (2),
CepEmp Varchar (8)
);
Create Table EndAss
(
CodEndAss in... |
--start query 1 using template query1.tpl
-- @public
WITH customer_total_return AS (
SELECT
sr_customer_sk AS ctr_customer_sk
,sr_store_sk AS ctr_store_sk
,SUM(SR_REVERSED_CHARGE) AS ctr_total_return
FROM
store_returns
,... |
<reponame>MCZbase/DDL
CREATE OR REPLACE TRIGGER "COLL_OBJECT_CT_CHECK"
before UPDATE or INSERT ON coll_object
for each row
declare
numrows number;
BEGIN
SELECT COUNT(*) INTO numrows FROM ctcoll_obj_disp WHERE coll_obj_disposition = :NEW.coll_obj_disposition;
IF (numrows = 0) THEN
raise_application_error(
... |
use praktikum
go
select * from Foren where OberforumID is NULL order by Bezeichnung |
<filename>db/tour_enquiry.sql
-- Adminer 4.7.0 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
CREATE DATABASE `dip_tour` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `dip_tour`;
DROP TABLE IF EXISTS `tour_enquiry`;
CREATE TABLE `tour_enquiry`... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.31-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 11.2.0.6213
-- -----------------------------------------------... |
-- 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';
-- -----------------------------------------------------
-- Schema mydb
-- -... |
SELECT e.FirstName + ' ' + e.LastName AS [Name], COUNT(r.EmployeeId) as [Users Number]FROM Employees as [e]
LEFT JOIN Reports as [r] ON r.EmployeeId = e.Id
GROUP BY e.FirstName, e.LastName
ORDER BY COUNT(r.EmployeeId) DESC, Name
-- testing is this
SELECT * FROM Employees as [e]
INNER JOIN Reports as [r] ON r.Employee... |
/*
A pupil Tim gets homework to identify whether three line segments could possibly
form a triangle.
However, this assignment is very heavy because there are hundreds of records to
calculate.
Could you help Tim by writing a query to judge whether these three sides can
form a triangle, assuming table triangle holds th... |
CREATE TABLE PUBLISHER
(NAME VARCHAR(20) PRIMARY KEY,
PHONE INTEGER,
ADDRESS VARCHAR(20)); |
create or replace procedure kill_other_session( p_sid in number
, p_serial# in number
, p_inst_id in number default null
, p_comment in varchar2 default null
... |
DROP FUNCTION IF EXISTS conreality.motion_report(geometry, real) RESTRICT;
DROP FUNCTION IF EXISTS conreality.motion_report(geography, real) RESTRICT;
CREATE FUNCTION conreality.motion_report("position" geometry, accuracy real) RETURNS geography AS $$
DECLARE
reporter_uuid uuid := session_user::uuid; ... |
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
DROP VIEW IF EXISTS auth.EducationOrganizationIdTo... |
<filename>sql/N180_consecutive_numbers.sql
select distinct a.Num as ConsecutiveNums
from Logs a,Logs b,Logs c
where a.Num=b.Num and b.Num=c.Num and a.id=b.id+1 and b.id=c.id+1
-- SQL架构
-- 编写一个 SQL 查询,查找所有至少连续出现三次的数字。
--
-- +----+-----+
-- | Id | Num |
-- +----+-----+
-- | 1 | 1 |
-- | 2 | 1 |
-- | 3 | 1 |
-- |... |
set veri off
set echo off
set feed off
set term off
alter database rename file '/u02/oradata/ORASLOB/system01.dbf' to '/u02/oradata/DEVSLOB/system01.dbf';
alter data... |
<gh_stars>10-100
----------------------------------------------------------------------------
-- Migrate Billinresult
----------------------------------------------------------------------------
ALTER TABLE billingresult ADD COLUMN chargingorgkey BIGINT;
UPDATE billingresult AS br SET chargingorgkey = (
SELECT source... |
/*
Navicat Premium Data Transfer
Source Server : 192.168.56.10
Source Server Type : MySQL
Source Server Version : 50735
Source Host : 192.168.56.10:3306
Source Schema : gulimall_wms
Target Server Type : MySQL
Target Server Version : 50735
File Encoding : 65001
Date: ... |
<reponame>peter-ls/kylo<gh_stars>1000+
GRANT ALL PRIVILEGES ON *.* TO 'nifi'@'localhost' WITH GRANT OPTION; |
drop table if exists tsv_raw;
create table tsv_raw (strval String, intval Int64, b1 String, b2 String, b3 String, b4 String) engine = Memory;
insert into tsv_raw format TSVRaw "a 1 \ \\ "\"" "\\""
;
select * from tsv_raw format TSVRaw;
select * from tsv_raw format JSONCompactEachRow;
drop table tsv_raw;
|
<gh_stars>1-10
CREATE TABLE `#__banners` (
`id` INTEGER NOT NULL auto_increment,
`cid` INTEGER NOT NULL DEFAULT '0',
`type` INTEGER NOT NULL DEFAULT '0',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`alias` VARCHAR(255) NOT NULL DEFAULT '',
`imptotal` INTEGER NOT NULL DEFAULT '0',
`impmade` INTEGER NOT NULL D... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 16, 2017 at 06:55 PM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
CREATE TABLE `omikujis` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`message` MEDIUMTEXT NOT NULL COMMENT 'in a serialized format',
`vote_count` int(10) NOT NULL DEFAULT 0 COMMENT '+/-, a message will be hidden if it is <=-3.',
`tg_id` bigint(10) NOT NULL,
`tg_name` varchar(32) NOT NULL,
`created_at` t... |
-- Sales Tax Calculator SQL Test
DROP TABLE IF EXISTS error_logs;
DROP FUNCTION LogTokenizer(varchar);
DROP LIBRARY rLib cascade;
-- Create table and load data
CREATE TABLE error_logs (machine VARCHAR(30), error_log VARCHAR(500));
COPY error_logs FROM STDIN;
node001|ERROR 345 - Broken pipe
node001|WARN - Nearly filled ... |
<reponame>farid-maulana/dts-JuniorWebDeveloper
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 06, 2020 at 09:50 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION... |
<reponame>VicdVud/deli-crawler
CREATE DATABASE IF NOT EXISTS `deli` DEFAULT CHARACTER SET utf8mb4;
USE `deli`;
CREATE TABLE IF NOT EXISTS `attendanceback` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`name` varchar(15) NOT NULL DEFAULT '' COMMENT '姓名',
`department` varchar(15) NOT NULL DEFAUL... |
<filename>database.sql<gh_stars>0
DROP DATABASE IF EXISTS appdb;
CREATE DATABASE appdb;
USE appdb;
DROP USER IF EXISTS 'app'@'localhost';
CREATE USER 'app'@'localhost' IDENTIFIED BY '<PASSWORD>';
GRANT ALL PRIVILEGES ON appdb.* TO 'app'@'localhost';
FLUSH PRIVILEGES; |
<gh_stars>0
DROP PROCEDURE IF EXISTS dbo.sp_select_component
GO
CREATE PROCEDURE sp_select_component @Id int
AS
BEGIN
SELECT * FROM component WHERE id = @Id
END
GO
DROP PROCEDURE IF EXISTS dbo.sp_selectlist_component
GO
CREATE PROCEDURE sp_selectlist_component
AS
BEGIN
SELECT * FRO... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 3.4.11.1deb2+deb7u1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Erstellungszeit: 06. Mrz 2015 um 10:42
-- Server Version: 5.5.41
-- PHP-Version: 5.4.36-0+deb7u3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
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 N... |
<gh_stars>1-10
CREATE TABLE [dbo].[DatabaseDocumentStatus]
(
[DatabaseDocumentStatusId] INT NOT NULL PRIMARY KEY IDENTITY,
[ProcessId] INT NOT NULL,
[SdocId] INT NOT NULL,
[RsdraNumber] NVARCHAR(50) NULL,
[SourceDocumentName] NVARCHAR(255) NULL,
[SourceDocumentType] NVARCHAR(4000) NULL,
[SourceNa... |
<reponame>trf2-jus-br/balcaovirtual<filename>src/main/resources/br/jus/trf2/balcaojus/db-013.sql<gh_stars>1-10
UPDATE sistema SET SIST_SG = 'br.jus.trf2.apolo' WHERE (SIST_ID = '1');
UPDATE sistema SET SIST_SG = 'br.jus.jfrj.apolo' WHERE (SIST_ID = '2');
UPDATE sistema SET SIST_SG = 'br.jus.jfes.apolo' WHERE (SIST_ID =... |
/**
* USERS
* Note: This table contains user data. Users should only be able to view and update their own data.
*/
create table users (
-- UUID from auth.users
id uuid references auth.users not null primary key,
email text,
full_name text,
avatar_url text
);
alter table users enable row level security;
creat... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.127.12
-- Generation Time: Sep 18, 2021 at 04:22 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... |
<filename>sqlscripts_hydration/3.sql
-- And now let's create some schema in here...
USE Demo
GO
CREATE TABLE Colors(id int, Name nvarchar(50)) |
<reponame>aliostad/deep-learning-lang-detection
-- ============================
-- This file was created using Derby's dblook utility.
-- Timestamp: 2013-08-03 20:08:42.546
-- Source database is: ACMEDatabase
-- Connection URL is: jdbc:derby://localhost:1527/ACMEDatabase;user=dbuser;password=<PASSWORD>
-- Specified sc... |
<filename>macros/macros/limit_data_in_dev.sql
{% macro limit_data_in_dev(column_name, days_duration=3) %}
{% if target.name == 'dev' %}
where {{ column_name }} >= dateadd('day', {{ days_duration }}, current_timestamp)
{% endif %}
{% endmacro %} |
CREATE TABLE `user_login_links` (
`login_link_id` int(11) NOT NULL,
`user_id` int(11) DEFAULT NULL,
`username` varchar(100) DEFAULT NULL,
`access_key` varchar(32) DEFAULT NULL,
`time_created` int(11) DEFAULT NULL,
`time_clicked` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `user... |
<gh_stars>100-1000
select _requalify_grantee_term('user.name') = 'user.name';
|
DROP DATABASE IF EXISTS shard0;
DROP DATABASE IF EXISTS shard1;
DROP DATABASE IF EXISTS shard2;
CREATE DATABASE shard0;
CREATE DATABASE shard1;
CREATE DATABASE shard2;
\c shard0
DROP TABLE IF EXISTS data CASCADE;
CREATE TABLE data (
id BIGINT,
value VARCHAR
) PARTITION BY HASH (id);
CREATE TABLE data_shar... |
-- =====================================
-- Add Linked Server Simplet template
-- =====================================
-- Create linked server reference to Database Engine instance on same machine
EXEC master.dbo.sp_addlinkedserver @server = N'<server_name,sysname,(local)><instance_name,sysname,\SQLEXPRESS>', @srvpro... |
# dayofweek.sql
# Day-of-week calculations
# shift to Saturday, then shift forward to desired day, two-phase formula
SELECT d, DAYNAME(d) AS day,
DATE_ADD(DATE_SUB(d,INTERVAL DAYOFWEEK(d) DAY),INTERVAL 1 DAY)
AS Sunday,
DATE_ADD(DATE_SUB(d,INTERVAL DAYOFWEEK(d) DAY),INTERVAL 7 DAY)
AS Saturday
FROM date_val;
# comb... |
-- match modelled_stream_crossings modelled_crossing_id to modelled_crossing_id in bcfishpass.modelled_stream_crossings_archive
-- match is done for crossings within 10m
DROP TABLE IF EXISTS bcfishpass.modelled_stream_crossings_temp;
CREATE TABLE bcfishpass.modelled_stream_crossings_temp
(
temp_id integer,
... |
/***************************************
sourced from snprc_ehr.ActiveLocations
Added outer join to valid locations
Returns room and Species (char2) if occupied
NULL species if valid location w/o animals
srr 07.17.2019
Changed to an outer join.
srr 04.19.2019
***************************************/
SELEC... |
<filename>yoo-master-dc2492330d5d46b48f1ceca891e0f9f7e1593fee/module/yoomath/yoomath/src/main/java/tpl/sql/Exercise.sql
## 根据条件获取老师最近一次作业相关的练习
#macro($zyFindLatestOne(teacherId,textbookCode,textbookExerciseId,bookId,sectionCode,filterTextbookExerciseId,filterBookId))
SELECT * FROM exercise WHERE create_id = :teacherI... |
CREATE TABLE jansClnt_Array (
doc_id STRING(64) NOT NULL,
objectClass STRING(48),
dn STRING(128),
jansRedirectURI ARRAY<STRING(MAX)>,
) PRIMARY KEY(doc_id)
|
ALTER TABLE `selfservice_login_flow_methods` CHANGE `selfservice_login_flow_id` `selfservice_login_request_id` char(36) NOT NULL;
ALTER TABLE `selfservice_registration_flow_methods` CHANGE `selfservice_registration_flow_id` `selfservice_registration_request_id` char(36) NOT NULL;
ALTER TABLE `selfservice_settings_flow_... |
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
hair_color TEXT,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
SELECT diesel_manage_updated_at('users');
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.2.10
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 28, 2015 at 11:18 PM
-- Server version: 5.5.38
-- PHP Version: 5.6.2
--SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";--
--SET time_zone = "+00:00";--
--
-- Database: `bugger`
--
--CREATE DATABASE I... |
<reponame>UserOfficeProject/user-office-backend
DO
$$
BEGIN
IF register_patch('AddSubTemplateQuestionType.sql', 'jekabskarklins', 'Adding new question type', '2020-06-11') THEN
BEGIN
INSERT INTO question_datatypes VALUES('SUBTEMPLATE');
END;
END IF;
END;
$$
LANGUAGE plpgsql; |
-- MySQL dump 10.13 Distrib 8.0.20, for macos10.15 (x86_64)
--
-- Host: 127.0.0.1 Database: doctor
-- ------------------------------------------------------
-- Server version 8.0.20
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 01, 2018 at 04:43 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_... |
<gh_stars>0
-- v0.5.0
-- uses expressions instead of fixed values for function definition
CREATE OR REPLACE FUNCTION __migration_intArrayToStringArray (elements jsonb)
RETURNS jsonb
AS $$
DECLARE
BEGIN
RETURN coalesce((
SELECT
(jsonb_agg(to_jsonb ((value::int)::text)))
FROM jsonb_ar... |
<reponame>KevinMarete/adtv4
ALTER TABLE patient ADD breastfeeding tinyint(2) NOT NULL DEFAULT '0' AFTER pregnant// |
<gh_stars>0
SELECT p1.name,child.name FROM parent AS p1,parent AS p2,child WHERE child.pid = p1.id AND p2.state = 'MA' AND p1.id <> p2.id
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.