sql stringlengths 6 1.05M |
|---|
<gh_stars>0
SET QUOTED_IDENTIFIER ON;
IF NOT EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_NAME = 'CreateModifyTable'
AND ROUTINE_SCHEMA = 'SQLChange')
BEGIN
EXEC ('CREATE PROCEDURE SQLChange.CreateModifyTable AS BEGIN PRINT ''STUB FOR PROCEDURE'' ... |
<filename>EdFi.Ods.Utilities.Migration/Scripts/MsSql/02Upgrade/v25_to_v31/11 Create Constraints/41910 StaffEducationOrganizationContactAssociation [PK, IX, D].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 ... |
DROP SCHEMA IF EXISTS `sec_dev`;
CREATE SCHEMA `sec_dev`;
CREATE TABLE sec_dev.users(
username varchar(50) not null primary key,
password varchar(50) not null,
enabled boolean not null);
CREATE TABLE sec_dev.authorities (
username varchar(50) not null,
authority varchar(50) not null,
constraint fk_autho... |
-- get_repository_packages_digest returns the digest of all packages that
-- belong to the repository identified by the id provided.
create or replace function get_repository_packages_digest(p_repository_id uuid)
returns setof json as $$
select coalesce(json_object_agg(format('%s@%s', p.name, s.version), s.digest),... |
ALTER TABLE "courier_messages" ALTER COLUMN "nid" TYPE UUID, ALTER COLUMN "nid" DROP NOT NULL; |
WITH codes_map(term_id,term_code,term_name,unit_id,unit_code,unit_name,output_term_id,output_term_code,output_term_name,output_unit_id,output_unit_code,output_unit_name,taxa_field,term_quantity_modifier,term_modifier_value,unit_quantity_modifier,unit_modifier_value) AS (
VALUES (84,'SKI','skins',129... |
def Main =
block
SetStream (arrayStream [1,1,0,1,0])
one = Example
SetStream (arrayStream [0,1,0,1,0])
two = Example
def Example =
block
let ?be = UInt8 == 0
x = Word16
y = Word16
def Word16 =
block
let b1 = UInt8
let b2 = UInt8
if ?be then b1 # b2 else b2 # b1
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 22, 2021 at 05:50 PM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 7.3.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
create table produto (
codproduto int not null,
nome char(50) not null,
preco money not null,
qtdestoque int not null,
primary key(codproduto)
);
create table notafiscal (
numnota int not null,
valortotal money not null,
primary key(numnota)
);
create table itemnotafiscal (
numnota int not null,
c... |
<filename>1178185727/Core/Config.sql
--Code created by Chrisy15
UPDATE Map_GreatPersonClasses SET MaxWorldInstances = (MIN(16, (SELECT COUNT(ReligionType) FROM Religions WHERE RequiresCustomName = 0 AND Pantheon = 0))) WHERE GreatPersonClassType = 'GREAT_PERSON_CLASS_PROPHET';
CREATE TRIGGER IF NOT EXISTS C15_Pok_Reli... |
#
# copyright (c) Ionplus AG and contributors. all rights reserved.
# licensed under the mit license. see license file in the project root for details.
#
create table project_type (
name varchar(20) primary key,
sort_order int not null
) engine=innodb;
insert into project_type
values ('undefined', ... |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 24, 2018 at 06:33 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
INSERT INTO department (name)
VALUES (
'Sales'
),
(
'Finance'
),
(
'Engineer'
),
(
'Legal'
);
INSERT INTO role (title, salary, department_id)
VALUES (
'Sales Lead', 90000, 1
),
(
'Salesperson', 75000, 1
),
(
'Lead ... |
<filename>SpringBootMvcJspSecurityExample/src/main/resources/database/database.sql<gh_stars>0
DROP TABLE IF EXISTS `user_role_mapping`;
DROP TABLE IF EXISTS `userrole`;
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`createdDate` datetime DEFAULT NULL,
`enabled` tin... |
<filename>src/back/src/main/resources/schema/init.sql<gh_stars>0
create table if not exists project (
id bigint not null auto_increment primary key,
title varchar(30) not null default '',
author varchar(30) not null default '',
description varchar(100) not null default '',
project_path varchar(200) ... |
<filename>init_db.sql<gh_stars>0
--
-- PostgreSQL database cluster dump
--
SET default_transaction_read_only = off;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
--
-- Drop databases
--
--
-- Drop roles
--
DROP ROLE postgres;
--
-- Roles
--
CREATE ROLE postg... |
<reponame>ucdavis/FSNEP
ALTER TABLE [dbo].[FundTypeXUsers]
ADD CONSTRAINT [FK_FundTypeXUsers_FundTypes] FOREIGN KEY ([FundTypeID]) REFERENCES [dbo].[FundTypes] ([ID]) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
conn system/root
set linesize 250
set pagesize 100
spool C:\CHEN\OptRecuperaciones\logs\check_restore.log
PROMPT OBJECTS IN OWNERS
SELECT OWNER, COUNT(*)
FROM DBA_OBJECTS
WHERE OWNER IN ('CHEN', 'CHEN2')
GROUP BY OWNER;
PROMPT TABLE NAMES
SELECT OWNER OWN, TABLE_NAME
FROM DBA_TABLES
WHERE OWNER IN ('CHE... |
<filename>SmartStoreNET-3.x/src/Libraries/SmartStore.Data/Sql/Indexes.SqlServer.Inverse.sql
DROP INDEX [IX_StateProvince_CountryId] ON [StateProvince]
GO
DROP INDEX [IX_PSAM_AllowFiltering] ON [Product_SpecificationAttribute_Mapping]
GO
DROP INDEX [IX_PSAM_SpecificationAttributeOptionId_AllowFiltering] ON [Product_S... |
CREATE EXTERNAL TABLE `yearly_sales`(
`invoice_number` string,
`date` string,
`store_number` string,
`store_name` string, ... |
<reponame>seandstewart/norma
-- name: get^
-- Get a blog post by id.
SELECT * FROM posts WHERE id = :id;
-- name: get_by_slug^
-- Get a blog post by slug.
SELECT * FROM posts WHERE slug = :slug;
-- name: all
-- Get all blog posts.
SELECT * FROM posts ORDER BY id;
-- name: published
-- Get all blog posts which have b... |
<gh_stars>10-100
CREATE TABLE subdivision_EE (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_EE" ("id", "name", "level") VALUES ('EE-37', 'Condado de Harju', 'county');
INSERT INTO "subdivision_EE" ("id", "name", "level") VALUES ('EE-39', 'Hiiumaa', 'c... |
<filename>sql/bugMenu.sql
-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame,
is_cache, menu_type, visible, status, perms, icon, create_by,
create_time, update_by, update_time, remark)
values ('缺陷', '2000', '1', 'bug', 'project/bug/inde... |
<reponame>fujiawei-dev/mysql-notes<filename>challenge/leetcode/src/easy/leetcode_easy_Ads.sql
create table Ads
(
ad_id int null,
user_id int null,
action enum ('Clicked', 'Viewed', 'Ignored') null
);
INSERT INTO leetcode_easy.Ads (ad_id... |
<reponame>tokenocean/re<gh_stars>1-10
alter table "public"."users" add column "last_seen_tx" uuid
null;
|
<filename>src/cli/bundled/sql/AdDynamicCreative.sql
CREATE TABLE ad_dynamic_creative (
preview_url Nullable(String)
)
ENGINE = Log
|
<filename>FlightJournal.Web/Migrations/FlightContext/202105141909458_Add Club flag for using APRS based takeoff.sql
ALTER TABLE [dbo].[Clubs] ADD [UseAPRSTakeoffAndLanding] [bit] NOT NULL DEFAULT 0
INSERT [dbo].[__MigrationHistory]([MigrationId], [ContextKey], [Model], [ProductVersion])
VALUES (N'202105141922276_Add C... |
<gh_stars>10-100
/*
* INTER-Mediator
* Copyright (c) INTER-Mediator Directive Committee (http://inter-mediator.org)
* This project started at the end of 2009 by <NAME> <EMAIL>.
*
* INTER-Mediator is supplied under MIT License.
* Please see the full license for details:
* https://github.com/INTER-Mediator/INTER-M... |
<filename>files/database/db_views/planet-osm-polygon.sql
CREATE OR REPLACE VIEW planet_osm_polygon AS
SELECT osm_id
-- original columns
, layer as layer
, tags as "tags"
, way as "way"
, way_area as way_area
, z_order as z_order
-- calculated columns
, osml10n_get_placename_from_tags(tags,true,false,chr(10... |
DROP TABLE IF EXISTS `api_users`;
CREATE TABLE `api_users` (
`id` char(36) COMMENT 'User id',
`full_name` varchar(32) DEFAULT NULL COMMENT 'Full Name',
`email` varchar(128) DEFAULT NULL COMMENT 'Email',
`api_key` varchar(100) DEFAULT NULL COMMENT 'Api key',
`created` datetime DEFAULT CURRENT_TIMESTAMP C... |
<reponame>DaniloArruda/sistema-academico
select
d.codigo,
d.nome
from
disciplina d
inner join disciplina_curso dc on d.codigo = dc.codigo_disciplina
left join turma t
on dc.codigo_disciplina = t.codigo_disciplina
and t.ano = year(now())
and t.semestre = (
select case
when month(now()) > ... |
<filename>scripts/en/Animals.sql
INSERT INTO `card` (id, type, title, header, content, option) VALUES ('Zebra', 2, 'Zebra', 'assets/topic/zebra.svg', 'With their signature black and white stripes who cannot recognize a zebra! Zebras are single-hoofed animals that are native of Africa. Zebras belong to horse family and ... |
<reponame>MikeBishop/almanac.httparchive.org<gh_stars>1-10
#standardSQL
CREATE TEMPORARY FUNCTION getFontSizes(css STRING) RETURNS ARRAY<STRING> LANGUAGE js AS '''
try {
var ast = JSON.parse(css);
var fontSizes = [];
walkDeclarations(ast, ({property, value}) => {
for (let fontSize of value.matchAll(/^(?<px>[\... |
-- phpMyAdmin SQL Dump
-- version 4.3.13
-- http://www.phpmyadmin.net
--
-- Host: tdpogawennoq.rds.sae.sina.com.cn:10111
-- Generation Time: 2016-05-27 18:13:36
-- 服务器版本: 5.6.23-72.1-log
-- PHP Version: 5.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
<filename>db/migrations/20190826171220_settlement_modifications/down.sql<gh_stars>0
ALTER TABLE organizations
DROP COLUMN settlement_type;
ALTER TABLE settlements
ADD user_id Uuid NOT NULL;
DROP INDEX IF EXISTS index_orders_settlement_id;
ALTER TABLE orders
DROP settlement_id;
DROP INDEX IF EXISTS index_settlem... |
<filename>deploy/database/updates/00779_02_RandomBMFixedMixed.sql
INSERT INTO button (id, name, recipe, btn_special, tourn_legal, set_id) VALUES
(10002, 'RandomBMFixed', '', 1, 0, (SELECT id FROM buttonset WHERE name="RandomBM")),
(10003, 'RandomBMMixed', '', 1, 0, (SELECT id FROM buttonset WHERE name="RandomBM"));
UP... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 28 Feb 2018 pada 03.57
-- Versi Server: 10.1.9-MariaDB
-- PHP Version: 7.0.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_... |
-- Used for string searching
-- Allows us to seacrh for more complex patterns
SELECT *
FROM customers
WHERE last_name REGEXP 'field'
-- ^ used to indicate the beginning of a strings
-- same with start with field
SELECT *
FROM customers
WHERE last_name REGEXP '^field'
-- $ used to indicate the end of a strings
--... |
create or replace PACKAGE BODY <%= queue_name %>_queue IS
PROCEDURE
enqueue_message(payload VARCHAR2)
IS
msg <%= payload_name %> := <%= payload_name %>(NULL);
msg_id RAW(16);
enqueue_options DBMS_AQ.ENQUEUE_OPTIONS_T;
message_properties DBMS_AQ.MESSAGE_PROPERTIES_T... |
CREATE SCHEMA [SQLCop]
AUTHORIZATION [dbo]
GO
DECLARE @xp int
SELECT @xp=1
EXEC sp_addextendedproperty N'tSQLt.TestClass', @xp, 'SCHEMA', N'SQLCop', NULL, NULL, NULL, NULL
GO
|
#
# TABLE STRUCTURE FOR: module_groups
#
DROP TABLE IF EXISTS `module_groups`;
CREATE TABLE `module_groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) DEFAULT NULL,
`short_code` varchar(100) NOT NULL,
`icon` varchar(50) DEFAULT NULL,
`is_active` int(1) DEFAULT 0,
PRIMARY KEY (`id`) USING ... |
<reponame>sharksmhi/svepa
-- Code that gets eventinfo from a CTD-type event (event name that starts with CTD) that is started but not stopped
-- it also gets info about station event and cruise event
select *
from Counter
-- first where filter gives info about station (parent)
where owner = (
SELECT parentEventID
F... |
-- --------------------------------------------------------
-- Host: localhost
-- Versión del servidor: 10.1.35-MariaDB - mariadb.org binary distribution
-- SO del servidor: Win32
-- HeidiSQL Versión: 9.5.0.5437
-- ------------------------------------------------... |
CREATE TABLE [dbo].[ccia_employees] (
[employee_id] VARCHAR (9) NOT NULL,
[first_name] VARCHAR (30) NOT NULL,
[last_name] VARCHAR (30) NOT NULL,
[ucd_mailid] VARCHAR (32) NULL,
[campus_room] VARCHAR (10) NULL,
[campus_bldg] VARCHAR (10)... |
CREATE TABLE callback_result (
id UUID PRIMARY KEY,
created_at TIMESTAMP NOT NULL,
request_type VARCHAR(50) NOT NULL,
exception_record_id VARCHAR(50) NOT NULL,
case_id VARCHAR(50)
);
|
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 12, 2015 at 11:11 PM
-- Server version: 5.5.44-MariaDB
-- PHP Version: 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
use vipunentk
go
select top 1 * from d_koulutusluokitus
go
use antero |
<gh_stars>10-100
CREATE DATABASE IF NOT EXISTS `wolf_datav` DEFAULT CHARACTER SET utf8mb4;
USE `wolf_datav`;
-- 运营概况日报
DROP TABLE IF EXISTS `daily_koi`;
CREATE TABLE IF NOT EXISTS `daily_koi`
(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`org_id` BIGINT(20) UNSIGNED NOT ... |
create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_OWNER_AB2" as (
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
select
_AIRBYTE_CHILDREN_HASHID,
cast(OWNER_ID as
bigint
) as OWNER_ID,
_AIRBYTE_AB_ID,
... |
CREATE MATERIALIZED VIEW public.audio_popularity_constants AS
WITH popularity_metric_values AS (
SELECT
*,
audio_popularity_percentile(provider, metric, percentile) AS val
FROM audio_popularity_metrics
)
SELECT *, ((1 - percentile) / percentile) * val AS constant
FROM popularity_metric_values;
|
DO $_$
DECLARE
z text;
BEGIN
z:=$FUNCTIONBODY$
CREATE OR REPLACE FUNCTION vocabulary_download.get_ndc_spl_prepare (iPath text, iFilename text)
RETURNS void AS
$BODY$#!/bin/bash
#set permissions=775 by default
umask 002 && \
cd "$1/work" && \
unzip -oq "$2*.zip" -d . 2> >(grep -v "were succ... |
<reponame>valmas/ideal-house-dbms
create table Employees (
AFM CHAR(9) NOT NULL,
EmployeeNo SMALLINT UNSIGNED NOT NULL,
FirstName VARCHAR(35) NOT NULL,
LastName VARCHAR(35) NOT NULL,
Addr_StreetName VARCHAR(35),
Addr_StreetNo VARCHAR(4),
Addr_PostalCode CHAR(5) NOT NULL,
Salary FLOAT(8,2),
WorkPhoneNumber CHAR... |
<filename>sql/utSQL/test/core/test_ut_suite.pks<gh_stars>0
create or replace package test_ut_suite is
--%suite(ut_suite)
--%suitepath(utplsql.core)
--%beforeeach
procedure cleanup_package_state;
--%test(Disabled flag skips tests execution in suite)
procedure disabled_suite;
--%test(Marks each test as ... |
-- SELECT locality_pid, (ST_DumpPoints(geom)).path
-- FROM admin_bdys_202205.locality_bdys_display_full_res
-- WHERE locality_pid = 'NSW2273';
-- number of points - original localities --12,938,094
SELECT Count(*) as num_points FROM (
SELECT (ST_DumpPoints(geom)).geom as geom
FROM admin_bdys_202205.locality_bdy... |
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE general_params ( "name" text, "value" text );
INSERT INTO "general_params" VALUES('list_report_data_table','V_Analysis_Job_Request_List_Report');
INSERT INTO "general_params" VALUES('list_report_data_sort_dir','DESC');
INSERT INTO "general_params" VALUES('d... |
-- Name: PublicFileBySopInstanceUid
-- Schema: public
-- Columns: ['file_path']
-- Args: ['sop_instance_uid']
-- Tags: ['public', 'used_in_simple_phi']
-- Description: List of all Series By Collection, Site on Intake
--
select
dicom_file_uri as file_path
from
general_image
where
sop_instance_uid = ?
|
CREATE TABLE IF NOT EXISTS REG_CLUSTER_LOCK (
REG_LOCK_NAME VARCHAR (20),
REG_LOCK_STATUS VARCHAR (20),
REG_LOCKED_TIME TIMESTAMP,
REG_TENANT_ID INTEGER DEFAULT 0,
PRIMARY KEY (REG_LOCK_NAME)
);
CREATE TABLE IF NOT EXISTS REG_LOG (
REG_LOG_I... |
<gh_stars>100-1000
/*
SQLyog Ultimate v11.24 (64 bit)
MySQL - 5.0.67-community-nt : Database - plan01
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40... |
-- DROP USER chebi CASCADE;
exit;
|
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50553
Source Host : localhost:3306
Source Database : tshop
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2017-08-16 17:56:10
*/
SET FOREIGN_KEY_... |
<reponame>Zhaojia2019/cubrid-testcases
-- [er]create vclass using Constraints not null,Unique and DEFAULT
create vclass t1 (
c1 int DEFAULT 9 not null Unique
);
drop t1; |
<filename>openGaussBase/testcase/SQL/DML/set/Opengauss_Function_DML_Set_Case0083.sql<gh_stars>0
-- @testpoint:约束默认是no deferable的,使用SET CONSTRAINTS语句设置当前事务检查行为的约束条件(唯一约束)
--建表同时定义主键约束
drop table if exists t4;
create table t4 (id int unique,name varchar(40));
--查看约束名字
select conname,condeferrable,condeferred from pg_con... |
<reponame>AustinPerez760/Employee-Tracker
USE employee_DB;
-- DEPARTMENT
INSERT INTO department
(name)
VALUES
("Human Resources"),
("Research"),
("Engineering"),
("Finace"),
("Sales");
--ROLE
INSERT INTO role
(title, salary,department_id)
VALUES
("manager", 120000.00,2),
("engineer", 100000,3),
("accountant", 65000... |
<gh_stars>0
SELECT
EMAIL.ID,
EMAIL.PARENT_ID,
EMAIL.MESSAGE_ID,
EMAIL.SUBJECT,
EMAIL.SENT_FROM,
EMAIL.DATE,
EMAIL.HIDDEN
FROM EMAIL
WHERE EMAIL.PARENT_ID = ?
ORDER BY EMAIL.DATE DESC
|
<reponame>MuxammadAli/lara_vue_crud
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Окт 02 2020 г., 17:50
-- Версия сервера: 10.3.22-MariaDB
-- Версия PHP: 7.1.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
... |
<reponame>100dej/PlanningS<filename>Form/700/SQL Program Behavior/dbo.AllExecuteInMonthForChart.sql<gh_stars>0
create proc AllExecuteInMonthForChart(@m nvarchar(2),@y nvarchar(4)) as
select a.MY,sum(success) as Success ,sum(error) as Error ,count(a.MY) as CUser,AVG(SuccessInSecond) as AVGSuccessTime, AVG(ErrorInSecon... |
CREATE TABLE [dbo].[TBL_FAM_WORK_ORDER]
(
[wrkord_id_Pk] BIGINT PRIMARY KEY IDENTITY NOT NULL,
[wrkord_number] NVARCHAR(100) NOT NULL,
[wrkord_status] NVARCHAR(100) NOT NULL,
[wrkord_issued_at] DATETIME NOT NULL,
[wrkord_scheduled_to] DATETIME NOT NULL,
[wrkord_provider_Fk] BIGINT NOT NULL,
[wrkord_physical_inv... |
<gh_stars>1-10
CREATE TABLE [dbo].[OrderItem] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[OrderId] INT NOT NULL,
[ProductId] INT NOT NULL,
[UnitPrice] DECIMAL (12, 2) DEFAULT ((0)) NOT NULL,
[Quantity] INT DEFAULT ((1)) NOT NULL,
CONSTRAINT [P... |
CREATE SCHEMA `handcoding` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE TABLE `code` (
`code` CHAR(20) NOT NULL COMMENT '코드값',
`parentCode` CHAR(20) NULL DEFAULT '' COMMENT '상위 코드값',
`descript` VARCHAR(150) NOT NULL COMMENT '코드에 대한 설명'
);
ALTER TABLE `code`
ADD CONSTRAIN... |
<gh_stars>1-10
-- IDEMPIERE-2395 NoteDelete leaving orphan attachments
-- Oct 6, 2018 11:05:15 PM CEST
INSERT INTO AD_Process (AD_Process_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Help,IsReport,Value,IsDirectPrint,Classname,AccessLevel,EntityType,Statistic_Count,Statistic_Seconds,IsBet... |
create external table alertas_dev.hbase_dispensados (
disp_alrt_key string,
disp_orgao_id int,
disp_alerta_id string,
disp_sigla string
) stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
with serdeproperties('hbase.columns.mapping' = ':key,dados_alertas:orgao,dados_alertas:alerta_id,dados_al... |
<filename>db/views/dashboards_attributes_mv_v02.sql
SELECT da.id, da.dashboards_attribute_group_id, position, a.id AS attribute_id
FROM dashboards_inds di
JOIN dashboards_attributes da ON da.id = di.dashboards_attribute_id
JOIN attributes_mv a ON a.original_id = di.ind_id AND a.original_type = 'Ind'
UNION ALL
SELECT ... |
-- tkt-8454a207b9.test
--
-- db eval {
-- ALTER TABLE t1 ADD COLUMN h DEFAULT 9223372036854775807;
-- SELECT h, typeof(h) FROM t1;
-- }
ALTER TABLE t1 ADD COLUMN h DEFAULT 9223372036854775807;
SELECT h, typeof(h) FROM t1; |
<filename>src/test/resources/sql/grant/5b118ae6.sql<gh_stars>10-100
-- file:foreign_data.sql ln:466 expect:true
GRANT USAGE ON FOREIGN DATA WRAPPER postgresql TO regress_test_role
|
<filename>src/test/resources/sql/insert/6e49a14b.sql
-- file:numeric.sql ln:427 expect:true
INSERT INTO num_exp_sqrt VALUES (1,'0')
|
-- file:macaddr8.sql ln:37 expect:true
INSERT INTO macaddr8_data VALUES (2, '08-00-2b-01-02-03')
|
<gh_stars>10-100
-- file:domain.sql ln:147 expect:true
insert into dcomptable values (array[row(1,2)]::comptype[])
|
CREATE TABLE points3857(gid SERIAL PRIMARY KEY, geom GEOMETRY(POINT, 3857));
INSERT INTO points3857
SELECT
generate_series(1, 10000) as id,
(
ST_DUMP(
ST_GENERATEPOINTS(
ST_TRANSFORM(
ST_GEOMFROMTEXT('POLYGON ((-179 89, 179 89,... |
<reponame>windwiny/Oracle-DBA-tips-scripts
-- +----------------------------------------------------------------------------+
-- | <NAME> |
-- | <EMAIL> |
-- | www.idevelopment.info ... |
<reponame>pribtech/nodete
SELECT
name, npages
FROM
sysibm.systables
WHERE name='TX_SMALL' OR name='TX_LARGE' |
<filename>webapp/src/main/resources/schemaTestinstance.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';
-- --------... |
<filename>src/test/resources/jp/co/tis/gsp/tools/dba/mojo/GenerateDdlMojo_test/specifiedSchemaInEdm/postgresql/expected/ddl/10_CREATE_INDEX_TEST3.sql
CREATE TABLE SCHEMA_TEST.INDEX_TEST3 (
INDEX_TEST3_ID BIGINT NOT NULL,
SUB_ID_1 BIGINT NOT NULL,
SUB_ID_2 BIGINT NOT NULL
);
COMMENT ON table SCHEMA_TEST.INDEX_TEST... |
<gh_stars>100-1000
drop access method some_name cascade
DROP AGGREGATE myrank(VARIADIC "any" ORDER BY VARIADIC "any")
DROP AGGREGATE myavg(integer), myavg(bigint)
DROP CAST (text AS int)
DROP COLLATION german
DROP CONVERSION myname
drop database if exists mydb
DROP DOMAIN "NameSpace"."Domain"
DROP EVENT TRIGGER... |
-- --------------------------------------------------------
-- Host: localhost
-- Server version: 10.1.16-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 9.3.0.4984
-- ------------------------------------------------... |
create class test_class (date_col date, time_col time, timestamp_col timestamp, datetime_col datetimetz, datetime_col1 datetimetz);
insert into test_class values (DATE '01/01/1971', TIME '09:00:00', TIMESTAMP '01/01/1972 10:30:00', datetimetz '1970-01-01 00:00:00.000', datetimetz '1970-01-01 00:00:00.000');
insert int... |
--+ holdcas on;
create table t53(i1 integer, i2 integer, i3 integer);
create index t53_idx_one on t53(i1);
create index t53_idx_two on t53(i2);
create index t53_idx_one_two on t53(i1, i2);
create index t53_idx_two_three on t53(i2, i3);
create index t53_idx_one_three on t53(i1, i3);
create index t53_idx_all on t53(i1, ... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 16, 2017 at 10:23 AM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Gegenereerd op: 01 jun 2017 om 12:38
-- Serverversie: 10.1.19-MariaDB
-- PHP-versie: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<filename>dru_scaffold.sql
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 06, 2018 at 06:15 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "... |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'603726',@CutoffDate = N'2017-09-30',@EPS = N'0.92',@EPSDeduct = N'0',@Revenue = N'9.48亿',@RevenueYoy = N'72.45',@RevenueQoq = N'-3.34',@Profit = N'8728.69万',@ProfitYoy = N'75.42',@ProfiltQoq = N'-19.72',@NAVPerUnit = N'8.3557',@ROE = N'11.27',@CashPerUnit = N'-0.6693',@GrossProfitRa... |
<filename>XML_WITHOUT_XMLS/zestaw3_2.sql
DECLARE
count_num NUMBER;
country VARCHAR(200);
BEGIN
for v_rec in (
SELECT customer.COUNTRY, SUM(invoice.Quantity) as COUNT
FROM CUSTOMER customer
JOIN (SELECT i.INVOICEID, i.CUSTOMERID, SUM(il.QUANTITY) as Quantity FROM INVOICE i
JOIN INVOICELINE il on il.IN... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: May 15, 2018 at 07:56 PM
-- Server version: 5.6.34-log
-- PHP Version: 7.1.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- deletes all tables in a database
USE familyTreeDatabase;
DELETE FROM AppUser;
-- remove contraints that family member has on gender (foreign key)
ALTER TABLE FamilyMember NOCHECK CONSTRAINT ALL;
-- DELETE FROM Gender;
ALTER TABLE MedicalHistory NOCHECK CONSTRAINT ALL;
-- DELETE FROM Diagnosis;
DELETE FROM Medica... |
CREATE TABLE `hibernate_sequence` ( `next_val` BIGINT(19) NOT NULL)
select vmi from VariantMetricInformation vmi where vmi.variantID = :variantId and vmi.pushMessageInformation.id = :pushmessageinformationId
select count(*) from VariantMetricInformation vmi where vmi.variantID = :variantID
select count(pmi) from PushMe... |
-- DCL
drop user imsapp cascade;
/* Drop can remove the "user" object from the system.
We are currently connected to the "admin" user.
We don't want to build our database on our admin user.
We're going to make a user that only has the priveleges
that are necessary for development */
--- create a user ... |
-- Materialized View: extra_dfs_draft_prior.roster_construction
-- DROP MATERIALIZED VIEW extra_dfs_draft_prior.roster_construction;
CREATE MATERIALIZED VIEW extra_dfs_draft_prior.roster_construction AS
WITH t AS (
SELECT league.draft_id
FROM extra_dfs_draft_prior.league
), t2 AS (
... |
INSERT OVERWRITE TABLE {provider_prefix}_cdr_by_uid_trip_organized_array_apd PARTITION(pdt)
select uid, f_organizearray(uid,arr) as arr,pdt
from {provider_prefix}_cdr_by_uid_trip where size(arr) > 0
|
<gh_stars>1-10
USE [ANTERO]
GO
/****** Object: View [dw].[v_virta_otp_erikoistumiskoulutukset] Script Date: 16.7.2019 13:25:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dw].[v_virta_otp_erikoistumiskoulutukset] AS
SELECT
d6.vuosi as [Aloitusvuosi],
d4.sukupuoli_fi... |
create database "stator";
|
select count(*), last_name
from employee
group by last_name
order by last_name desc |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.