sql stringlengths 6 1.05M |
|---|
<filename>documentation/myfin.sql
-- Adminer 4.8.0 MySQL 8.0.22 dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET NAMES utf8mb4;
DROP TABLE IF EXISTS `ba_import`;
CREATE TABLE `ba_import` (
`id` int NOT NULL AUTO_INCREMENT,
`bank_account_id` in... |
<reponame>erlieStar/mybatis-3-back
CREATE TABLE `role` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`role_name` varchar(255) DEFAULT NULL COMMENT '角色名字',
`note` varchar(255) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into role (role_name, note) values ("管理员", "很牛... |
-- Sundered Emerald Colossus
-- By <NAME>
-- Fix spawn
DELETE FROM `creature` WHERE `id`=44229;
INSERT INTO `creature` (`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`Move... |
<gh_stars>1-10
CREATE TABLE weather (city TEXT, state TEXT, high_F INT8, low_F INT8, high_C INT8, low_C INT8);
|
-- =============================================
-- Author: Sharon
-- Create date: 05/08/2010 --Please Insert comment of today date with a description of your changes in this procedure.(Warning)
-- Description: General SP that run all check by Version Number
-- =============================================
CREATE PRO... |
/*
Navicat MySQL Data Transfer
Source Server : 本地库
Source Server Version : 50553
Source Host : localhost:3306
Source Database : direct
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-02-02 19:04:30
*/
SET FOREIGN_KEY_CHECKS=0;
-- --------... |
<gh_stars>1000+
CREATE INDEX "selfservice_verification_flows_nid_idx" ON "selfservice_verification_flows" (id, nid); |
INSERT INTO persediaan (id_transaksi, id_barang, jumlah, harga) VALUES (115624,517,18,0);
INSERT INTO persediaan (id_transaksi, id_barang, jumlah, harga) VALUES (115624,539,7,0);
INSERT INTO persediaan (id_transaksi, id_barang, jumlah, harga) VALUES (115624,562,1164,0);
INSERT INTO persediaan (id_transaksi, id_barang, ... |
<gh_stars>1-10
alter table users
add `wz_user_no` varchar(255);
alter table users
add `skd_user_no` varchar(255);
|
<reponame>opengauss-mirror/Yat
-- @testpoint: 绑定参数的个数与into个数一致
--创建存储过程
create or replace procedure pro_020()
as
sqlstat varchar(500);
v1 date;
v2 timestamp;
r1 date;
r2 timestamp;
begin
v1 := to_date('2020-11-24 13:14:15', 'yyyy-mm-dd hh24:mi:ss');
v2 := to_date('2020-11-24 13:14:15', 'yyyy-mm-dd hh24:mi... |
CREATE TABLE users
(
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
email TEXT NOT NULL UNIQUE,
role TEXT CHECK( role in ('user','admin') ) NOT NULL DEFAULT 'user',
disabled TEXT,
last_login INTEGER NOT NULL DEFAULT 0
)... |
CREATE TABLE childtable (
)
INHERITS (parenttable);
ALTER TABLE ONLY childtable
ALTER COLUMN parenttable_id SET DEFAULT 0;
ALTER TABLE childtable OWNER TO postgres;
|
<gh_stars>0
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.35-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 9.5.0.5196
-- ------------------------------------... |
USE [Monopoly]
GO
/****** Object: View [Game].[vwOffer_OfferorUtilities] Script Date: 2/19/2022 10:25:57 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [Game].[vwOffer_OfferorUtilities] AS
SELECT a.[rowid] AS [offer], a.[offeror], c.[considered_utility]
FROM [Game].[Offers] a
JOIN [Playe... |
CREATE TABLE news (
guid TEXT PRIMARY KEY,
title TEXT,
) |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 30, 2020 at 09:40 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.2.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<reponame>ak1711/testapp
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 29, 2021 at 07:29 AM
-- Server version: 8.0.19
-- PHP Version: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb1+deb.cihar.com~trusty.2
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 14-01-2018 a las 18:50:39
-- Versión del servidor: 5.6.35-1+deb.sury.org~trusty+0.1
-- Versión de PHP: 7.0.26-2+ubuntu14.04.1+deb.sury.org+2
SET SQL_MODE = "NO_AUTO_VALUE... |
<reponame>Curry44424/comicchum<filename>db/schema.sql
DROP DATABASE IF EXISTS comicbooks_db;
CREATE DATABASE comicbooks_db;
|
--/
CREATE OR REPLACE PYTHON3 SCALAR SCRIPT get_db_location(name VARCHAR(2000))
EMITS (name VARCHAR(200), lon float, lat float, id decimal) AS
import urllib.request as request
import json
import datetime as dt
def run(ctx):
name = ctx.name.replace(chr(32), "%20")
url = f"https://api.deutschebah... |
<reponame>SQLShark/ASDWPrecon
USE AdventureWorks;
GO
-- #######################################################################################################################################
-- Update Product Names
-- ####################################################################################################... |
create or replace package body com_fos_timing_actions
as
-- =============================================================================
--
-- FOS = FOEX Open Source (fos.world), by FOEX GmbH, Austria (www.foex.at)
--
-- A set of actions which handle the timing of remaining actions within a
-- Dynamic Action such ... |
<reponame>martind/plsql-xtras<gh_stars>1-10
create or replace package body xtras_generators as
-- The MIT License (MIT)
--
-- Copyright (c) 2015 <NAME>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-... |
ALTER TABLE guild_properties
ADD COLUMN prefix char default null; |
<reponame>dram/metasfresh
-- 2018-05-07T15:51:25.717
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Table (AccessLevel,AD_Client_ID,CreatedBy,IsActive,IsSecurityEnabled,IsDeleteable,IsHighVolume,IsView,ImportTable,IsChangeLog,ReplicationType,EntityType,CopyColumnsFromTable,TableName,Is... |
DELETE FROM `spell_proc_event` WHERE `entry` IN ( 16880 );
INSERT INTO `spell_proc_event` VALUES
(16880,0,0,0,0,0,65536,0);
DELETE FROM `spell_proc_event` WHERE `entry` IN ( 40475 );
INSERT INTO `spell_proc_event` VALUES
(40475,0,0,0,0,0,524289,3);
DELETE FROM `spell_proc_event` WHERE `entry` IN ( 41434 );
INSERT INT... |
create table users (
id identity not null primary key ,
name varchar(45),
email varchar(45)
);
|
<reponame>marcoromagnolo/angularjs-java-postgres<gh_stars>0
DROP DATABASE IF EXISTS "dmt";
DROP DATABASE IF EXISTS "dmt-test"; |
<reponame>HeyBanditoz/mchelper
ALTER TABLE reminders ADD is_dm bool NOT NULL AFTER reminded;
|
<gh_stars>0
create table alunos_turmas(
id bigint(20) primary key auto_increment,
id_aluno bigint(20) not null references alunos,
id_turma bigint(20) not null references turmas
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into alunos_turmas(id_turma, id_aluno) values (1,1), (1,2), (1,3), (1,4), (1,5), (1,... |
<filename>shangcheng.sql
CREATE TABLE `sh_user` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(40) DEFAULT '',
`password` char(32) DEFAULT '',
`role_id` tinyint(4) DEFAULT '0',
`create_time` int(11) DEFAULT '0',
`update_time` int(11) DEFAULT '0',
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB ... |
/*
test
*/
select 1 |
create table jig_additional_resource
(
id uuid primary key not null default uuid_generate_v1mc(),
jig_id uuid not null references jig (id) on delete cascade,
url text not null
);
|
-- @Description This is to test the reindex functionality of a database.
-- A user who owns a database should be able to reindex the database and all the tables in it
-- even if he does not own them and has no direct privileges on them.
DROP database IF EXISTS reindexdb2;
DROP role IF EXISTS test1;
DROP role IF EXISTS... |
CREATE PROCEDURE transaction_test1()
LANGUAGE plperl
AS $$
foreach my $i (0..9) {
spi_exec_query("INSERT INTO test1 (a) VALUES ($i)");
if ($i % 2 == 0) {
spi_commit();
} else {
spi_rollback();
}
}
$$;
CALL transaction_test1();
|
<reponame>joao-neves95/Exercises_Challenges_Courses
/* QUERIES: */
-- GET country_id WITH THE country_name:
SELECT country_id
FROM country
USE INDEX(country_name_idx)
WHERE country_name = 'United States';
-- GET USER ID WITH THE USERNAME:
SELECT user_id
FROM auth
USE index(user_name_idx)
WHERE user_name = 'afteptelle... |
CREATE OR REPLACE FUNCTION ancestor_forums(
root_id INTEGER
) RETURNS TABLE (
id INTEGER
) AS $ancestor_forums$
WITH RECURSIVE ancestors AS (
SELECT
forum.id,
forum.parent_forum_id
FROM forum
WHERE forum.id = root_id
UNION ALL
SELECT
parent.id,
parent.parent_forum_id
... |
-- SETUP DATABASE
CREATE DATABASE IF NOT EXISTS `mmci_main`;
USE `mmci_main`;
-- REQUIRED TABLES
CREATE TABLE IF NOT EXISTS `branch` (
`branch_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
`branch_code` VARCHAR(30) NOT NULL DEFAULT '',
`branch_name` VARCHAR(150) NOT NULL DEFAULT '',
INDEX... |
<reponame>CSC-IT-Center-for-Science/antero
USE [VipunenTK_DW]
GO
/****** Object: View [dbo].[v_f_4_2_Vaeston_koulutusrakenne_ja_paaasiallinen_toiminta] Script Date: 5.5.2022 20:45:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dbo].[v_f_4_2_Vaeston_koulutusrakenne_ja_paaasiallinen_toi... |
delete from eg_roleaction where actionid = (select id from eg_action where name ='WaterTaxConnectionDataEntry-edit' and contextroot='wtms');
delete from eg_action where name ='WaterTaxConnectionDataEntry-edit' and contextroot='wtms';
Insert into EG_ACTION (id,name,url,queryparams,parentmodule,ordernumber,displayname,e... |
<reponame>EitanBlumin/FilterParseSearchParameters
/*
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 ... |
<reponame>hekailiang/actor-server<filename>actor-persist/src/main/resources/sql/migration/V21__AddStateToHistoryMessage.sql
ALTER TABLE history_messages ADD COLUMN state int NOT NULL default 1;
ALTER TABLE history_messages DROP COLUMN is_read;
ALTER TABLE dialogs ADD COLUMN state int;
CREATE INDEX ON history_messages(... |
<reponame>StanEgo/ego-stan<filename>labs/rdb-mesh/ide/aspects-in-pg/data/index.sql
-- God user --------------------------------------------------------------------
INSERT INTO mesh.entity VALUES('user-origo', 'user-origo');
INSERT INTO security.user VALUES('user-origo', 'origo');
-- Relations -------------------------... |
<reponame>Cacaonut/openmaptiles
-- This statement can be deleted after the water importer image stops creating this object as a table
DO
$$
BEGIN
DROP TABLE IF EXISTS osm_ocean_polygon_gen1 CASCADE;
EXCEPTION
WHEN wrong_object_type THEN
END;
$$ LANGUAGE plpgsql;
-- etldoc: osm_ocean_polygon... |
<reponame>Wiki-fan/MIPT-all
create or replace procedure add_Picture (
NName varchar,
NDescription varchar,
NWidth int,
NHeight int,
Nartist_name varchar,
Nuploader_nickname varchar,
NDateCreated date
) as
id_ int;
aid_ int;
uid_ int;
tmp int;
begin
select COUNT(*) into tmp from Pictures where NNam... |
# --- !Ups
CREATE TABLE products (
id long,
ean long,
name varchar,
description varchar
);
CREATE TABLE warehouses (
id long,
name varchar
);
CREATE TABLE stock_items (
id long,
product_id long,
warehouse_id long,
quantity long
);
INSERT INTO PRODUCTS (ID,EAN,NAME,DESCRIPTION) VALUES (1,12345,'... |
<reponame>DacinTitus/cs340_group15
-- Queries containing : denote variables that will have data from the backend programming language
-- similar to the example for the project step page
-- Classes --
-- Get all Classes IDs, Teachers IDs, and names to populate the Classes page
SELECT classId, teacherId, name FRO... |
<reponame>SadyChowdhury1/Assignment1
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 17, 2022 at 12:42 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";
... |
<filename>apna_school.sql
CREATE DATABASE apna_school;
use apna_school;
CREATE TABLE student (
id VARCHAR(50),
name VARCHAR(50),
age VARCHAR(50),
department VARCHAR(50),
grade INT
);
CREATE TABLE teacher (
id VARCHAR(50),
name VARCHAR(50)... |
CREATE TABLE IF NOT EXISTS vendors(
id serial PRIMARY KEY,
raw jsonb
);
CREATE INDEX IF NOT EXISTS vendors_indexginp ON vendors USING GIN (raw jsonb_path_ops);
CREATE UNIQUE INDEX IF NOT EXISTS vendors_name_unique ON vendors(
(raw ->> 'id'));
|
<filename>medium/_02_xtests/cases/cat4.sql
autocommit off;
call login('dba', '') on class db_user;
create class foo04;
alter class foo04 add method m_fa(int, varchar(10)) foo04;
select *
from db_meth_arg
where class_name = 'foo04' and meth_name = 'm_fa' and meth_type = 'INSTANCE'
order by index_of;
alter class foo04... |
-- @testpoint:opengauss关键字Immediate(非保留),作为角色名
--关键字不带引号-成功
drop role if exists Immediate;
create role Immediate with password '<PASSWORD>' valid until '2020-12-31';
drop role Immediate;
--关键字带双引号-成功
drop role if exists "Immediate";
create role "Immediate" with password '<PASSWORD>' valid until '2020-12-31';
drop r... |
use TelerikAcademy;
select * from Employees
where ManagerID is null; |
<reponame>theostanton/guided
create table rides
(
id varchar(128) not null
constraint rides_pk
primary key,
guide varchar(128) not null
constraint rides_guides_id_fk
references guides
on delete cascade,
owne... |
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.23)
# Database: hcmi_20032020
# Generation Time: 2020-03-26 02:39:28 +0000
# *****************************************... |
SET search_path = tasker, pg_catalog ;
CREATE TABLE dt_user_token (
updated_dt timestamp with time zone NOT NULL,
user_id integer NOT NULL,
idle_timeout integer NOT NULL,
token text NOT NULL,
CONSTRAINT dt_user_token_pk PRIMARY KEY ( user_id ) ) ;
ALTER TABLE dt_user_token OWNER TO tasker_owner ;
... |
/* List all words guessed */
SELECT letters
FROM word;
/* Count all correct words guessed */
SELECT COUNT(id)
AS correct_words
FROM word
WHERE is_word = TRUE;
/* Count all incorrect words guessed */
SELECT COUNT(id)
AS incorrect_words
FROM word
WHERE is_word = FALSE;
/* List all wo... |
declare @i int = 0
declare @totalLines int = 500
declare @date datetime = GETDATE();
declare @minutes tinyint
declare @level varchar(10)
declare @serverName varchar(50)
declare @errorMsg varchar(100)
-- random error messages
declare @texts as table(id int identity(1,1), msg varchar(500))
insert @texts(msg)
select '... |
SET DEFINE OFF;
ALTER TABLE AFW_12_SESN ADD (
CONSTRAINT AFW_12_SESN_FK3
FOREIGN KEY (REF_LANG)
REFERENCES AFW_01_LANG (SEQNC)
ENABLE VALIDATE)
/
|
/*
Author: This code was generated by DALGen version 1.1.0.0 available at https://github.com/H0r53/DALGen
Date: 10/19/2018
Description: Creates the page table and respective stored procedures
*/
USE ballhouseandcottages;
-- ------------------------------------------------------------
-- Drop existing objects... |
insert into CUSTOMER values (1, 'John')
select STUFF from ACCOUNT where ACCOUNT_NO = ?
select * from ACCOUNT
select * from CUSTOMER
select * from ACCOUNT where ACCOUNT_ID is null
select * from ACCOUNT where ACCOUNT_NO = ?
|
<filename>server/midlib/SessionRedis/sql/t_monitor_stuff.sql
CREATE TABLE "t_monitor_stuff" (
"id" char varying (40) DEFAULT uuid_generate_v4() not null primary key
, "item_name" char varying (240) not null
, "event_to_raise" char varying (240) not null
, "delta_t" char varying (240) not null ... |
<reponame>subhojit777/questionnaire-rs
ALTER TABLE questions ADD user_id INT NOT NULL;
|
<gh_stars>10-100
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `#__catalog_product_entity`;
CREATE TABLE `#__catalog_product_entity` (
`entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
`attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT '0' COM... |
select 0::bigint::timestamp9;
select 9223372036854775807::timestamp9;
select '2019-09-19 08:30:05.123456789 +0200'::timestamp9;
select '2019-09-19 08:30:05.123456789-0200'::timestamp9;
select '2019-09-19 08:30:05.123456789+02:00'::timestamp9;
select '2019-09-19 08:30:05.123456789 -02:00'::timestamp9;
select '2019-09-19... |
-- file:foreign_data.sql ln:249 expect:true
ALTER USER MAPPING FOR public SERVER s4 OPTIONS (ADD modified '1')
|
CREATE FUNCTION foo(integer, integer) RETURNS integer
AS $$ select $1 + $2; $$
LANGUAGE SQL; |
DELIMITER $$
CREATE PROCEDURE getRandDataToTwoTables1()
BEGIN
DECLARE ІмяСпів VARCHAR(100) DEFAULT NULL;
DECLARE ІмяСпівроб NVARCHAR(50);
DECLARE flag INT DEFAULT 0;
DECLARE counter SMALLINT;
DECLARE rand INT ;
DECLARE sqlCommand VARCHAR(400);
DECLARE smh VARCHAR(400);
DECLAR... |
-- Table CDH_VERSION for classes [org.apache.hadoop.hive.metastore.model.MVersionTable]
CREATE TABLE CDH_VERSION
(
VER_ID bigint NOT NULL,
SCHEMA_VERSION nvarchar(127) NOT NULL,
VERSION_COMMENT nvarchar(255) NOT NULL
);
ALTER TABLE CDH_VERSION ADD CONSTRAINT CDH_VERSION_PK PRIMARY KEY (VER_ID);
INSERT INT... |
select count(*) from no_nulls where rowid is not null
99
|
select pv.name as "PV Name",
pvc.name as "PVC Name",
sq.total as "Pod count"
from pv, pvc,
(
SELECT pm.pvc_uid as uid, count(pm.pod_uid) as total FROM pod_mount pm
GROUP BY pm.pvc_uid
) as sq WHERE pv.uid = pvc.pv_uid and pvc.uid = sq.uid;
|
<filename>test/mysql/f1db.circuits.pg.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.1
-- Dumped by pg_dump version 10.1
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... |
ALTER TABLE `jetpack_package` ADD `amo_id` INTEGER DEFAULT NULL;
ALTER TABLE `jetpack_packagerevision` ADD `amo_status` INTEGER DEFAULT NULL;
ALTER TABLE `jetpack_packagerevision` ADD `amo_version_name` VARCHAR(250) DEFAULT NULL;
|
<filename>openGaussBase/testcase/KEYWORDS/version/Opengauss_Function_Keyword_Version_Case0032.sql<gh_stars>0
-- @testpoint:opengauss关键字version(非保留),作为用户名
--关键字explain作为用户名不带引号,创建成功
drop user if exists version;
CREATE USER version PASSWORD '<PASSWORD>';
drop user version;
--关键字explain作为用户名加双引号,创建成功
drop user if exist... |
ALTER TABLE ATTENDANCEMONITORINGPOINT
ADD (
settings NCLOB
);
|
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 18, 2021 at 03:28 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>seed.sql
USE employees_db;
INSERT INTO department (name)
VALUES ("Systems"), ("QC"), ("Operations");
INSERT INTO role (title, salary, department_id)
VALUES ("Systems Tech", 100000, 1), ("Operations Manager", 300000, 3);
INSERT INTO employee (first_name, last_name, role_id, manager_id)
VALUES ("Connor", "... |
<filename>11. MySQL for PHP Devs - Exercises/queries.sql
SELECT * FROM posts;
SELECT * FROM users;
SELECT title, content FROM posts;
SELECT username, fullname FROM users;
SELECT username, fullname FROM users ORDER BY username ASC;
SELECT username, fullname FROM users ORDER BY fullname DESC, username DESC;
SELECT ... |
CREATE TABLE [dbo].[TurmaAlunos]
(
[Turma] INT NOT NULL,
[Aluno] INT NOT NULL,
CONSTRAINT [FK_TurmaAlunos_Turmas]
FOREIGN KEY ([Turma])
REFERENCES [Turmas]([Id]),
CONSTRAINT [FK_TurmaAlunos_Alunos]
FOREIGN KEY ([Aluno])
REFERENCES [Alunos]([Id])
)
|
<reponame>BearerPipelineTest/grocy
DELETE FROM user_settings
WHERE key IN ('night_mode_enabled', 'currently_inside_night_mode_range');
|
CREATE SEQUENCE OUTBOX_SEQ;
CREATE TABLE OUTBOX
(
ID NUMERIC(19, 0) NOT NULL PRIMARY KEY,
UUID VARCHAR(36) NOT NULL,
AKTOR_ID VARCHAR(20) NOT NULL,
FOEDSELSNUMMER VARCHAR(11) NOT NULL,
TYPE VARCHAR(10) NOT NULL, -- "VARSEL" or "DONE"
ATTEMPT ... |
CREATE PROCEDURE insertReturns
(
@page_num INT,
@return_num INT
)
AS
UPDATE page SET returned = @return_num WHERE page_number = @page_num;
GO |
<filename>server/db/seed.sql
DELETE FROM alternatives_objectives;
DELETE FROM alternatives;
DELETE FROM objectives;
DELETE FROM cases;
/* Users */
INSERT INTO users VALUES(1, '<EMAIL>', 'Bob');
/* Cases */
INSERT INTO cases VALUES(1, 1, 'Jobs', '2016-12-17', NULL);
INSERT INTO cases VALUES(2, 1, 'Cars', '2016-12-17'... |
<filename>api/db/migrations.sql
CREATE DATABASE weather;
\c weather
CREATE TABLE users(
id SERIAL PRIMARY KEY,
username VARCHAR(32) UNIQUE,
password_digest VARCHAR(60)
);
CREATE TABLE cities(
id SERIAL PRIMARY KEY,
cityname VARCHAR(255),
countrycode VARCHAR(10),
user_id INT REFERENCES users(id)
); |
<gh_stars>10-100
ALTER TABLE user__user
ADD FULLTEXT(`first_name`,`last_name`,`short_bio`,`screen_name`);
ALTER TABLE contest__proposal_attribute
ADD FULLTEXT(`string_value`);
ALTER TABLE contest__contest
ADD FULLTEXT(`description`);
ALTER TABLE comment__comment
ADD FULLTEXT(`content`);
|
USE [VipunenTK_DW]
GO
/****** Object: View [dbo].[v_f_2_10_Korkeakouluopiskelijoiden_aikaisempi_koulutus] Script Date: 25.7.2017 13:50:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dbo].[v_f_2_10_Korkeakouluopiskelijoiden_aikaisempi_koulutus] AS
SELECT
tilastointivuosi = [t... |
create or replace package ut_binary#
is
procedure run;
end ut_binary#;
/
create or replace package body ut_binary#
is
procedure test (
i_descn varchar2
,i_exp pls_integer
,i_act pls_inte... |
<filename>src/test/resources/fallocate.test_13.sql
-- fallocate.test
--
-- execsql { VACUUM }
VACUUM |
<filename>packages/storyboard-examples/src/db.sql<gh_stars>100-1000
-- DROP DATABASE storyboard
CREATE DATABASE storyboard
WITH ENCODING='UTF8'
CONNECTION LIMIT=-1;
-- DROP TABLE "logEntries";
CREATE TABLE IF NOT EXISTS "logEntries"
(
-- Common to stories and logs
id serial NOT NULL,
"hubI... |
<filename>modules/boonex/snipcart/updates/9.0.3_9.0.4/install/sql/enable.sql<gh_stars>100-1000
-- PAGES
DELETE FROM `sys_pages_blocks` WHERE `object`='bx_snipcart_view_entry' AND `title`='_bx_snipcart_page_block_title_entry_context';
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`,... |
<reponame>hiepha/vls<filename>vlls-back/dbscripts/data/04_category.sql
-- category --
INSERT INTO category (id, name, description) VALUES (1, 'Architecture', 'Architecture');
INSERT INTO category (id, name, description) VALUES (2, 'Art', 'Art');
INSERT INTO category (id, name, description) VALUES (3, 'Design', 'Design... |
-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64)
--
-- Host: localhost Database: oa
-- ------------------------------------------------------
-- Server version 5.7.23-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES... |
<filename>populate_comic.sql<gh_stars>0
/************************************************************************************************************
Name: Comic Database Test Script
Description: Handles populating the database with test data to test system functionality.
Authors: <NAME>
*****************... |
-- SQLite3
CREATE TABLE packages(
cd_pack integer primary key autoincrement not null unique,
nm_pack text not null unique,
vl_shell text not null
);
CREATE TABLE extpackages(
cd_extp integer primary key autoincrement not null unique,
nm_pack text not null unique,
vl_link text not null unique,
... |
<filename>Cheburashka/Tests/TestScripts/CheckUniqueKeysAreNotDuplicated_MixedCaseRule/CheckUniqueKeysAreNotDuplicatedRule_Table_WithAnIncludedUniqueConstraintAndIndex.sql
CREATE TABLE dbo.CheckUniqueKeysAreNotDuplicatedRule_Table_WithAnIncludedUniqueConstraintAndIndex
( A int not null
, B int null
, ... |
<gh_stars>1-10
alter table food_tag add index idx_food_id_type_tag_id(food_id, tag_id, ingredient_type); |
<reponame>compty001/lemon
-------------------------------------------------------------------------------
-- cms template catalog
-------------------------------------------------------------------------------
CREATE TABLE CMS_TEMPLATE_CATALOG(
ID BIGINT NOT NULL,
TYPE VARCHAR(50),
NAME VARCHAR(50),
... |
<reponame>kevinconroy/girl-scout-registrar
SET GLOBAL group_concat_max_len = 10000000;
SET session group_concat_max_len=10000000;
use girlscouts;
insert into roster (su, troop_id, role, first, last, email) values
("SU 32-1", "02078", "First Aider", "Kelli", "Giffin", "<EMAIL>"),
("SU 32-1", "02078", "Troop Money Mana... |
<reponame>summakarn/ced-siacois<filename>sumsaha-myedit-cascade.sql
-- -----------------------------------------------------
-- Schema sumsaha
-- -----------------------------------------------------
DROP SCHEMA IF EXISTS `sumsaha` ;
-- -----------------------------------------------------
-- Schema sumsaha
-- -------... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.4
-- Dumped by pg_dump version 9.5.4
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.