sql stringlengths 6 1.05M |
|---|
<filename>webserver/app-moe/sql/Archive/3.9.x/3.9.4/POCOR-3772/rollback.sql
-- security_group_areas
DROP TABLE IF EXISTS `security_group_areas`;
RENAME TABLE `z_3772_security_group_areas` TO `security_group_areas`;
-- security_group_institutions
DROP TABLE IF EXISTS `security_group_institutions`;
RENAME TABLE `z_377... |
<filename>Mehul/21_11_2018/webtech_mehul.sql
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 21, 2018 at 11:32 AM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
... |
<reponame>unhide-ecommerce/shopify_source<filename>dbt_packages/fivetran_utils/integration_tests/macros/get_fill_staging_columns_columns.sql
{% macro get_fill_staging_columns_columns() %}
{% set columns = [
{"name": "column_date", "datatype": "date"},
{"name": "column_string", "datatype": dbt_utils.type_string... |
<gh_stars>1-10
alter table plans."part_0" add check ( substr(id, 1, 1) = '0' );
alter table plans."part_1" add check ( substr(id, 1, 1) = '1' );
alter table plans."part_2" add check ( substr(id, 1, 1) = '2' );
alter table plans."part_3" add check ( substr(id, 1, 1) = '3' );
alter table plans."part_4" add check ( substr... |
<reponame>egessel/omegaup
ALTER TABLE
`Courses`
ADD COLUMN
`level` enum('introductory', 'intermediate', 'advanced') NULL DEFAULT NULL AFTER `acl_id`; |
<reponame>jirimicvl/PHP-MAMP
-- phpMyAdmin SQL Dump
-- version 5.1.3
-- https://www.phpmyadmin.net/
--
-- Host: db
-- Generation Time: May 08, 2022 at 12:05 PM
-- Server version: 8.0.28
-- PHP Version: 8.0.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
-- Database generated with pgModeler (PostgreSQL Database Modeler).
-- pgModeler version: 0.8.2-beta1
-- PostgreSQL version: 9.5
-- Project Site: pgmodeler.com.br
-- Model Author: ---
-- Database creation must be done outside an multicommand file.
-- These commands were put in this file only for convenience.
-- -- o... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 14, 2019 at 04:12 AM
-- 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";
/*!40101 SET @OLD... |
<gh_stars>0
USE [FormWebcamJs]
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' AND TABLE_NAME='Pessoa')
BEGIN
CREATE TABLE [dbo].[Pessoa](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[Nome] [nvarchar](50) NOT NULL,
[DataNascimento] [datetime] NOT NULL,
[Email] [nvarchar](50) NO... |
Insert into eg_roleaction values((select id from eg_role where name='Payment Creator'),(select id from eg_action where name='recovery-crud'));
update eg_action set displayname = 'Deduction Detailed Report' where displayname = 'Pending TDS';
update eg_action set displayname = 'Deductions Remittance Summary' wher... |
CREATE TABLE [dbo].[Classroom]
(
[ID] BIGINT IDENTITY (1,1) NOT NULL,
[School] BIGINT NOT NULL,
[Level] BIGINT NOT NULL,
[Name] NVARCHAR(MAX) NULL,
[Year] BIGINT NULL,
[Creation] DATETIME NULL,
[Exclusion] DATETIME NULL,
CONSTRAINT [P... |
begin
dbms_lock.sleep(2);
raise_application_error(-20000, 'teste');
end;
/ |
CREATE TABLE IF NOT EXISTS `stats_time` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`time` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=62 DEFAULT CHARSET=latin1; |
<reponame>sebschlicht/com_nuliga
DROP TABLE IF EXISTS `#__nuliga_teams`;
DROP TABLE IF EXISTS `#__nuliga_leagueteams`;
DROP TABLE IF EXISTS `#__nuliga_matches`;
|
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 23, 2020 at 06:07 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- file:identity.sql ln:237 expect:true
CREATE TYPE itest_type AS (f1 integer, f2 text, f3 bigint)
|
<reponame>antonshulpekov/millix-node
PRAGMA foreign_keys= off;
BEGIN TRANSACTION;
UPDATE schema_information SET value = "7" WHERE key = "version";
INSERT INTO node_attribute_type (attribute_type_id, attribute_type) VALUES ('useBqrZ9F8Gv6aVH85pB', 'peer_rotation_settings');
INSERT INTO node_attribute (node_id, attribu... |
CREATE TABLE IF NOT EXISTS faqoff_entry_accesslog (
logid BIGSERIAL PRIMARY KEY,
entry BIGINT REFERENCES faqoff_entry (entryid),
account BIGINT, -- Masked user account ID
ipaddr TEXT, -- Masked IPv4 or IPv6 address
uagent TEXT, -- Hash of the HTTP User Agent
hittime TIMESTAMP DEFAULT NOW()
);
C... |
for x in
(select seq_id, c001 from apex_collections
where collection_name = 'ORDER' and c001 = :P12_PRODUCT_ID)
loop
apex_collection.delete_member(p_collection_name => 'ORDER', p_seq => x.seq_id);
--htp.p('removed an item');
end loop; |
DELIMITER /
INSERT INTO KRIM_ROLE_PERM_ID_BS_S VALUES(NULL)
/
INSERT INTO KRIM_ROLE_PERM_T
(ROLE_PERM_ID,ROLE_ID,PERM_ID,ACTV_IND,VER_NBR,OBJ_ID) VALUES
((SELECT (MAX(ID)) FROM KRIM_ROLE_PERM_ID_BS_S),(SELECT ROLE_ID FROM KRIM_ROLE_T WHERE ROLE_NM = 'IACUC Administrator' AND NMSPC_CD='KC-UNT'),
(SELECT PERM_ID FROM KRI... |
# Time: O(n)
# Space: O(n)
SELECT product_id,
Min(year) AS first_year,
quantity,
price
FROM sales
GROUP BY product_id
ORDER BY NULL
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- 主机: localhost
-- 生成日期: 2021-05-26 13:30:33
-- 服务器版本: 5.5.42
-- PHP 版本: 7.4.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<filename>sql/V10.8.6__startfactor.sql
alter table sin drop if exists start_factor;
alter table scoring add start_factor numeric null; |
<filename>src/lms-ds-loader/edfi_lms_ds_loader/scripts/mssql/0006_create_section_association_tables.sql
-- 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 ... |
-- Dumping structure for table db_fleet_ticket.language
DROP TABLE IF EXISTS `language`;
CREATE TABLE IF NOT EXISTS `language` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`phrase` varchar(100) NOT NULL,
`english` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=437 DEFAULT CHARSET=u... |
-- ************************************** `Customer`
CREATE TABLE `Customer`
(
`customer_id` int NOT NULL AUTO_INCREMENT ,
`organisation_or_person` varchar(40) NOT NULL COMMENT 'Tên tổ chức hoặc tên người ' ,
`organisation_or_name` varchar(40) NOT NULL COMMENT ' Tên tổ chức ' ,
`gender` varchar(40) NOT NULL CO... |
CREATE TABLE prices (
sid integer NOT NULL,
date date NOT NULL,
vol integer NOT NULL,
price numeric(20,6) NOT NULL,
CONSTRAINT pk_prices PRIMARY KEY (sid, date),
CONSTRAINT fk_prices_securities FOREIGN KEY(sid) REFERENCES securities(id)
);
|
<filename>MySQL/SQL/Basic Select/Weather Observation Station 9/solution.sql
SELECT DISTINCT CITY FROM STATION WHERE CITY NOT REGEXP '^[aeiouAEIOU]'
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Авг 17 2020 г., 21:46
-- Версия сервера: 5.7.25
-- Версия PHP: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... |
CREATE TABLE [dbo].[Organisation_Site]
(
[ID] UNIQUEIDENTIFIER CONSTRAINT [DF_Organisation_Site_ID] DEFAULT (newid()),
[OrganisationID] UNIQUEIDENTIFIER NOT NULL,
[SiteID] UNIQUEIDENTIFIER NOT NULL,
[OrganisationRoleID] UNIQUEIDENTIFIER NOT NULL,
[StartDate] DATE NULL,
[EndDat... |
<reponame>Amitchaudhary9648/OnlineCompiler
create user 'test' IDENTIFIED BY '<PASSWORD>';
create database ri_db;
grant all privileges on ri_db.* to 'test';
|
<filename>misc/demodata/takeawayDB_public_item_categories.sql
INSERT INTO public.item_categories (id, date_created, date_modified, category_code, parent_category_id) VALUES ('0d28b2d0-39e9-4cc7-8389-7e72942ed814', '2022-02-16 23:09:49.000000', '2022-02-16 23:09:49.000000', 100000000, null);
INSERT INTO public.item_cate... |
CREATE DATABASE IF NOT EXISTS bankdb;
USE bankdb;
DROP TABLE IF EXISTS accounts;
CREATE TABLE accounts (
id int NOT NULL AUTO_INCREMENT,
accountName varchar(45) NOT NULL,
accountNumber int NOT NULL UNIQUE,
balance double NOT NULL,
PRIMARY KEY (id)
)ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin... |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50721
Source Host : localhost:3306
Source Database : readbook
Target Server Type : MYSQL
Target Server Version : 50721
File Encoding : 65001
Date: 2018-04-08 13:14:03
*/
SET FOREIGN_KEY_CHECKS=0;... |
<gh_stars>0
CREATE TABLE [dbo].[stateMachine] (
[stateMachineId] UNIQUEIDENTIFIER NOT NULL,
[createtime] DATETIME CONSTRAINT [DF_stateMachine_createtime] DEFAULT (getdate()) NOT NULL,
[stateMachineName] VARCHAR (33) NOT NULL,
[stateMachineDescription] NVARCHAR (... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 25, 2019 at 05:49 PM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
<filename>Exam 21.06.2020/04. Delete.sql
DELETE AccountsTrips
WHERE AccountId=47
|
sum(if(a.kriteria_id=8,a.bobot,0)) as wa,
sum(if(a.kriteria_id=9,a.bobot,0)) as wb,
sum(if(a.kriteria_id=10,a.bobot,0)) as wc
sum(if(a.kriteria_id=11,a.bobot,0)) as wd,
sum(if(a.kriteria_id=12,a.bobot,0)) as we,
sum(if(a.kriteria_id=13,a.bobot,0)) as wf,
sum(if(a.kriteria_id=14,a.bobot,0)) as wg,
sum(if(a.kriteria_id... |
Select name from City
where CountryCode='USA' and population > 120000;
|
<filename>server/sql/users.sql
CREATE TABLE IF NOT EXISTS app.users (
_id SERIAL PRIMARY KEY,
email VARCHAR(500) UNIQUE NOT NULL,
name VARCHAR(255) NOT NULL,
pwd VARCHAR(255) NOT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP
);
|
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5478480_sys_gh2956_drop_allowconsolidateinvoice.sql
--dropping column
alter table c_bpartner drop column allowconsolidateinvoice; |
<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/RELEASE-SCRIPTS/KC-RELEASE-3_2-SCRIPT/KC-RELEASE-3_2-Demo-MYSQL.sql
\. ./../../current_mysql/4.0/dml/KC_DML_32001_KRACOEUS-4937_0TSD.sql
\. ./../../current_mysql/4.0/dml/KC_DML_32001_KRACOEUS-5144_00SD.sql
commit;
exit
|
CREATE TABLE pix_keys (
id UUID PRIMARY KEY NOT NULL,
client_id UUID NOT NULL,
key varchar(77) UNIQUE,
type_key varchar(20) NOT NULL,
type_account varchar(30) NOT NULL
); |
create table chk.SportBase
(
SportBaseId int identity not null,
SportBaseName varchar(50) not null,
CreatedAt datetimeoffset default sysdatetimeoffset() not null,
constraint PK_SportBase primary key (SportBaseId)
) |
### database
CREATE DATABASE IF NOT EXISTS tdx DEFAULT CHARACTER SET utf8mb4;
CREATE USER 'user'@'%' IDENTIFIED BY 'Password';
grant all privileges on *.* to 'user'@'%';
create database tdx character set utf8mb4;
USE tdx;
### tables
###
### 999999 上证指数 日线 前复权
### 日期 开盘 最高 最低 收盘 成交量 成交额
... |
select id, cedula,equipo_computo, fecha_creacion,fecha_entrega,estado
from tb_solicitud_prestamo where cedula = :cedula and estado != 0
|
<filename>horx-wdf-launcher/horx-wdf-web/src/main/resources/sql/mysql/sys_ddl.sql
/*==============================================================*/
/* DBMS name: MySQL */
/*==============================================================*/
/*=================================... |
<filename>hasura/migrations/default/1579197292118_rename_table_public_reviewstate/up.sql
alter table "public"."reviewstate" rename to "reviewstates"; |
<filename>queries/temprerature.sql<gh_stars>1-10
SELECT
icu.icustay_id,
CASE
WHEN ce.itemid IN (223762, 676, 677) THEN ce.valuenum -- celsius
WHEN ce.itemid IN (223761, 678, 679) THEN (ce.valuenum - 32) * 5 / 9 --fahrenheit
END
AS temperature,
ce.charttime
FROM `ph... |
<reponame>Jawshua/pg-bifrost
CREATE TABLE customers (id serial primary key, first_name text, last_name text);
CREATE TABLE inventory (id serial primary key, name text);
CREATE TABLE passwords (id serial primary key, password text);
INSERT INTO customers (first_name, last_name) VALUES ('Hello', 'World');
INSERT INTO in... |
CREATE TABLE news (
newsId INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
userId INTEGER NOT NULL,
title VARCHAR(255) NOT NULL,
slug VARCHAR(255) NOT NULL,
content TEXT NOT NULL,
description TEXT NOT NULL,
keywords TEXT,
layout VARCHAR(255) DEFAULT NULL,
image VARCHAR(255) DEFAULT NULL,
lead TEXT,
p... |
<reponame>D13xxx/dien-may-thanh-loi
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th10 01, 2019 lúc 12:44 PM
-- Phiên bản máy phục vụ: 10.3.16-MariaDB
-- Phiên bản PHP: 7.1.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRAN... |
<filename>vendor/phing/phing/test/etc/tasks/ext/dbdeploy/changelog.sql<gh_stars>1-10
--
-- Table structure for table `changelog`
--
DROP TABLE IF EXISTS `changelog`;
CREATE TABLE `changelog` (
`change_number` bigint(20) NOT NULL,
`delta_set` varchar(10) NOT NULL,
`start_dt` timestamp NOT NULL DEFAULT CURRENT_TI... |
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字Case(保留),作为用户组名
--关键字不带引号-合理报错
drop group if exists Case;
create group Case with password '<PASSWORD>';
--关键字带双引号-成功
drop group if exists "Case";
create group "Case" with password '<PASSWORD>';
--清理环境
drop group "Case";
--关键字带单引号-合理报错
drop group if exists '... |
<reponame>todorkrastev/softuni-software-engineering<filename>DBMS/M01_MySQL/L06_SubqueriesAndJOIN/Exercises/Solutions/P01_EmployeeAddress.sql
USE `soft_uni`;
SELECT
e.`employee_id`,
e.`job_title`,
a.`address_id`,
a.`address_text`
FROM
`employees` AS e
JOIN
`addresses` AS a ON e.`addres... |
<filename>sql/truncate_table_token.sql
USE db;
TRUNCATE TABLE token;
|
ALTER TABLE `Team_Competing_In_Rel` ADD `number` SMALLINT UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `TEAM` DROP COLUMN `number`;
|
CREATE DATABASE IF NOT EXISTS `llmm_main` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `llmm_main`;
-- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86)
--
-- Host: localhost Database: llmm_main
-- ------------------------------------------------------
-- Server version 5.6.20
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... |
CREATE USER Project2_Cheese IDENTIFIED BY Shawn DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp QUOTA 10M ON users;
GRANT connect, resource, create session, create table, create view to Project2_Cheese;
CREATE TABLE Cheese (
Id INT Primary Key NOT NULL,
Name VARCHAR2 (50) NOT NULL,
Stock INT
);
INSERT ... |
<reponame>america/DbUtil<filename>dbutil/sql/select_all_msg.sql
SELECT
NO,
CONTENTS
FROM
table_name
|
declare @RetRes integer
execute @RetRes = master.dbo.xp_create_subdir '$(JobLogDir)'
if @RetRes<>0
raiserror('master.dbo.xp_create_subdir for JobLogDir failed.', 16, 1)
execute @RetRes = master.dbo.xp_create_subdir '$(WmiXmlDir)'
if @RetRes<>0
raiserror('master.dbo.xp_create_subdir for WmiXmlDir failed.', 1... |
-- Name: example-095e5b71-0dbd-4290-8bf9-42aa2e3cfbe0
-- Date: 4/29/2018 8:50:45 PM
-- Author: BaoChau
----------------------------
-- Migration up goes here.
----------------------------
CREATE TABLE core_index_column_transformation (
[Id] UNIQUEIDENTIFIER PRIMARY KEY DEFAULT NEWID(),
[EntityId] UNIQUEIDENTIFIER NO... |
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50638
Source Host : localhost:3306
Source Schema : demo
Target Server Type : MySQL
Target Server Version : 50638
File Encoding : 65001
Date: 28/12/2018 ... |
create table device_profile (
created_at timestamp with time zone not null,
updated_at timestamp with time zone not null,
device_profile_id uuid primary key,
supports_class_b boolean not null,
class_b_timeout integer not null,
ping_slot_period integer not null,
ping_slot_dr integer ... |
<reponame>Campbellony/X12SqlServer<gh_stars>1-10
-- =============================================
-- Author: <NAME>
-- Create date: 20180930
-- Description: Creates user friendly output of
-- how enveloping has been setup for a transaction
-- =============================================
CREATE PROCEDURE [dbo].[usp_E... |
<reponame>uk-gov-mirror/UKHomeOffice.RefData
CREATE TABLE intelligenceservicelevelagreement (
id INTEGER NOT NULL PRIMARY KEY,
description VARCHAR(200),
limitinhours INTEGER,
validfrom TIMESTAMP WITH TIME ZONE,
validto TIMESTAMP WITH TIME ZONE,
updatedby VARCHAR(60) NULL
);
-- Table comment
COMMENT ON TABL... |
<gh_stars>1-10
IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = N'roles' AND type = 'U')
BEGIN
CREATE TABLE dbo.roles
(id int PRIMARY KEY IDENTITY(1,1) NOT NULL,
name varchar(100) NULL)
END;
IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = N'users' AND type = 'U')
BEGIN
CREATE TABLE dbo.users
(id int... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 01, 2021 at 10:10 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- Removes unused indexes found in the cclf_beneficiaries table
BEGIN;
DROP INDEX IF EXISTS idx_cclf_beneficiaries_bb_id;
DROP INDEX IF EXISTS idx_cclf_beneficiaries_mbi;
COMMIT; |
CREATE TABLE usuario (
userid int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
login varchar(100) NOT NULL,
pass varchar(200) NOT NULL
);
|
<filename>src/HatTrick.Model.MsSql/Sql/Trigger.sql<gh_stars>0
select
sys.objects.name as trigger_name,
sys.objects.object_id,
sys.schemas.name as schema_name,
sys.tables.object_id as table_object_id,
sys.tables.name as table_name,
sys.triggers.is_disabled,
sys.triggers.is_instead_of_trigger,
STUFF((select ',' + te.type... |
Insert into TEN_SUM_FIELD (ID,FIELD_IDENTIFIER,DISPLAY_NAME,MANDATORY,VISIBLE,CREATED,CREATOR,UPDATED,UPDATED_BY) values (1,'SalesPersonInformation','Information Sales',null,1,sysdate,'System',sysdate,'System');
Insert into TEN_SUM_FIELD (ID,FIELD_IDENTIFIER,DISPLAY_NAME,MANDATORY,VISIBLE,CREATED,CREATOR,UPDATED,UPD... |
select SUM(builds.build_finished-builds.build_started) from builds INNER JOIN repos ON repos.repo_id = builds.build_repo_id where repos.repo_project_id="bggtpasruna000doap4g" and builds.build_started>0 and builds.build_finished>0;
|
<gh_stars>1-10
-- =============================================
-- Create basic stored procedure template
-- =============================================
-- Drop stored procedure if it already exists
IF EXISTS (
SELECT *
FROM INFORMATION_SCHEMA.ROUTINES
WHERE SPECIFIC_SCHEMA = N'dbo'
AND SPECIFIC_NAME... |
--
-- 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")... |
<gh_stars>0
-- @Description UAOCS MVCC serial and 2 deletes
-- Transaction 1 of 2
--
insert into sto_uaocs_mvcc_status (workload, script) values('readserial_concurrentdelete', 't1_update_one_tuple');
begin;
select empno, ename from sto_uaocs_emp_formvcc_serial where sal = 18003;
delete from sto_uaocs_emp_formvcc_ser... |
-- @testpoint: reindex:schema
drop schema if exists index170 cascade;
create schema index170;
--建普通表
DROP TABLE if EXISTS index170.test_index_table_170 CASCADE;
create table index170.test_index_table_170(
c_int int
) WITH (ORIENTATION = row) partition by range(c_int)(
partition p1 values less than (100),
partition p2... |
<gh_stars>0
-- @testpoint: opengauss关键字ordinality(非保留),作为存储过程名,部分测试点合理报错
--关键字不带引号-成功
drop procedure if exists ordinality;
create procedure ordinality(
section number(6),
salary_sum out number(8,2),
staffs_count out integer)
is
begin
select sum(salary), count(*) into salary_sum, staffs_count from staffs where s... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 04, 2019 at 05:21 PM
-- Server version: 5.7.24
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
-- phpMyAdmin SQL Dump
-- version 4.7.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 30, 2018 at 02:23 PM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.1.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
DROP DATABASE IF EXISTS dateNight_db;
CREATE DATABASE dateNight_db
USE date_night_db;
CREATE TABLE users (
id INTEGER AUTO_INCREMENT NOT NULL,
user_name VARCHAR(18) NOT NULL,
first_name VARCHAR(18) NOT NULL,
last_name VARCHAR(18) NOT NULL,
password VARCHAR(18) NOT NULL,
date_of_birth DATE N... |
<filename>atividades/06-01_Create_Directory.sql<gh_stars>0
--esses comandos devem ser usados pelo usuario SYS com atribuicao SYSDBA
create directory UTL_FILE_BLOB as 'D:\Docs\Fatec\Programacao_Avancada_de_Banco_de_Dados\atividades\UTL_FILE_BLOB';
grant read, write on directory UTL_FILE_BLOB to public;
grant execute ... |
<reponame>adenova01/kerjapraktik
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 05 Apr 2021 pada 09.58
-- Versi server: 10.1.38-MariaDB
-- Versi PHP: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... |
CREATE DATABASE IF NOT EXISTS `ecommerce` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `ecommerce`;
-- MySQL dump 10.13 Distrib 8.0.25, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: ecommerce
-- ---------------------------------------------------... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 27, 2016 at 05:51 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=@@CHARACTER_SET_CLI... |
<gh_stars>0
-- http://static.typingclub.com/m/corp2/other/data-import-typingclub.pdf
select * from (
-- Elementary students
select
stu.id
as 'student-id',
tch.id
as 'class-id',
stu.sc
as 'school-id',
stu.fn
as 'first-name',
stu.ln
as 'last-name',
cast(stu.id as varchar) + '@example.org'
as 'username',... |
<filename>test.sql
ALTER TABLE `answer_award`
COMMENT='答题奖励';
ALTER TABLE `bureau`
COMMENT='闯关';
ALTER TABLE `bureau_question`
COMMENT='闯关与题目关系';
ALTER TABLE `choice_question`
COMMENT='选择题';
ALTER TABLE `question_bank`
COMMENT='标题';
ALTER TABLE `integral_product` COMMENT='积分产品';
alter table `integral_order` comme... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 04, 2020 at 12:43 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
/* DROP ALL Constraints */
/* These only need to be dropped after initial creation. Uncomment if it is after 2nd run */
/*ALTER TABLE `ProjectLocation` DROP FOREIGN KEY `CNSTR_ProjectLocation_Projects_FK`;
ALTER TABLE `ProjectLocation` DROP FOREIGN KEY `CNSTR_ProjectLocation_Countries_FK`;*/
/* DROP ALL Tables */
DR... |
INSERT INTO certifier VALUES
(1,'FSSC-FOOD','Comida Segura y Seguridad para todos'),
(2,'ISO 14001','Gestion Ambiental'),
(3,'ISO 20000','Gestion de Servicios de TI'),
(4,'ISO 21001','Gestion para Organizaciones Educativas: Requisitos con orientacion para su uso'),
(5,'ISO 22000','Gestion de la Segu... |
<filename>VS2013_PROJECT/DNN_DB/dbo/Stored Procedures/dnn_AddEventLogConfig.sql<gh_stars>1-10
CREATE procedure [dbo].[dnn_AddEventLogConfig]
@LogTypeKey nvarchar(35),
@LogTypePortalID int,
@LoggingIsActive bit,
@KeepMostRecent int,
@EmailNotificationIsActive bit,
@NotificationThreshold int,
@NotificationThresho... |
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [tSQLt].[Private_ApplyCheckConstraint]
@ConstraintObjectId INT
AS
BEGIN
DECLARE @Cmd NVARCHAR(MAX);
SELECT @Cmd = 'CONSTRAINT ' + QUOTENAME(name) + ' CHECK' + definition
FROM sys.check_constraints
WHERE object_id = @ConstraintObjectId;
... |
CREATE EXTERNAL SCALAR SCRIPT
vectorsize5000(A DOUBLE)
RETURNS VARCHAR(2000000) AS
# redirector @@redirector_url@@
retval = ''.join([str(i) for i in range(5000)])
def run(ctx):
return retval
/
CREATE EXTERNAL SCALAR SCRIPT
vectorsize(length INT, dummy DOUBLE)
RETURNS VARCHAR(2000000) AS
# redirector @@redirec... |
/*
INTERNAL:
Internal only.
TODO:
pretty sure I don't need @TargetDatabase defined in here at all...
*/
USE [admindb];
GO
IF OBJECT_ID('dbo.format_operation_xml','FN') IS NOT NULL
DROP FUNCTION dbo.[format_operation_xml];
GO
CREATE FUNCTION dbo.[format_operation_xml] (@Command nvarchar(MAX), @... |
CREATE TABLE [dbo].[AuditableAttribute] (
[Id] [int] NOT NULL
IDENTITY (1,1),
[AuditableEntityId] [int] NOT NULL,
[AttributeName] [nvarchar](50) NOT NULL,
[EnableAudit] [bit] NOT NULL
DEFAULT ((1))
,CONSTRAINT [PK_AuditableAttribute] PRIMARY KEY CLUSTERED ([Id])
)
GO
|
<reponame>JohnSasser/12-Employee-Tracking
DROP DATABASE IF EXISTS company_db;
CREATE DATABASE company_db;
USE company_db;
CREATE TABLE department(
id INTEGER auto_increment NOT NULL,
dp_name VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE role(
id INTEGER auto_increment NOT NULL,
title V... |
with users as (
select
id, government_uri, username, "createdAt", community_user.created_at as joined_date, community_user.disabled, community_user.is_manager, community_user.is_approver, agency_id, last_login, name,
coalesce(given_name, (string_to_array(trim(name), ' '))[array_lower(string_to_arra... |
<reponame>smnorris/cwf_fishpassage
-- create a table holding all distinct observation points for the species of interest
DROP TABLE IF EXISTS cwf.fish_obsrvtn_events_sar;
CREATE TABLE cwf.fish_obsrvtn_events_sar AS
SELECT
e.fish_obsrvtn_pnt_distinct_id,
e.linear_feature_id,
e.blue_line_key,
e.wscode_ltree,
e... |
DROP PROCEDURE MRESULTSET;
CREATE PROCEDURE MRESULTSET(DP1 INTEGER, DP2 INTEGER, DP3 INTEGER, DP4 INTEGER)
PARAMETER STYLE JAVA
LANGUAGE JAVA
READS SQL DATA
DYNAMIC RESULT SETS 2
EXTERNAL NAME 'com.ibatis.sqlmap.proc.DerbyProcs.selectRows'; |
CREATE TABLE "countryNames" (
"code" char(2) NOT NULL,
"locale" char(5) NOT NULL,
"name" varchar(60) NOT NULL,
"fullname" varchar(60) NOT NULL
)
INSERT INTO "countryNames" VALUES ('AD', 'de_DE', 'Andorra', '');
INSERT INTO "countryNames" VALUES ('AD', 'en_GB', 'Andorra', '');
INSERT INTO "countryNames" VALUES ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.