sql stringlengths 6 1.05M |
|---|
SELECT
@@servername AS server_name,
CAST(SYSUTCDATETIME() AS datetime2(0)) AS collect_date,
DB_NAME() as db_name,
RTRIM(object_name) AS object_name,
RTRIM(counter_name) AS counter_name,
RTRIM(instance_name) AS instance_name,
cntr_value,
cntr_type
FROM
sys.dm_os_performance_counters
WHERE
object_name LIKE '... |
<reponame>moormeierz/sql-challenge
--Create and import departments table
CREATE TABLE Departments (
dept_no VARCHAR NOT NULL,
dept_name VARCHAR NOT NULL,
CONSTRAINT pk_Departments PRIMARY KEY (
dept_no
)
);
--Create and import dept_emp table
CREATE TABLE dept_emp (
emp_no VARCHAR NOT... |
USE TestDb
GO
SELECT * FROM [dbo].['02 Aug 13$']
ORDER BY [No.]
-- Delete acid information rows
ALTER TABLE [dbo].['02 Aug 13$']
DROP COLUMN [F18],[F19],[F20],[F21],[F22],[F23],[F24],[F25]
-- Delete rows between balance and location
ALTER TABLE [dbo].['02 Aug 13$']
DROP COLUMN [F9],[F10],[F11],[F12],[F1... |
DROP TABLE IF EXISTS `shuyang_phone`;
CREATE TABLE `shuyang_phone` (
`phoneid` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`siteid` smallint(5) unsigned DEFAULT '0',
`typeid` smallint(5) unsigned NOT NULL DEFAULT '0',
`phonetype` tinyint(1) unsigned NOT NULL DEFAULT '0',
`name` varchar(50) NOT NULL DEFAULT ... |
/*
* Copyright 2017 The Nakama Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... |
create schema if not exists hook;
CREATE TYPE hook.RetryPolicyType AS ENUM ('SIMPLE');
CREATE TYPE hook.EventType AS ENUM (
'INVOICE_CREATED',
'INVOICE_STATUS_CHANGED',
'INVOICE_PAYMENT_STARTED',
'INVOICE_PAYMENT_STATUS_CHANGED');
CREATE SEQUENCE hook.seq
INCREMENT 1
START 1
MINVALUE 1
... |
/*
Navicat MySQL Data Transfer
Source Server : mysql-练习机
Source Server Version : 50716
Source Host : 192.168.75.133:3306
Source Database : oldboy
Target Server Type : MYSQL
Target Server Version : 50716
File Encoding : 65001
Date: 2017-04-14 14:42:38
*/
SET FOREIGN_KEY_CHECKS=0;
... |
create or replace procedure setup_full_supplier( p_bpar_id bigint )
begin
declare done int default false;
declare v_item_id bigint;
declare cur cursor for
select item_id
from items
where item_id not in
(
select item_id
from items_suppliers
where bpar_... |
<filename>cloud-mall-doc/sql/cloud_mall_order.sql
/*
Navicat Premium Data Transfer
Source Server : demo-01
Source Server Type : MySQL
Source Server Version : 50711
Source Host : localhost:3306
Source Schema : cloud_mall_order
Target Server Type : MySQL
Target Server Version : 5... |
-- static tables
CREATE TABLE Organisation (
id bigint not null,
type varchar(12) not null,
name varchar(256) not null,
url varchar(256) not null,
LocationPlaceId bigint not null
);
CREATE TABLE Place (
id bigint not null,
name varchar(256) not null,
url varchar(256) not null,
type... |
INSERT INTO
qywx_conversation
(
ID
,TITLE
,USERNAMELIST
,USERIDLIST
,STATUS
,MANAGERID
,CHATID
,MANAGERNAME
)
values
(
:qywxC... |
<reponame>IsaacSchemm/GrantManager<filename>sql/11-grant_program.sql
USE [grantapp]
GO
IF EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_grant_program_grant]') AND parent_object_id = OBJECT_ID(N'[dbo].[grant_program]'))
ALTER TABLE [dbo].[grant_program] DROP CONSTRAINT [FK_grant_progra... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 18, 2016 at 11:53 AM
-- Server version: 5.6.27-0ubuntu1
-- PHP Version: 5.6.11-1ubuntu3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 29, 2017 at 09:55 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<filename>examples/multiple_mysql/database.sql
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 16, 2013 at 07:28 PM
-- Server version: 5.6.12-log
-- PHP Version: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: ... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Feb 07, 2018 at 12:02 AM
-- Server version: 10.0.34-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
<reponame>foex-open-source/fos-spinner-actions
create or replace package body com_fos_spinner_actions
as
-- =============================================================================
--
-- FOS = FOEX Open Source (fos.world), by FOEX GmbH, Austria (www.foex.at)
--
-- This plug-in provides you with a Spinner Action... |
<filename>database.sql
CREATE DATABASE IF NOT EXISTS videoslaravel;
USE videoslaravel;
CREATE TABLE users(
id int(255) auto_increment NOT NULL,
role varchar(20),
name varchar(255),
surname varchar(255),
email varchar(255),
password varchar(255),
image varchar(255),
created_at datetime,
... |
<gh_stars>0
/* Information about the host from which the sample was collected.
Is linked to the `samples` table trough the `sample_id` column. */
CREATE TABLE IF NOT EXISTS `samples_host` (
sample_id INT UNSIGNED NOT NULL PRIMARY KEY,
host_id INT UNSIGNED,
host_subject_id VARCHAR(200),
additional_host_info VARCH... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 14, 2020 at 12:15 PM
-- Server version: 10.1.45-MariaDB-0+deb9u1
-- PHP Version: 7.3.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
CREATE TABLE roles (
role_id int NOT NULL,
name varchar(45) NOT NULL
) ;
INSERT INTO roles (role_id, name) VALUES
(1, 'USER'),
(2, 'ADMIN');
CREATE TABLE users (
user_id int NOT NULL,
email varchar(45) NOT NULL,
password varchar(64) NOT NULL,
first_name varchar(20) NOT NULL,
last_name varchar(20) DEFAULT... |
DROP TABLE lib_lib_config;
;
DROP TABLE lib_admins;
;
DROP TABLE lib_users;
;
DROP TABLE lib_borrows;
;
DROP TABLE lib_logged_in_admin;
;
DROP TABLE lib_books;
;
|
<filename>test/fixtures/dialects/mysql/repair_table.sql<gh_stars>100-1000
REPAIR TABLE some_table;
REPAIR TABLE some_table1, some_table2;
REPAIR NO_WRITE_TO_BINLOG TABLE some_table;
REPAIR NO_WRITE_TO_BINLOG TABLE some_table1, some_table2;
REPAIR LOCAL TABLE some_table;
REPAIR LOCAL TABLE some_table1, some_table2;... |
CREATE FUNCTION dbo.ReportGetChildManagingAreas (@localAuthorityGroupCodeName nvarchar(3))
RETURNS TABLE AS RETURN
WITH r AS
(SELECT LocalAuthorityGroupID
FROM dbo.LocalAuthorityGroup
WHERE CodeName = @localAuthorityGroupCodeName
UNION ALL
SELECT t.LocalAuthorityGroupID
FROM dbo.LocalAuthorityGroup t JOIN r
ON t.Pa... |
<filename>services/data/migrations/1604362103775_create_table_contactcenter_test_table/up.sql<gh_stars>1-10
CREATE TABLE "contactcenter"."test_table"("id" serial NOT NULL, PRIMARY KEY ("id") );
|
CREATE TABLE table_53(
codigo VARCHAR(2) NOT NULL PRIMARY KEY
,descripcion VARCHAR(86) NOT NULL
,nivel VARCHAR(6) NOT NULL
);
INSERT INTO table_53(codigo,descripcion,nivel) VALUES
('00','Descuentos que afectan la base imponible del IGV/IVAP','Item')
,('01','Descuentos que no afectan la base imponible... |
--1 DDL
CREATE DATABASE Airport
CREATE TABLE Planes
(Id INT PRIMARY KEY IDENTITY NOT NULL,
[Name] NVARCHAR(30) NOT NULL,
Seats INT NOT NULL,
[Range] INT NOT NULL)
CREATE TABLE Flights
(Id INT PRIMARY KEY IDENTITY NOT NULL,
DepartureTime DATETIME NULL,
ArrivalTime DATETIME NULL,
Origin NVARCHAR(50) NOT NULL,... |
<reponame>dram/metasfresh<gh_stars>1000+
-- 2017-09-15T17:16:13.223
-- URL zum Konzept
ALTER TABLE AD_Ref_Table ADD CONSTRAINT ADColumnReferenceTarget_ADRefT FOREIGN KEY (AD_Column_ReferenceTarget_ID) REFERENCES public.AD_Column DEFERRABLE INITIALLY DEFERRED
;
|
USE [ResidentalData]
GO
/****** Object: Table [dbo].[Accounts] Script Date: 09.08.2018 16:50:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Accounts](
[GUID] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ObjectAddressGUID] [uniqueidentifier] NOT NULL,
[AccountNumber] [nvarchar](30... |
select name, region
from aws_securityhub_action_target
where arn = '{{ output.arn.value }}';
|
<filename>src/Frapid.Web/Areas/MixERP.Finance/db/PostgreSQL/2.x/2.0/src/02.functions-and-logic/finance.get_account_id_by_bank_account_id.sql<gh_stars>1-10
DROP FUNCTION IF EXISTS finance.get_account_id_by_bank_account_id(_bank_account_id integer);
CREATE FUNCTION finance.get_account_id_by_bank_account_id(_bank_accoun... |
select l_linenumber, count(*), count(distinct l_orderkey), sum(distinct l_orderkey) from lineitem group by l_linenumber having sum(distinct l_orderkey) = 6; |
<filename>kata-files/lesson2/hsql/expected/MYLARGESCHEMA/sp/SP870.sql
CREATE PROCEDURE SP870(OUT MYCOUNT INTEGER) SPECIFIC SP870_68670 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE455;SELECT COUNT(*)INTO MYCOUNT FROM TABLE125;SELE... |
insert into customers (id, name, surname, address, country, phone) values (0, 'Maria', 'Anders', 'Berlin', 'Germany', '030-0074321');
insert into customers (id, name, surname, address, country, phone) values (1, 'Ana', 'Trujillo', 'México D.F.', 'Mexico', '(5) 555-4729');
insert into customers (id, name, surname, addre... |
<reponame>anniyanvr/pipeline
UPDATE "azure_pke_node_pools" SET "roles"='[]' WHERE "roles" = '';
UPDATE "azure_pke_node_pools" SET "roles"=concat('["', replace("roles", ',', '","'), '"]') WHERE NOT "roles" LIKE '%[%';
ALTER TABLE "azure_pke_node_pools" ALTER COLUMN "roles" TYPE json USING "roles"::json;
UPDATE "azure_p... |
<reponame>dbrtly/ra_data_warehouse
{{config(enabled = target.type == 'bigquery')}}
{% if var("crm_warehouse_contact_sources") and var("product_warehouse_event_sources") %}
{{config(alias='contacts_web_event_history_xa')}}
SELECT
c.contact_pk,
e.blended_user_id as contact_email,
e.web_event_pk,
e.event_type,
... |
-- @testpoint:opengauss关键字transactions_committed(非保留),作为外部数据源名
--关键字不带引号-成功
drop data source if exists transactions_committed;
create data source transactions_committed;
drop data source transactions_committed;
--关键字带双引号-成功
drop data source if exists "transactions_committed";
create data source "transactions_committ... |
<gh_stars>0
-- comment
CREATE TABLE stuff COLUMNS(col1 INT, col2 Varchar);
SELECT * FROM stuff WHERE id = 'string';
select * from stuff where id < 0.42;
Select col1, col2 From stuff Where stuff.col1 IS NOT NuLL;
CREATE TABLE Persons (
ID int NOT NULL AUTO_INCREMENT,
LastName varchar(255) NOT NULL,
FirstNa... |
<reponame>feniz18/SISTRACEET<filename>archivosSQL/departamento.sql
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 27-09-2017 a las 14:02:37
-- Versión del servidor: 5.7.19
-- Versión de PHP: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SE... |
-- Triggers: A set of PL/SQL stmts automatically executed whenever an DML stmts is performed on table.
Or
A Database Trigger is a named PL/SQL Block stored in a database and Executed Implicitely when
Triggering Event occurs.
A Triggering Event is a Dml stmt Associated with "i... |
<reponame>yama24/Alif-Aqiqah-Catering<gh_stars>0
-- --------------------------------------------------------
-- Host: localhost
-- Versi server: 5.7.24 - MySQL Community Server (GPL)
-- OS Server: Win64
-- HeidiSQL Versi: 10.2.0.5599
-- ----------... |
<filename>db/add_product.sql<gh_stars>0
insert into dw_store (category, name, price, silver_img, gold_img, size) values ($1, $2, $3, $4, $5, $6) |
---------------------------------------------------------------
-- table: heading5. indexes
---------------------------------------------------------------
-- index: cuix_heading5_key
-- drop index cuix_heading5_key;
create unique index cuix_heading5_key on heading5 using btree (key);
alter table heading5 cluster on ... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 17-Jun-2021 às 05:31
-- Versão do servidor: 10.4.17-MariaDB
-- versão do PHP: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
item_id (unique id for each product)
* product_name (Name of product)
* department_name
* price (cost to customer)
* stock_quantity (how much of the product is available in stores)
DROP DATABASE IF EXISTS fantasy_costco;
CREATE DATABASE fantasy_costco;
USE fantasy_costco;
CREATE TABLE ... |
SELECT wd.DepositGroup,
MAX(wd.MagicWandSize) AS [LongestMagicWand]
FROM WizzardDeposits AS wd
GROUP BY wd.DepositGroup |
<reponame>BilalGill/horse_racing_simulator<filename>migration/horse_racing_schema.sql
# ************************************************************
# Sequel Pro SQL dump
# Version 4703
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.23)
# Database: horse_racing
# G... |
-- ----------------------------
-- Drop all known application tables
-- ----------------------------
PRAGMA foreign_keys = false;
DROP TABLE IF EXISTS "notes";
DROP TABLE IF EXISTS "notebooks";
DROP TABLE IF EXISTS "migration";
DROP TABLE IF EXISTS "groups";
DROP TABLE IF EXISTS "users";
DROP TABLE IF EXISTS "thrott... |
CREATE UNLOGGED TABLE IF NOT EXISTS complex_table(
did int PRIMARY KEY,
did2 int CHECK (did2 > 100),
no_null_int int CONSTRAINT no_null NOT NULL,
no_null_varchar varchar(40) NOT NULL COLLATE "es_ES",
some_unique int8 UNIQUE,
some_varchar varchar(40),
some_num numeric,
some_float float4,
... |
-- PCT12K. SEX BY AGE (AMERICAN INDIAN AND ALASKA NATIVE ALONE, NOT HISPANIC OR LATINO)
-- designed to work with the IRE Census bulk data exports
-- see http://census.ire.org/data/bulkdata.html
CREATE TABLE ire_pct12k (
geoid VARCHAR(11) NOT NULL,
sumlev VARCHAR(3) NOT NULL,
state VARCHAR(2) NOT NULL,
county VAR... |
ALTER TABLE [dbo].[RUNTIME_LINK_ANALYSIS_RESULTS]
ADD CONSTRAINT [UK_RT_LinkAnalysisRslts]
UNIQUE (SessionGroupRunId) |
<gh_stars>1-10
SELECT
true
FROM
lecturers
JOIN classes ON classes.id = %d AND classes.course = lecturers.course AND classes.deleted = 0
JOIN courses ON courses.id = lecturers.course AND courses.deleted = 0
WHERE
lecturers.id = $u[id] AND
lecturers.status = 1 AND lecturers.history = 0
GROUP BY
classes... |
<reponame>rjribeiro/etl_censo_escolar
CREATE SCHEMA IF NOT EXISTS `{PROJECT}.censo_escolar`;
----------------------------------------------------------------------
CREATE EXTERNAL TABLE IF NOT EXISTS censo_escolar.turmas
WITH PARTITION COLUMNS (
NU_ANO_CENSO INT
)
OPTIONS (
format = "PARQUET",
uris = ["gs:/... |
DECLARE @ComponentPickerDefinitionId INT
SET @ComponentPickerDefinitionId = (select DefinitionId from uCommerce_Definition where [Guid] = '96B66456-DB72-435D-9B6F-0D129891B95B')
IF NOT EXISTS (SELECT * FROM [uCommerce_DataType]
WHERE [TypeName] = 'ControlFactoryPicker')
BEGIN
INSERT INTO [dbo].[uComm... |
--------------------------------------------------------------------------------
-- Extensions
--------------------------------------------------------------------------------
DROP EXTENSION IF EXISTS pg_trgm;
DROP EXTENSION IF EXISTS tablefunc;
CREATE EXTENSION IF NOT EXISTS pg_trgm; -- (similarity , show_Trgm... |
-- file:updatable_views.sql ln:1091 expect:true
UPDATE v2 SET a = -1 WHERE a = 1
|
<filename>src/test/resources/sql/select/e5a39ef1.sql
-- file:foreign_data.sql ln:639 expect:true
SELECT relname, conname, contype, conislocal, coninhcount, connoinherit
FROM pg_class AS pc JOIN pg_constraint AS pgc ON (conrelid = pc.oid)
WHERE pc.relname = 'pt1'
ORDER BY 1,2
|
DELETE FROM event_id_scripts WHERE id=11225;
INSERT INTO event_id_scripts VALUES (11225,'event_taxi_stormcrow');
|
<gh_stars>0
\c postgres
DROP DATABASE company;
CREATE DATABASE company;
\c company
CREATE TABLE departments(
id SERIAL PRIMARY KEY,
name VARCHAR(255)
);
CREATE TABLE employees(
id SERIAL PRIMARY KEY,
name VARCHAR(255),
depart_id INT references departments(id)
);
INSERT INTO departments(name) VA... |
create or replace package zipper as -- {
--
--
procedure addFile(zip in out blob, filename in varchar2, content in blob);
procedure finish (zip in out blob);
end zipper; -- }
/
|
<filename>TestScenarios/Deploy_AddUser/ExpectedOutput.SqlServer.sql<gh_stars>1-10
CREATE USER [MyUser] FOR LOGIN [MyLogin_Add]
GO
CREATE USER [MyOtherUser] FOR LOGIN [MyOtherLogin_Add]
WITH DEFAULT_SCHEMA = [MySchema]
GO
ALTER LOGIN [MyOtherLogin_Add]
DISABLE
GO
|
<gh_stars>100-1000
INSERT INTO t1 VALUES(1, 'foo', 3 * 10) |
<filename>kata-files/lesson2/postgresql/expected/MYLARGESCHEMA/table/table293.sql<gh_stars>10-100
//// CHANGE name=change0
CREATE TABLE table293 (
id integer NOT NULL,
field1 character varying(30),
usertype5field usertype5,
usertype9field usertype9
);
GO
//// CHANGE name=change1
ALTER TABLE ONLY tab... |
<filename>src/hot_table.sql<gh_stars>1-10
-- https://github.com/digoal/blog/blob/master/201806/20180613_04.md
select current_database(),* from pg_stat_all_tables order by seq_scan+idx_scan desc limit 10;
|
set names iso88591;
select charset('abc'), if(charset('abc')='iso88591', 'OK','NOK');
select charset(''), if(charset('')='iso88591', 'OK','NOK');
select charset('~*. '), if(charset('~*. ')='iso88591', 'OK','NOK');
set names utf8;
select charset('abc'), if(charset('abc')='utf8', 'OK','NOK');
select charset(''), if(cha... |
<reponame>Zhaojia2019/cubrid-testcases
-- create class and add pk when instances are exist
create class aoo ( a NUMERIC, b int, c int );
insert into aoo values (1,2,2);
alter class aoo add primary key(a);
select attr_name, is_nullable from db_attribute where class_name = 'aoo' order by 1,2;
select * from db_index ... |
-- Verify octopod:move_tag_to_overrides on pg
BEGIN;
-- XXX Add verifications here.
ROLLBACK;
|
--
-- Multi-schema support. The init script is instrumented to create standalone schema with tables and functions
-- to work with an instance of dependency graph.
--
-- When initializing postgres with dep graph, you can do search-and-replace from the original schema name (e.g. 'deps1') to
-- a different schema name - m... |
INSERT INTO product VALUES ('Ocet', 3.25, 1)
INSERT INTO product VALUES ('Ziemniaki', 0.5, 2)
INSERT INTO product VALUES ('Maslo', 2.00, 3) |
CREATE TABLE IF NOT EXISTS
location(
id SERIAL NOT NULL,
search_query VARCHAR(256),
formatted_query VARCHAR(256),
latitude FLOAT(24),
longitude FLOAT(24)
);
|
CREATE PROCEDURE [procfwkHelpers].[AddServicePrincipalWrapper]
(
@DataFactory NVARCHAR(200),
@PrincipalIdValue NVARCHAR(MAX),
@PrincipalSecretValue NVARCHAR(MAX),
@SpecificPipelineName NVARCHAR(200) = NULL,
@PrincipalName NVARCHAR(256) = NULL
)
AS
BEGIN
IF ([procfwk].[GetPropertyValueInternal]('SPNHandlingMe... |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'603813',@CutoffDate = N'2017-09-30',@EPS = N'0.57',@EPSDeduct = N'0',@Revenue = N'2.83亿',@RevenueYoy = N'17.94',@RevenueQoq = N'-',@Profit = N'3794.99万',@ProfitYoy = N'56.92',@ProfiltQoq = N'-',@NAVPerUnit = N'6.2480',@ROE = N'11.10',@CashPerUnit = N'0.7137',@GrossProfitRate = N'26.... |
CREATE PROCEDURE insert_password_recovery_attempt
@ip VARCHAR(45),
@email VARCHAR(64)
AS
BEGIN
INSERT INTO password_recovery_attempts
(ip, email, date)
VALUES(@ip, @email, GETDATE())
END |
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 12-05-2017 a las 03:28:48
-- Versión del servidor: 5.6.26-log
-- Versión de PHP: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'601992',@CutoffDate = N'2017-09-30',@EPS = N'0.24',@EPSDeduct = N'0',@Revenue = N'461.26亿',@RevenueYoy = N'41.17',@RevenueQoq = N'-8.09',@Profit = N'26.04亿',@ProfitYoy = N'14.71',@ProfiltQoq = N'-46.08',@NAVPerUnit = N'3.8505',@ROE = N'5.75',@CashPerUnit = N'-1.2935',@GrossProfitRat... |
GRANT USAGE ON SCHEMA ${dbschema} TO admin, gretl
;
GRANT SELECT ON ALL TABLES IN SCHEMA ${dbschema} TO gretl
;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA ${dbschema} TO admin
;
GRANT USAGE ON ALL SEQUENCES IN SCHEMA ${dbschema} TO gretl, admin
;
|
alter table fs_post add column active boolean not null default true; |
<filename>dahua_intranet.sql
-- MySQL dump 10.13 Distrib 5.7.25, for Linux (x86_64)
--
-- Host: localhost Database: dahua_intranet
-- ------------------------------------------------------
-- Server version 5.7.25-0ubuntu0.18.04.2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_... |
-- add additional geometries field to enable PostGIS point (WGS1984 SRID = 4326)
ALTER TABLE boundaries."Geometry_SAUID" ADD COLUMN IF NOT EXISTS geompoint geometry(Point,4326);
UPDATE boundaries."Geometry_SAUID" SET geompoint = st_setsrid(st_makepoint("Lon","Lat"),4326);
/* -- fix already corrected at source geopack... |
-- -----------------------------------------------------------------------
-- SAK-22496
-- -----------------------------------------------------------------------
UPDATE CITATION_SCHEMA_FIELD SET PROPERTY_VALUE = 'BT,T2' WHERE SCHEMA_ID = 'chapter' AND FIELD_ID = 'sourceTitle' AND PROPERTY_NAME = 'sakai:ris_identifie... |
<filename>World/Continents/Northrend/gameobject.spawntime.sql
UPDATE gameobject SET spawntimesecs = CEIL(7200+(RAND()*21600)) WHERE map = 571 AND id IN (189973, 189980, 189981, 190170, 190171, 190172, 190173, 190175, 190176, 191019, 191303, 191133, 195036); -- Setzt Spawntime auf eine Variable zwischen 2h-8h |
INSERT INTO USUARIO(login, senha) VALUES('<EMAIL>', <PASSWORD>');
|
-------------------------------------------------------------------------------
-- role def
-------------------------------------------------------------------------------
CREATE TABLE AUTH_ROLE_DEF(
ID BIGINT NOT NULL,
NAME VARCHAR(50),
DESCN VARCHAR(200),
SCOPE_ID VARCHAR(50),
CONS... |
<gh_stars>1-10
/****** Object: StoredProcedure [dbo].[SetParamForManagerList] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Procedure SetParamForManagerList
/****************************************************
**
** Desc:
** Set value for given param to given value
** for all managers wh... |
<reponame>sharmay/pgnodemx<gh_stars>10-100
/* beginnings of a cgroup v1 regression test */
\pset pager off
\x auto
DROP EXTENSION IF EXISTS pgnodemx;
CREATE EXTENSION pgnodemx;
SELECT cgroup_mode();
SELECT * FROM cgroup_path();
SELECT cgroup_process_count();
SELECT current_setting('pgnodemx.containerized');
SELECT cu... |
-- database: presto; groups: tpch; tables: lineitem
SELECT
l_returnflag,
l_linestatus,
sum(l_quantity) AS sum_qty,
sum(l_extendedprice) AS sum_base_price,
sum(l_extendedprice * (1 - l_discount)) AS sum_disc_price,
sum(l_ext... |
<filename>migrations/2021-10-08-113656_simplify_versions_trigger/up.sql<gh_stars>1000+
-- remove the old trigger
DROP TRIGGER trigger_versions_set_updated_at ON versions;
-- add the new trigger only for the `yanked` column
CREATE TRIGGER trigger_versions_set_updated_at
BEFORE UPDATE OF yanked
ON versions
F... |
-- ETF query plan for correlated sub-query
-- start_ignore
explain select a,e from t1 where a >
(select avg(t1.a) from t1);
EXPLAIN SELECT * FROM transform( TABLE(
select a,e from t1 where a >
(select avg(a) from t1)
) );
-- end_ignore
SELECT * FROM transform( TABLE(
... |
SELECT random();
|
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 29-01-2019 a las 06:27:39
-- Versión del servidor: 5.6.21
-- Versión de PHP: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... |
-- I decided to write a PL/SQL function that would let a user add a new disease to the list of diseases
SET serveroutput ON
DECLARE
v_dname supplier.supplierName%TYPE := '&Enter_Disease_Name';
v_ddesc supplier.supplierAddress%TYPE := '&Enter_Disease_Desc';
BEGIN
INSERT INTO disease(diseaseName,di... |
<filename>src/sl3.sql
DROP TABLE IF EXISTS `users`;
DROP TABLE IF EXISTS `mailing`;
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT
UNIQUE,
user_id INTEGER UNIQUE
NOT NULL,
warns INTEGER DEFAULT (0),
muted_until DOUBLE DEFAUL... |
<gh_stars>0
CREATE DATABASE IF NOT EXISTS `trainme_db` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `trainme_db`;
-- MySQL dump 10.13 Distrib 8.0.26, for macos11 (x86_64)
--
-- Host: localhost Database: trainme_db
-- ---------------------------------... |
<reponame>FicLel/MMSN
create database MMSN
DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
use MMSN;
/* Tipo de usuarios para el correspondiente permiso a ellos */
create table tipo_usua(
id_tipo_usua int AUTO_INCREMENT not null,
nomb_tipo varchar(255) not null,
constraint primary key (id_tipo_usua)
)
EN... |
<reponame>bogdanghita/public_bi_benchmark-master_project<gh_stars>0
SELECT "MLB_65"."batter_name" AS "batter_name" FROM "MLB_65" GROUP BY 1 ORDER BY "batter_name" ASC;
|
create database A08;
use A08;
create table student(
roll_no varchar(16) primary key,
name varchar(32) not null,
admission_date date not null,
branch enum ('CS', 'ENTC', 'IT'),
percentage double check ( percentage>=0 and percentage<=100 ),
status enum ('PASS','DROP')
);
create table alumni(
... |
select s_login('test01', 'bobob4', '1.1.1.1', 'http://www.2c-why.com/' );
|
CREATE OR REPLACE PACKAGE bit_util IS
/**
* Author : <NAME> <br>
* Purpose : BIT Logical operations for binary_integers<br>
*/
-- instead of |
FUNCTION bitor(a IN BINARY_INTEGER, b IN BINARY_INTEGER) RETURN BINARY_INTEGER;
-- instead of & (faster)
FUNCTION bitxor(a IN BINARY_INTEGER, b IN BINARY_IN... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 26, 2018 at 06:58
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@... |
delete from blsoccupationhandbook;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.