sql stringlengths 6 1.05M |
|---|
<reponame>ligana/Ensemble-om-SpringBoot<gh_stars>1-10
drop table if exists IRL_INT_ADJUST_INFO;
/*==============================================================*/
/* Table: IRL_INT_ADJUST_INFO */
/*==============================================================*/
create table IR... |
<filename>BANCO_SRESTAURANTE/sql10326340_CLIENTE.sql
-- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64)
--
-- Host: sql10.freemysqlhosting.net Database: sql10326340
-- ------------------------------------------------------
-- Server version 5.5.58-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 13 Jul 2021 pada 18.04
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_... |
<reponame>bogdanghita/public_bi_benchmark-master_project
SELECT "Rentabilidad_8"."Sede Foraneo Sintec" AS "Sede Foraneo Sintec" FROM "Rentabilidad_8" GROUP BY "Rentabilidad_8"."Sede Foraneo Sintec" ORDER BY "Sede Foraneo Sintec" ASC ;
|
-- file:select.sql ln:186 expect:true
SELECT * FROM foo ORDER BY f1 NULLS FIRST
|
DROP TABLE "platyplus"."table_config";
|
<reponame>JCVenterInstitute/OMeta-Public
-- SAMPLE
-- select s.* from project p, sample s where p.projet_is_public = 1 and p.projet_id = s.sample_projet_id;
SELECT
'INSERT INTO sample ( sample_id, sample_projet_id, sample_name, sample_created_by, sample_create_date, sample_modified_by, sample_modified_date, s... |
<gh_stars>0
CREATE TABLE `person` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(32) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
|
<reponame>dominiquegueckel/gitmodule_dependency_tools
INSERT INTO SourceCodeProject (sourceCodeProjectName,SourceCodeRepositoryName)
VALUES ({}, {})
|
<gh_stars>1-10
SELECT *
FROM honeycomb_development.sections
WHERE
honeycomb_development.sections.item_id NOT IN (SELECT id FROM honeycomb_development.items);
DELETE
FROM honeycomb_development.sections
WHERE
honeycomb_development.sections.item_id NOT IN (SELECT id FROM honeycomb_development.items);
SELECT *
FROM h... |
UPDATE FOLDER SET NAME = 'Old Internal Statistics' WHERE NAME = 'Internal Statistics';
DELETE FROM STAT_DAT_SRC WHERE NAME IN (
'Stream Task Queue Size',
'PipelineStreamProcessor',
'Node Status-WriteEps',
'Node Status-ReadEps',
'Node Status-JvmNonHeapUsedMb',
'Node Status-JvmNonHeapMaxMb',
'Node Status-JvmNonHeapComit... |
<filename>src/test/resources/lexerTest/basicStatement.sql
INSERT INTO something(col1, col2) VALUES(1, 2);
|
<filename>sql/000-create.sql<gh_stars>1-10
CREATE TABLE `codeanalyzer`.`JClass` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fullyQualifiedName` varchar(230) NOT NULL,
`simpleName` varchar(230) NOT NULL,
`sourcePath` varchar(350) DEFAULT NULL,
`sourceFile` varchar(230) DEFAULT NULL,
`packageName... |
<reponame>atomlab/stihi-backend-1.0
CREATE TABLE delegate_return_cron (
id BIGSERIAL NOT NULL PRIMARY KEY,
user_name VARCHAR(255) NOT NULL,
return_to VARCHAR(255) NOT NULL,
val1000 BIGINT NOT NULL,
created_at TIMESTAMP NOT NULL,
return_at TIMESTAMP NOT NULL,
is_return BOOLEAN NOT NUL... |
<filename>user_registration.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 11, 2019 at 06:26 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
S... |
create table t (a int default 1, b int default 2);
create table s under t (c int default 3, d int default 4);
create view v (x int default 5, y int default 7, z int default 8, w int default 9) as
select * from s;
insert into v (x,z) values (default, default);
select * from v;
drop v;
drop s;
drop t; |
<filename>date_log/20180528-1.md.sql
ERROR: role "nww" cannot be dropped because some objects depend on it
2018-05-28 11:31:48| 分类: PostgreSQL | 标签:postgresql 案例 修复
如果用户名下有对象,删除用户的时候,pg就会发生类似下面的错误
ERROR: role "nww" cannot be dropped because some objects depend on it
DETAIL: owner of table public.bb
owner... |
insert into sline_tuan_content values('1','0','content','产品介绍','1','1','1','1');
insert into sline_tuan_content values('2','0','tupian','图片','0','1','0','0');
|
<gh_stars>0
-- @testpoint:opengauss关键字stable(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists stable;
create group stable with password '<PASSWORD>';
drop group stable;
--关键字带双引号-成功
drop group if exists "stable";
create group "stable" with password '<PASSWORD>';
drop group "stable";
--关键字带单引号-合理报错
drop group if exist... |
-- @testpoint:拥有系统管理员的用户执行checkpoint
checkpoint; |
<filename>previous year's questions solution/general questions/program_20.sql
-- Write a PL/SQL program to check whether an input positive number is even or odd.
-- If the number is odd, square the number and add it to the cube of that number,
-- if the number is even find the square root of that number.
-- Use Exce... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 12, 2021 at 11:45 AM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
DO $$
BEGIN
BEGIN
ALTER TABLE sys_user ADD COLUMN last_login timestamp with time zone;
EXCEPTION
WHEN duplicate_column THEN RAISE NOTICE 'column last_login already exists in sys_user.';
END;
END;
$$ |
ALTER TABLE `contest` ADD COLUMN `protected` TINYINT(1) NOT NULL DEFAULT 0 AFTER `organizer_id`;
|
WITH F(name, mtime) AS (
select d.name as name,
d.mtime as mtime
from lsdir('.') as d -- note that we have a table-valued function to
-- return the list of directory entries as a table.
-- https://github.com/nalgeon/sqlean/blob/main/docs/fileio.md
where d.name like '%.json'
... |
# --- !Ups
INSERT INTO version VALUES ('6.6.7', now(), 'Switching between auditing/validating is now optional.');
# --- !Downs
DELETE FROM version WHERE version_id = '6.6.7';
|
-- file:numeric_big.sql ln:115 expect:true
INSERT INTO num_exp_div VALUES (1,9,'.00155373656321720440836824090118155523401433947618659864741019837312257220520927734386505161089813646248796649667351126143328628425704454863454756992303589963432749519551076731247886171922191638794002726872130654066374371334533749728550759... |
-- file:int8.sql ln:148 expect:true
select '9223372036854775800'::int8 + '100'::int4
|
PRINT 'Running post-deployment scripts'
:r ./Scripts/FillData.sql |
<reponame>EricSchles/crime-data-api
DROP TABLE IF EXISTS arson_agency_reporting;
CREATE TABLE arson_agency_reporting AS
SELECT rm.data_year,
rm.agency_id,
SUM(CASE WHEN rm.reported_flag = 'Y' THEN 1 ELSE 0 END) AS months_reported
FROM arson_month rm
GROUP BY rm.data_year, rm.agency_id;
DROP TABLE IF EXISTS arson_summa... |
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE general_params ( "name" text, "value" text );
INSERT INTO "general_params" VALUES('list_report_data_table','V_NCBI_Taxonomy_List_Report');
INSERT INTO "general_params" VALUES('detail_report_data_table','V_NCBI_Taxonomy_Detail_Report');
INSERT INTO "general_... |
<reponame>rhokhh/allerleirauh<gh_stars>0
INSERT INTO contao.bl_book (title, author, year, category, tag, no, isbn) VALUES
('(Über-) Lebensgeschichten','<NAME>','keine Angabe','F','Tr','0862',null),
('1:0 für die Idioten','<NAME>','2009','B','RJ','0996',null),
('25 Jahre sex. Missbrauch als Thema i.d. Öffe... |
select Products.ProductID,
Products.ProductName,
Products.Price,
Categories.CategoryName as 'Category'
from Products, Categories
where
(Products.CategoryID =
Categories.CategoryID)
and
(Products.Price >
(select AVG(Products.price)
from Products)
... |
<filename>Application/Weibo/Info/install.sql
-- phpMyAdmin SQL Dump
-- version phpStudy 2014
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2014 年 11 月 18 日 13:45
-- 服务器版本: 5.5.38
-- PHP 版本: 5.3.28
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- 数据库: `110`
--
-- -----... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 13-04-2017 a las 03:28:47
-- Versión del servidor: 5.5.54-0ubuntu0.14.04.1
-- Versión de PHP: 5.5.9-1ubuntu4.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @... |
<filename>webserver/app-moe/sql/Archive/3.8.x/3.8.8/POCOR-3737/rollback.sql<gh_stars>1-10
-- system_patches
UPDATE `security_functions` SET `_edit`= 'StudentSurveys.edit' WHERE `id`='1012';
UPDATE `security_role_functions`
INNER JOIN `z_3737_security_role_functions` ON `z_3737_security_role_functions`.`id` = `security... |
DROP TRIGGER set_updated_at ON publisher_account;
DROP TABLE publisher_account;
ALTER TABLE account RENAME COLUMN is_superuser TO is_admin;
ALTER TABLE contribution
DROP COLUMN first_name,
DROP COLUMN last_name,
DROP COLUMN full_name;
DROP TABLE publisher_history;
DROP TABLE imprint_history;
DROP TABLE w... |
DROP DATABASE IF EXISTS employee_TrackerDB;
-- ↓ Creates the "employee_TrackerDB" database --
CREATE database employee_TrackerDB;
-- ↓ Makes it so all of the following code will affect "employee_TrackerDB" --
USE employee_TrackerDB;
-- ↓ Creates the table "department" within animals_db --
CREATE TABLE department (
-... |
insert into slider_images (id, image_id) values
(1, 'Hi from the backend!!!'),
(2, 'https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&ved=2ahUKEwjukOC6vsjdAhWwFzQIHZvzAYIQjRx6BAgBEAU&url=https%3A%2F%2Fplus.google.com%2F110385097460736686836&psig=AOvVaw0sd2KLIunPprhR-hM7Vhbl&ust=1537495269667804'... |
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.9, for linux-glibc2.5 (x86_64)
--
-- Host: 127.0.0.1 Database: SICOI
-- ------------------------------------------------------
-- Server version 5.7.10
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 09, 2022 at 12:34 PM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 7.3.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<reponame>michaeldiogo253/planejamento-familiar-rest
CREATE DATABASE IF NOT EXISTS `planejamentofamiliar`;
USE `planejamentofamiliar`;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATI... |
<filename>Utilities/SQL/5280/GenCompareDatabaseTable.sql<gh_stars>0
--========================================================================================
-- Author: <NAME>
-- Date: 10/16/2004
--
-- Description: Generates row compares the 'same' tables in different databases.
--
--===============... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 09, 2018 at 05:12 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@... |
/*
27. Write a SQL query to display the town where maximal number of employees work.
*/
USE TelerikAcademy
SELECT Count(*) AS [Number of employees],
t.Name AS [Town]
FROM Employees e
JOIN Addresses a
ON e.AddressID = a.AddressID
JOIN Towns t
ON a.TownID = t.TownID
GROUP BY t.Name
ORDER BY COUNT(*) DESC |
drop table "public"."image";
|
drop schema if exists G7;
create database G7;
-- Estructura de tabla para la tabla `usuario`
use G7;
CREATE TABLE usuario
( id INT PRIMARY KEY auto_increment,
nombre varchar(50),
apellido varchar(50),
usuario varchar(50) unique,
contrasenia varchar (40),
email varchar(100) not null,
estado boolean,
... |
<gh_stars>0
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.13
-- Dumped by pg_dump version 11.6
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_p... |
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 192.168.10.10 (MySQL 5.7.27-0ubuntu0.18.04.1)
# Database: mss
# Generation Time: 2020-01-03 07:55:24 +0000
# ******************************... |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE users (
id uuid default uuid_generate_v4 (),
username VARCHAR NOT NULL,
email VARCHAR NOT NULL,
"password" CHAR(60) NOT NULL,
PRIMARY KEY (id)
); |
--------------------------------------------------------
-- DDL for Trigger BLOG_POST_UDS_CATEGORIES_TRG
--------------------------------------------------------
CREATE OR REPLACE EDITIONABLE TRIGGER "BLOG_POST_UDS_CATEGORIES_TRG"
after
update on blog_categories
for each row
begin
-- if category change update post ... |
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: on_air
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.25-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE... |
/*rank employees based on sales all time*/
select first_name, last_name, sum(sale_total)
from employee, sales
where employee.eid = sales.eid
group by sales.eid
order by sum(sale_total) desc;
/*purchases in the past year from a particular customer (customer name, item id, name of item, date of purchase, quantity, sale ... |
<reponame>DevGroup-ru/yii2-tag-dependency-helper<filename>tests/migrations/mysql.sql
/**
* MySQL
*/
DROP TABLE IF EXISTS `post`;
CREATE TABLE `post` (
`id` INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`author_id` INT(11) NOT NULL DEFAULT 0,
`text` TEXT NOT NULL
);
|
<filename>Databases/SqlServerCentral/state/Tables/dbo.CommunityServerBlogOwners.sql
CREATE TABLE [dbo].[CommunityServerBlogOwners]
(
[Id] [int] NOT NULL IDENTITY(1, 1),
[UserId] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CommunityServerBlogOwners] ADD CONSTRAINT [PK__Communit__3214EC071A9EF37A] PRIMARY KEY CLU... |
<filename>src/Security/AzureCRM/Person/Stored Procedures/GetAddressType.sql
CREATE PROCEDURE [dbo].[GetAddressType]
AS
SELECT * from [Person].[AddressType]
RETURN 0
|
<reponame>DanielHeath/activefacts-compositions
// This examples shows identification of a ValueType table by its value,
// and of an EntityType by a foreign key on to that value
vocabulary Countries;
Country Code [separate] is written as Char(3);
Country [separate] is identified by its Code;
|
-- begin query that extracts the data
SELECT
MAX(subject_id) AS subject_id
, MAX(hadm_id) AS hadm_id
, MAX(charttime) AS charttime
, le.specimen_id
-- convert from itemid into a meaningful column
, MAX(CASE WHEN itemid = 51003 THEN value ELSE NULL END) AS troponin_t
, MAX(CASE WHEN itemid = 50911 THEN v... |
<reponame>luke-h1/explore-education-statistics<gh_stars>1-10
begin
declare @subjectId uniqueidentifier = '0054a4c1-cb69-4eb2-58b5-08d94cfdb0f5'
declare @geographicLevel nvarchar(6)
declare @timePeriodList TimePeriodListType
insert @timePeriodList values (2013, 'AY'), (2016, 'AY')
declare @countri... |
-- 2019-07-17T12:54:17.634Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value,ValueName) VALUES (0,0,541987,195,TO_TIMESTAMP('2019-07-17 15:54:17','YYYY-MM-DD... |
<filename>database/postgres/007-alter-table.sql
CREATE INDEX traderequests_accountid_idx ON tickerbeats.traderequests USING btree (accountid, deleted, created); |
<filename>src/main/resources/schema.sql
CREATE TABLE IF NOT EXISTS public.account
(
id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 ),
active boolean NOT NULL DEFAULT true,
name character varying NOT NULL,
num character varying,
CONSTRAINT account_pk PRIMARY KEY (id)
);
CREATE TA... |
--The top N populated cities in a distrct
SELECT
city.name AS 'city',
country.name AS 'country',
city.district,
city.population
FROM city
JOIN country
ON city.countrycode = country.code
WHERE district = 'Bretagne'
ORDER BY population DESC
LIMIT n ; |
<reponame>AbstractBits/sql-edu-crm
create or replace function insert_after_transfers_fn() returns trigger language plpgsql as $$
begin
update accounts set
account_balance = account_balance - new.transfer_amount
where account_id = new.sender_id;
return new;
end;
$$;
create trigger insert_after_transfers
after... |
<reponame>ipsozzZ/Environmental-Corrosion
INSERT INTO corrosion.carousel (id, img, linkto) VALUES (2, '/uploads/20181105/4d92c86d046a6de9b28cc310be25529a.jpg', '/');
INSERT INTO corrosion.carousel (id, img, linkto) VALUES (3, '/uploads/20181105/66f96b9a8b45c9ba8a885d8b05d55581.jpg', '/'); |
<reponame>aceoperator/mw<filename>mw-assembly/src/main/assembly/.mw/db/mw.mysql.create.core.sql
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';
-- -------------------------------... |
alter table book
add column fts_vectors tsvector
generated always as (
setweight(
to_tsvector(
'{{FTS_LANGUAGE}}',
case when metadata #>> '{book,title}' is null then '' else metadata #>> '{book,title}' end
) ||
... |
<reponame>hemmerling/sql-stanford2013
update LateRating set stars = stars - 2 where stars > 2;
update LateRating set mID = 100, stars = stars + 2;
update LateRating set ratingDate = null, stars = stars + 2;
select * from LateRating; |
<filename>Cheburashka/Tests/TestScripts/CheckUniqueIndexHasNoNullColumns_MixedCaseRule/CheckUniqueIndexHasNoNullColumnsRule_Table_With_Null_Column.sql<gh_stars>1-10
CREATE TABLE dbo.CheckUniqueIndexHasNoNullColumnsRule_Table_With_Null_Column
( A int not null
, B int null
, C int null
, ... |
<reponame>martinrupp/benchmarks
SELECT
PS_PARTKEY,
SUM(PS_SUPPLYCOST * PS_AVAILQTY) AS VAL
FROM
TPCH.PARTSUPP,
TPCH.SUPPLIER,
TPCH.NATION
WHERE
PS_SUPPKEY = S_SUPPKEY
AND S_NATIONKEY = N_NATIONKEY
AND N_NAME = 'GERMANY'
GROUP BY
PS_PARTKEY
HAVING
SUM(PS_SUPPLYCOST * PS_AVAILQTY) > (
SELECT SUM(P... |
<reponame>LabKey/wnprc-modules
SELECT
*,
wg.id.dataset.activehousing.room as CurrentRoom,
wg.id.dataset.activehousing.cage as CurrentCage,
FROM waterGiven wg |
<gh_stars>1-10
IF OBJECT_ID('sales.settle_customer_due') IS NOT NULL
DROP PROCEDURE sales.settle_customer_due;
GO
CREATE PROCEDURE sales.settle_customer_due(@customer_id integer, @office_id integer)
AS
BEGIN
SET NOCOUNT ON;
SET XACT_ABORT ON;
DECLARE @settled_transactions TABLE
(
... |
<gh_stars>100-1000
ALTER TABLE job ADD COLUMN restarted boolean default false;
|
-- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64)
--
-- Host: localhost Database: DU
-- ------------------------------------------------------
-- Server version 5.7.29-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES... |
<gh_stars>1-10
-- Xuất danh sách các quản trị viên phân quyền Moderator
--
-- exec usp_findAllManager
Create Procedure usp_findAllManager
As
Begin
Select qtl.CMND, qtl.HoTen, qtl.TenDangNhap, qtl.QuanTriVien, hx.TenHangXe
From QuanTriVien qtl Left Join HangXe hx on qtl.HangXe = hx.MaHangXe
Where qtl.QuanTriVien = '... |
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 23-12-2019 a las 12:47:29
-- Versión del servidor: 10.4.8-MariaDB
-- Versión de PHP: 7.1.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
CREATE TABLE products (
product_id int AUTO_INCREMENT PRIMARY KEY,
name varchar(20),
description varchar(30)
);
CREATE TABLE variants (
variant_id int AUTO_INCREMENT PRIMARY KEY,
variant varchar(50)
);
CREATE TABLE variant_value (
value_id int AUTO_INCREMENT PRIMARY KEY,
varia... |
<gh_stars>0
CREATE TABLE [dbo].[SampleData]
(
[Id] BIGINT NOT NULL IDENTITY(1,1) PRIMARY KEY,
[Identifer] UNIQUEIDENTIFIER NOT NULL,
[Gender] CHAR(1) NOT NULL,
[FirstName] NVARCHAR(256) NOT NULL,
[Surname] NVARCHAR(256) NOT NULL,
[DateOfBirth] DATE NOT NULL,
[IsMarried] BIT NOT NULL,
... |
<reponame>tomvlk/php-framework<filename>scripts/testing_mysql.sql
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE DATABASE IF NOT EXISTS `testdb1` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `testdb1`;
DROP TABLE IF EXISTS `smvc_car`;
CREATE TABLE IF NOT EXISTS `smvc_car` (
`c... |
UPDATE character_quests SET name='Q00257_TheGuardIsBusy' WHERE name='257_GuardIsBusy1';
UPDATE character_quests SET name='Q00260_OrcHunting' WHERE name='260_HuntForOrcs1';
UPDATE character_quests SET name='Q00265_BondsOfSlavery' WHERE name='265_ChainsOfSlavery';
UPDATE character_quests SET name='Q00274_SkirmishWithTheW... |
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 09, 2018 at 08:53 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
create table DuplicateMatchProjection
(
id varchar(255) not null,
createdAt datetime(3) not null,
lastModifiedAt datetime(3) not null,
pictureId varchar(255) not null,
targetId varchar(255) not null,
similarity integer not null... |
INSERT INTO visualization (id,visualization,exercise_id) VALUES (1,'treeTraversal',1); |
IF OBJECT_ID('zmetric.dateCountersEx') IS NOT NULL
DROP VIEW zmetric.dateCountersEx
GO
CREATE VIEW zmetric.dateCountersEx
AS
SELECT C.groupID, G.groupName, DC.counterID, C.counterName, DC.counterDate,
DC.subjectID, subjectText = COALESCE(O.columnName, LS.[fullText], LS.lookupText),
DC.keyID, keyT... |
/*
Eliminación de Base de Datos
----------------------------
Eliminar una base de datos implica borrar la base de datos físicamente.
Toda la data y objectos asociados a la base de datos serán borrados de
forma permanente y no puede ser revertido. Por lo tanto, es importante
ejecutar esta sentencia con mucho cuidado.
S... |
# Write your MySQL query statement below
SELECT id,
SUM(CASE month WHEN 'Jan' THEN revenue ELSE Null END) AS Jan_Revenue,
SUM(CASE month WHEN 'Feb' THEN revenue ELSE Null END) AS Feb_Revenue,
SUM(CASE month WHEN 'Mar' THEN revenue ELSE Null END) AS Mar_Revenue,
SUM(CASE month WHEN 'Apr' THEN revenue ELSE Null END) AS A... |
INSERT INTO user_com(
name_com,
surname_com,
birthday_com,
cpf_com,
gender_com,
login_com,
email_com,
password_com)
VALUES
(
'Cecília',
'<NAME>',
'1970-06-24',
'966.890.943-75',
'F',
'usuaria',
'<EMAIL>',
'nTwRKrYILq'
);
SELECT * FROM user_com;
|
/********************************************************************************
file-centric-snapshot-mrcm-refset-attribute-domain-valid-moduleid.sql
Assertion:
Module ID is valid in MRCM Attribute Domain Refset snapshot.
********************************************************************************/
insert int... |
<reponame>aehrc/release-validation-framework<filename>importer/src/main/resources/scripts/component-centric/component-centric-snapshot-description-closing-parens.sql
/********************************************************************************
file-centric-snapshot-description-closing-parens
Assertion:
All Ac... |
/*
Navicat MySQL Data Transfer
Source Server : 我的腾讯云
Source Server Type : MySQL
Source Server Version : 50725
Source Host : 172.16.17.32:3306
Source Schema : my_shiro
Target Server Type : MySQL
Target Server Version : 50725
File Encoding : 65001
Date: 20/06/2019 11:0... |
-- Name: EquivalenceClassStatusSummary
-- Schema: posda_files
-- Columns: ['patient_id', 'study_instance_uid', 'series_instance_uid', 'processing_status', 'count']
-- Args: []
-- Tags: ['find_series', 'equivalence_classes', 'consistency', 'visual_review']
-- Description: Find Series with more than n equivalence class
... |
<reponame>Zhaojia2019/cubrid-testcases
--test hash partition
--DML,DDL combination tests: create -> drop -> remove
drop table if exists nation2;
CREATE TABLE nation2 (
code CHAR (3),
name VARCHAR (50)
)
PARTITION BY HASH (code) PARTITIONS 4;
SELECT dt.class_of.partition, dt.class_of.class_name, dt.* FROM _db_... |
-- @testpoint:opengauss关键字false(保留),作为角色名
--关键字不带引号-失败
drop role if exists false;
create role false with password '<PASSWORD>' valid until '2020-12-31';
--关键字带双引号-成功
drop role if exists "false";
create role "false" with password '<PASSWORD>' valid until '2020-12-31';
drop role "false";
--关键字带单引号-合理报错
drop role if e... |
<filename>chrome/test/data/History/history.21.sql
BEGIN TRANSACTION;
-- Version reset
CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY,value LONGVARCHAR);
INSERT INTO "meta" VALUES('version','21');
INSERT INTO "meta" VALUES('last_compatible_version','16');
-- Create old androi_urls table
CREATE TABLE andr... |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
SELECT (
IF(
( SELECT IF( (
SELECT column_type
FROM information_schema.columns
WHERE table_schema = DATABASE() AND table_name = "user" AND column_name = "username"
) = "varchar(64)", 1, 0 ) ) +
( SELECT IF( (
SELECT column_type
FROM... |
DROP TRIGGER IF EXISTS mindsurf.WHEN_UPDATE_IDEA;
DELIMITER //
CREATE TRIGGER mindsurf.WHEN_UPDATE_IDEA AFTER UPDATE ON mindsurf.IDEA
FOR EACH ROW
BEGIN
IF (NEW.tag_id!=OLD.tag_id) THEN
UPDATE mindsurf.TAG SET ideas=ideas+1 WHERE id=NEW.tag_id;
UPDATE mindsurf.TAG SET ideas=ideas-1 WHERE id... |
-- --------------------------------------------------------
-- 主机: localhost
-- 服务器版本: 5.7.19 - MySQL Community Server (GPL)
-- 服务器操作系统: Win64
-- HeidiSQL 版本: 9.4.0.5125
-- -------------------------------------------------------... |
create table settings (id INT auto_increment, settings varchar(1024), PRIMARY KEY (id));
INSERT INTO settings (id, settings) VALUES (1, '{"uiVersion": "2.3"}');
|
use online_donations;
insert into country (name ) values ('Saudi Arabia');
insert into country (name ) values ('Russia');
insert into country (name ) values ('Sweden');
insert into country (name ) values ('Japan');
insert into country (name ) values ('Brazil');
insert into country (name ) values ('Armenia');
insert int... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.