sql stringlengths 6 1.05M |
|---|
<reponame>elkaissialae/node-docker-alae
-- Poor man's migrations --
-- 12/18/17 --
CREATE TABLE public.colleges
(
id SERIAL PRIMARY KEY NOT NULL,
name VARCHAR NOT NULL,
created_at TIMESTAMP DEFAULT NULL ,
updated_at TIMESTAMP DEFAULT NULL
);
|
<reponame>lufrodriguezpo/Home
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 16, 2017 at 05:05 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone =... |
<filename>EpiInfo.Database.EIWeb/dbo/Tables/SurveyResponseUser.sql
CREATE TABLE [dbo].[SurveyResponseUser](
[UserId] [int] NOT NULL,
[ResponseId] [uniqueidentifier] NOT NULL,
CONSTRAINT [PK_SurveyResponseUser] PRIMARY KEY CLUSTERED
(
[UserId] ASC,
[ResponseId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE =... |
<gh_stars>1-10
/* islandIn */
DROP TABLE IF EXISTS islandIn
;
CREATE TABLE IF NOT EXISTS islandIn(
Island VARCHAR2(50),
Sea VARCHAR2(50),
Lake VARCHAR2(50),
River VARCHAR2(50)
)
;
INSERT INTO islandIn(Island,Sea,Lake,River) VALUES
('Svalbard','Norwegian Sea',NULL,NULL),
('Svalbard','Greenland Sea',NULL,NULL)... |
-- begin DASHBOARD_WIDGET_TEMPLATE
alter table DASHBOARD_WIDGET_TEMPLATE add constraint FK_DASHBOARD_WIDGET_TEMPLATE_GROUP foreign key (GROUP_ID) references DASHBOARD_TEMPLATE_GROUP(ID)^
create index IDX_DASHBOARD_WIDGET_TEMPLATE_GROUP on DASHBOARD_WIDGET_TEMPLATE (GROUP_ID)^
-- end DASHBOARD_WIDGET_TEMPLATE
-- begin ... |
DROP ALL OBJECTS;
CREATE TABLE ADDRESS (
id int not null IDENTITY,
street_name varchar(100),
city varchar(100) not null,
version int default 0,
primary key (id)
);
CREATE TABLE ACCOUNT (
id ... |
-- # $Id$
/*
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"); you... |
<gh_stars>1-10
create table if not exists guild_settings
(
guild_id bigint NOT NULL,
prefix text,
PRIMARY KEY (guild_id)
);
|
-- Configure the DB2 to allow MQT based optimization
-- DFT_REFRESH_AGE - default value for CURRENT REFRESH AGE special register
-- DFT_MTTB_TYPES - default value for CURRENT MAINTAINED TABLE TYPES FOR OPTIMIZATION special register
UPDATE DB CFG FOR BIGSQL USING DFT_REFRESH_AGE ANY;
UPDATE DB CFG FOR BIGSQL USIN... |
<filename>master/static/migrations/20210903092940_add-allocation-columns.tx.down.sql
ALTER TABLE public.allocations
DROP COLUMN slots,
DROP COLUMN agent_label;
|
<filename>tests/queries/1_stateful/00086_array_reduce.sql
SELECT arrayFilter(x -> x != 1, arrayMap((a, b) -> a = b, GeneralInterests, arrayReduce('groupArray', GeneralInterests))) AS res FROM test.hits WHERE length(res) != 0;
|
<filename>sql/grad19.sql
INSERT INTO `graduates`
(`id`, `units_id`, `fam`, `nam`, `sur`, `photo1`, `photo2`, `info`, `rip`, `locals_id`)
VALUES
(NULL,10,'Бочаров','Александр','Викторович','19_01.jpg','','',0,1),
(NULL,10,'Голубев','Александр','Львович','19_02.jpg','','',0,1),
(NULL,10,'Горбатенко','Михаил','Петр... |
<filename>migration/2020/20201215/up.sql
ALTER TABLE map_cell
ADD COLUMN link_url text;
|
<filename>scripts/Aula/DDL.sql<gh_stars>0
USE [Cursos]
GO
DROP TABLE IF EXISTS [Curso]
GO
CREATE TABLE [Curso](
[Id] INT NOT NULL IDENTITY,
[Nome] NVARCHAR(80) NOT NULL,
[CategoriaId] INT NOT NULL
)
GO
-- Criacao da tadela categoria
DROP TABLE IF EXISTS [Categoria]
GO
CREATE TABLE [Categoria](
[Id] ... |
<filename>packages/UsageAnalysis/queries/param_queries.sql<gh_stars>0
--name: _groupCompleter
--input: string sub
--connection: System:Datagrok
select id, name from (
select id, name, (case when name = @sub then 10 when name like @sub || '%' then 9 else 1 end) as weight from groups
where personal = false and name ilike... |
<reponame>Panger95/tkStrikeDB
DROP TABLE IF EXISTS TKS_DIFFERENTIAL_SCORE_DEF;
CREATE TABLE TKS_DIFFERENTIAL_SCORE_DEF(ID VARCHAR(45) NOT NULL PRIMARY KEY,VERSION INTEGER,PHASE_ID VARCHAR(45) NOT NULL,SUBCATEGORY_ID VARCHAR(45) NOT NULL,THE_VALUE INTEGER DEFAULT 0);
INSERT INTO TKS_DIFFERENTIAL_SCORE_DEF VALUES
-- -- W... |
begin;
-- query for nearby points
select id, category
from forum_example.job
where st_dwithin(
geom,
st_geomfromtext('point(0 0)', 26910),
1000
);
SELECT row_to_json(fc)
FROM ( SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As jobs
FROM (SELECT 'Feature' As type
, ST_AsGeoJSON(lg.geom)::j... |
if exists (select * from sysobjects where id = object_id(N'[dbo].[TestParameterSPCheckBox]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[TestParameterSPCheckBox]
GO
CREATE PROCEDURE [dbo].[TestParameterSPCheckBox]
AS
SELECT 1 [Value], 'MyCBValue1' [Name]
UNION ALL
SELECT 2 , 'MyCBVa... |
<reponame>markliu2013/java-tutorial
create database jdbc;
use jdbc;
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
`birthday` datetime DEFAULT NULL,
`money` decimal(15,2) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMEN... |
<filename>database/2.3_migrate_locations.sql
INSERT INTO ospos_stock_locations (location_name) (SELECT location FROM ospos_items WHERE NOT EXISTS (select location from ospos_stock_locations where location_name = location));
INSERT INTO ospos_item_quantities (item_id, location_id, quantity) (SELECT item_id, location_id,... |
<gh_stars>1-10
IF OBJECT_ID('DateList', 'U') IS NOT NULL
BEGIN
DROP TABLE [dbo].DateList
END
GO
/* --- create table -------------------- */
CREATE TABLE dbo.DateList
(
[Date] DATE NOT NULL,
[Year] SMALLINT,
--YearFiscal SMALLINT,
[Quarter] TINYINT,
-- need fiscal quarter
[Month] TINYIN... |
CREATE TABLE minicloud_users (
id BiGSERIAL UNIQUE PRIMARY KEY,
uuid VARCHAR(32) NOT NULL UNIQUE DEFAULT lpad(md5(random()::text), 32),
name TEXT UNIQUE NOT NULL,
email TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
admin BOOLEAN NOT NULL DEFAULT false,
disabled BOOLEAN NOT NULL DEFAULT false,
media TEXT,
activation_key... |
<reponame>BugsUK/FindApprenticeship
Create PROCEDURE [dbo].[uspGetUniqueKeyRegister]
@KeyValue nvarchar(100)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
SELECT count(1) as KeyCount from UniqueKeyRegister Where
KeyValue=@KeyValue
... |
<reponame>almasen/rdf-mapped<filename>server/migrations/sqls/20200518225515-add-constraints-up.sql
-- -- foreign keys
-- Reference: category_capability (table: category)
ALTER TABLE category ADD CONSTRAINT category_capability
FOREIGN KEY (capability_id)
REFERENCES capability (id)
NOT DEFERRABLE
... |
/* NOTE
This SQL file contain the following tables:
Cell, Location, RestaurantTable
With data related to each tables
*/;
USE `zg6kbqpoxrbx4hox`;
CREATE TABLE IF NOT EXISTS `Cell` (
`x_coord` int(11) NOT NULL,
`y_coord` int(11) NOT NULL,
`confidence` int(11) NOT NULL,
PRIMARY KEY (`x_coord`,`y_coord`)
);
--... |
CREATE DATABASE IF NOT EXISTS `chat` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `chat`;
-- MySQL dump 10.13 Distrib 5.1.66, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: chat
-- ------------------------------------------------------
-- Server version 5.1.66
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50721
Source Host : localhost:3306
Source Database : activity
Target Server Type : MYSQL
Target Server Version : 50721
File Encoding : 65001
Date: 2018-12-17 17:17:07
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... |
<reponame>Lucius-CN/strack
/*
Navicat Premium Data Transfer
Source Server : mysql5.7
Source Server Type : MySQL
Source Server Version : 50730
Source Host : 10.168.30.17:3306
Source Schema : strack_test
Target Server Type : MySQL
Target Server Version : 50730
File Encoding ... |
<gh_stars>1-10
Create PROCEDURE [EntityCode].[EventResourceSave]
@Id Int,
@Key Uniqueidentifier,
@EventKey Uniqueidentifier,
@EventName nvarchar(50),
@EventDescription nvarchar(2000),
@ResourceKey Uniqueidentifier,
@ResourceName nvarchar(50),
@ResourceDescript... |
<filename>TestScenarios/Read_CheckConstraints/Database.MySql^8.sql
CREATE TABLE `Person` (
Id int CHECK (Id > 1),
Name nvarchar(255) not null
);
ALTER TABLE `Person`
ADD CONSTRAINT `CK_Name_LongerThan3`
CHECK (char_length(`Name`) > 3); |
select id, display_name, block_volume_id
from oci.oci_core_block_volume_replica
where display_name = '{{ resourceName }}'; |
select arn, name, partition, region, tags, title
from aws.aws_elastic_beanstalk_application
where akas::text = '["{{ output.resource_aka.value }}"]'; |
<gh_stars>1000+
-- Database: mariadb
|
<gh_stars>1000+
UPDATE hydra_client SET audience='';
ALTER TABLE hydra_client ALTER COLUMN audience SET NOT NULL;
|
-- This script adds additional indexes to the horde_prefs table that should
-- improve loading of preferences from the preference table.
--
-- $Horde: horde/scripts/upgrades/2006-06-29_horde_prefs_indexes.sql,v 1.1.2.2 2007/12/20 15:03:04 jan Exp $
CREATE INDEX pref_uid_idx ON horde_prefs (pref_uid);
CREATE INDEX pref... |
<reponame>joshualley/BigBall
use bigball;
select row_number() over(order by id) as seq, id from User
|
-- Benchmark Universe
select
cast(stu.id as varchar) + '@example.org'
as 'adusername',
cast(stu.id as varchar) + '@example.org'
as "input[name='username']",
lower(substring(stu.fn, 1, 1)) +
lower(substring(stu.ln, 1, 1)) +
cast(stu.id as varchar)
as "input[name='password']"
from
stu
where
stu.sc in (
1,
... |
<filename>application/views/v_admin/layout/tes.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 18 Mar 2021 pada 05.56
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time... |
<reponame>BlueDress/School
select FirstName, LastName from Employees
where DepartmentID != 4 |
use cadastro;
describe pessoas;
alter table pessoas
add column profissao varchar(10);
select * from pessoas;
alter table pessoas
drop column profissao;
select * from pessoas;
alter table pessoas
add column profissao varchar(10) after nome;
describe pessoas;
alter table pessoas
add column codigo int first;
sele... |
<reponame>Moha1234567890/Laravel-App-for-Rest-Api
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 25, 2021 at 02:36 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACT... |
<filename>test/sql_querys/SQL - CREATE - new.sql
CREATE DATABASE IF NOT EXISTS clinicaloscedros;
USE clinicaloscedros;
CREATE TABLE IF NOT EXISTS empleado (
id int not null auto_increment primary key,
nombre varchar(100) not null,
imagen varchar(255) not null,
sexo char not null
) ENGINE=InnoDB CHARACTER SE... |
<reponame>sjhanFinsetN/samsblog
-- Create main database
CREATE DATABASE IF NOT EXISTS `samsblog_db`;
-- Create shadow database for prisma
CREATE DATABASE IF NOT EXISTS `samsblog_shadow_db`;
-- To GRANT ALL privileges to a user(mysql), allowing that user full control over a shadow database
GRANT ALL PRIVILEGES ON samsb... |
<gh_stars>0
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE DATABASE `studentinfo`;
USE `studentinfo`;
CREATE TABLE IF NOT EXISTS `students` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sname` longtext NOT NULL,
`rollno` mediumtext NOT NULL,
`regno` int(11) NOT NULL,
`dname` longtext NOT NULL,
PRIMARY KEY (`id`... |
INSERT INTO pos_itemtemp VALUES("IATT200004829","193133","191001","192015","47272","1","47272","0","47272","1","1","1","IAT1701200848","NHO2018000007","PAID","","193133"),
("IATT200004829","193181","191001","192015","29545","1","29545","0","29545","1","1","1","IAT1701200848","NHO2018000007","PAID","","193181"),
("IATT2... |
CREATE TABLE subdivisions (
country_code text NOT NULL
, code_31662 text NOT NULL
, name text
, local_variant text
, language_code text
, romanization_system text
, parent_subdivision text
, PRIMARY KEY (country_code , code_31662)
, FOREIGN KEY (country_code) REFERENCES countries (al... |
SET NAMES UTF8;
DROP DATABASE IF EXISTS FOODKING;
CREATE DATABASE FOODKING CHARSET=UTF8;
USE FOODKING;
/**用户信息**/
CREATE TABLE fk_user(
uid INT PRIMARY KEY AUTO_INCREMENT, #编号
uname varchar(32), #姓名
email varchar(32), #账号——邮箱
upwd varchar(32), ... |
SELECT c.CountryCode, mount.MountainRange, p.PeakName, p.Elevation
FROM Countries AS c
JOIN MountainsCountries AS m
ON m.CountryCode = c.CountryCode AND m.CountryCode = 'BG'
JOIN Peaks AS p
ON p.MountainId = m.MountainId AND p.Elevation > 2835
JOIN Mountains AS mount
ON mount.Id = m.MountainId
ORDER B... |
<filename>db/db/4init_param/MB/MB_LINK_CONDITION.sql
TRUNCATE TABLE mb_link_condition;
COMMIT;
|
<filename>analysis/sql/scratch.sql<gh_stars>1-10
DROP TABLE _ab_1378435_contributions1;
-- create first table
CREATE TABLE _ab_1378435_contributions1 AS
WITH target_fec_files AS (
SELECT 1378435 AS fec_file
)
SELECT actor_individual_id,
location_id,
amount,
contributed,
... |
# --- !Ups
CREATE TABLE Speakerz (
id varchar(255) NOT NULL,
document json NOT NULL,
PRIMARY KEY (id)
);
# --- !Downs
DROP TABLE Speakerz; |
/*
must begin with the end in mind
the end is to load data in mssql
so... make a dictionary that's keyed on sql table and column + seq in case comes from more than one place in u2
dictionary shows file, location, format, char separator for concatenation, default, error behavior (fail, default)
*/
create tab... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 13, 2017 at 02:56 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
CREATE database if NOT EXISTS `nacos` default character set utf8mb4 collate utf8mb4_general_ci;
use `nacos`;
/*
Navicat Premium Data Transfer
Source Server : mysql5.7
Source Server Type : MySQL
Source Server Version : 50727
Source Host : 127.0.0.1:3306
Source Schema : nacos
Target... |
<reponame>ChenShuai1981/flink-sql-submit<gh_stars>0
-- 使用 TableEnvironment
-- source
CREATE TABLE player_source (
player_id BIGINT,
team_id BIGINT,
player_name VARCHAR,
height DOUBLE
) WITH (
'connector.type' = 'filesystem',
'connector.path' = 'file:///Users/chenshuai1/github/flink-sql-submit/src/main/reso... |
SELECT catcheffort.fishery,
catcheffort.gridresolution,
catcheffort.rfmo,
catcheffort.effort_units,
catcheffort.catch_units,
catcheffort.cpue_units,
catcheffort.dates,
catcheffort.lat,
catcheffort.lon,
catcheffort.effort,
catcheffort.species,
catcheffort.catch,
catcheffo... |
-- 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 NOTICES files in the project root for more information.
do $$
declare appId int;
declare relationshipBased... |
/****** Object: Rule [booleanRule2] Script Date: 1/1/2017 12:00:00 AM ******/
-- comment
CREATE RULE booleanRule2
as @booleanValue in (1, 0)
GO
|
<gh_stars>100-1000
select foo, bar from baz limit 7 offset 42
|
<reponame>digitalsatori/narrows
CREATE TABLE narration_exports (id integer AUTO_INCREMENT PRIMARY KEY,
character_id integer,
token varchar(128),
created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
... |
<filename>openGaussBase/testcase/KEYWORDS/numstr/Opengauss_Function_Keyword_Numstr_Case0029.sql
-- @testpoint:opengauss关键字numstr(非保留),作为表空间名
--关键字不带引号,创建成功
drop tablespace if exists numstr;
CREATE TABLESPACE numstr RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
drop tablespace numstr;
--关键字带双引号,创建成功
drop t... |
-- Table: messages
insert into messages values (1,1,'Important: free sex','Call 054638749 NOW!');
insert into messages values (2,2,null,'Kthxbye');
|
<reponame>yuting1214/Leetcode_Database
# Solution
select name, bonus
from Employee e
left join Bonus b
on e.empId = b.empId
where b.bonus < 1000 or b.bonus is null
|
<reponame>suxstellino/events<filename>2015/SQLSat462 - Parma/src/db/04 - unsupported.sql
USE Samples;
GO
IF EXISTS(SELECT 1 FROM sys.tables WHERE name = 'CLRTypes')
DROP TABLE dbo.CLRTypes;
GO
CREATE TABLE dbo.CLRTypes (
Id hierarchyid PRIMARY KEY,
value xml,
geo geography
);
GO
DECLARE @root hierarchyid = hiera... |
-- CreateTable
CREATE TABLE `Policy` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`title` VARCHAR(191) NOT NULL,
`contents` TEXT NOT NULL,
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`updatedAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
UNIQUE INDEX `Policy_title_key`(`ti... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 2018-05-01 08:41:12
-- 服务器版本: 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 = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 17-07-2019 a las 21:42:59
-- Versión del servidor: 5.7.26
-- Versión de PHP: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... |
DROP DATABASE IF EXISTS pokemon_db;
CREATE DATABASE pokemon_db;
USE pokemon_db;
CREATE TABLE pokemon
(
id INT NOT NULL AUTO_INCREMENT,
pokemon_id INT NOT NULL,
pokemon_name VARCHAR(255),
pokemon_nickName VARCHAR(255),
pokemon_front_sprite_url VARCHAR(255) NOT NULL,
appeared BOOLEAN DEFAULT fal... |
<reponame>krasiymihajlov/Soft-Uni-practices
SELECT * FROM Towns ORDER BY Name
SELECT * FROM Departments ORDER BY Name
SELECT * FROM Employees ORDER BY Salary DESC |
create table if not exists clients(
id varchar(100) primary key,
first_name varchar(200),
last_name varchar(200),
login varchar(100),
chat_id varchar(100),
active boolean
); |
set echo on
set timing on
set time on
set lines 200
set pages 5000
set serveroutput on
EXEC DBMS_SESSION.set_identifier('backoffice');
select a.spid
from v$process a, v$session b
where a.addr = b.paddr
and b.audsid = userenv('sessionid')
/
show parameter timed_statistics;
alter sessio... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 19-03-2020 a las 19:49:46
-- Versión del servidor: 10.3.16-MariaDB
-- Versión de PHP: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00"... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.19 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 9.5.0.5196
-- --------------------------------------------------------
/*... |
SELECT ct.FirstName, ct.Age, ct.PhoneNumber
FROM Customers AS ct
JOIN Countries AS c
ON c.Id = ct.CountryId
WHERE ct.Age >= 21 AND (ct.FirstName LIKE '%an%' OR ct.PhoneNumber LIKE '%38' ) AND c.Name <> ('Greece')
ORDER BY ct.FirstName, ct.Age DESC
|
Create table If Not Exists Traffic (user_id int, activity ENUM('login', 'logout', 'jobs', 'groups', 'homepage'), activity_date date);
Truncate table Traffic;
insert into Traffic (user_id, activity, activity_date) values ('1', 'login', '2019-05-01');
insert into Traffic (user_id, activity, activity_date) values ('1', 'h... |
CREATE OR REPLACE FUNCTION e_is_body_text(
text_value TEXT
)
RETURNS BOOL
LANGUAGE SQL
IMMUTABLE
RETURNS NULL ON NULL INPUT
PARALLEL SAFE
AS $$
SELECT (LENGTH(text_value) > 0)
$$;
|
CREATE TABLE IF NOT EXISTS block (
id SERIAL UNIQUE,
hash BYTEA PRIMARY KEY,
prev_hash BYTEA NOT NULL,
height INTEGER NOT NULL,
tags INTEGER[] NOT NULL,
missing_tx INTEGE... |
DROP DATABASE test_interview;
CREATE DATABASE test_interview;
|
<filename>db/seeds.sql
# Sample burgers
INSERT INTO burgers (burger_name) VALUES ('Portland Hipster: Beyond Burger with organic bacon, pickled onions, avocados and house-made aoili');
INSERT INTO burgers (burger_name) VALUES ('All-American: 1lb beef burger with american cheese, lettuce, onions, dill pickles, and ketchu... |
<filename>plugins/probaug/db/mysql/data/2014-09-12_16-33-22_menues.sql
INSERT INTO `u_menues` (`name`, `name_low-german`, `name_english`, `name_polish`, `name_vietnamese`, `links`, `obermenue`, `menueebene`, `target`, `order`) VALUES
('Bauauskunft', 'Bauauskunft', 'Bauauskunft', NULL, 'Thông tin xây dựng', 'index.p... |
-- Table countries_list_default
SET NAMES 'utf8';
TRUNCATE TABLE `countries_list_default`;
INSERT INTO `countries_list_default` (`lang`, `show`) VALUES ('DE', 'AT');
INSERT INTO `countries_list_default` (`lang`, `show`) VALUES ('DE', 'BE');
INSERT INTO `countries_list_default` (`lang`, `show`) VALUES ('DE', 'CH');
INSE... |
<reponame>dsernag/misionTicUSAPython
INSERT INTO `fabrica` (`numero_fabrica`, `cantidad_empleados`, `pais`, `gerente`)
VALUES (NULL, '300', 'Colombia', '<NAME>'),
(NULL, '256', 'Estados Unidos', '<NAME>'),
(NULL, '874', 'India', 'Palm Alhoi'),
(NULL, '10', 'Colombia', '<NAME>') |
Insert into SH_PARM_T
( SH_PARM_NMSPC_CD, SH_PARM_DTL_TYP_CD, SH_PARM_NM, OBJ_ID, VER_NBR, SH_PARM_TYP_CD, SH_PARM_TXT, SH_PARM_DESC, SH_PARM_CONS_CD, WRKGRP_NM, ACTIVE_IND)
Values
('KC-PROTOCOL','D','irb.protocol.billable', 'F1C228F9D4D8408A8E0BBC801C9525ak', 1,'CONFG','Y','Billable is configurable at impl time','A',... |
<gh_stars>0
-- *********************************************************************
-- $URL: https://source.sakaiproject.org/contrib/etudes/melete/tags/2.9.9/components/src/sql/mysql/seqxml_script.sql $
-- $Id: seqxml_script.sql 56413 2008-12-19 22:20:19Z <EMAIL> $
-- **************************************************... |
<filename>src/it/migration-plugin-command-script/itcase-rep/scripts/20100425200645_second_migration.sql
--// First migration.
-- Migration SQL that makes the change goes here.
CREATE TABLE test2 (
ID NUMERIC(20,0) NOT NULL,
);
--//@UNDO
DROP TABLE test2;
|
<reponame>AlexisGaldamez/utPLSQL
declare
l_stack_trace varchar2(4000);
l_source_line varchar2(4000);
begin
l_stack_trace := q'[----- PL/SQL Call Stack -----
object line object
handle number name
34f88e4420 124 package body SCH_TEST.UT_EXPECTATION_PROCESSOR
353dfeb2f8 26 SCH_TEST.UT_EXPE... |
<filename>MeasuresDB/dbo/Tables/Width.sql
CREATE TABLE [dbo].[Width]
(
[Id] [int] IDENTITY (1, 1) NOT NULL PRIMARY KEY,
[Value] [float] NOT NULL,
[MaterialTypeId] [int] NOT null
CONSTRAINT [FK_Width_MaterialType] FOREIGN KEY ([MaterialTypeId]) REFERENCES [dbo].[MaterialType] ([Id]),
)
|
SELECT * FROM table_with_unique_constraint;
SELECT * FROM table_with_primary_constraint;
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: rojahno
* Created: Aug 30, 2020
*/
DROP TABLE IF EXISTS AUSER CASCADE;
CREATE TABLE IF NOT EXISTS AUSER (
phoneNumb... |
<reponame>opengauss-mirror/Yat<gh_stars>0
-- @testpoint: kmeans创建mode,带正确的超参istance_function
--step1: 创建表并插入数据;expect: 创建表并插入数据成功
drop table if exists t_model_tab_0044;
create table t_model_tab_0044(id integer not null,"position" double precision[] not null,closest_centroid integer not null, l1_distance double precisi... |
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: powerbudgetdb
-- ------------------------------------------------------
-- Server version 5.7.18-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL... |
# ************************************************************
# Sequel Pro SQL dump
# Version 4096
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: 127.0.0.1 (MySQL 5.7.14)
# Database: homestead
# Generation Time: 2016-09-16 15:27:15 +0000
# ***********************************************... |
<reponame>java-study-project/CodeGenerateBoot
/**
* 表名:core_dataauth_rule_scf(规则定义表)
*/
规则定义表 coreDataauthRuleScf /app/dataauth/rule
|
<filename>sql/webcomments.sql<gh_stars>0
Create Database `webcomments`;
CREATE TABLE `comments` (
`ID` int(4) NOT NULL AUTO_INCREMENT,
`Name` varchar(30) NOT NULL,
`Gender` varchar(8) DEFAULT NULL,
`Age` int(3) NOT NULL,
`Country` varchar(10) DEFAULT NULL,
`Comment` text NOT NULL
) ENGINE=InnoDB DEFAULT CH... |
<filename>heavyDay_server/wx_server/speed.sql
SET NAMES UTF8;
DROP DATABASE IF EXISTS wxjnr;
CREATE DATABASE wxjnr CHARSET=UTF8;
USE wxjnr;
/*创建飞车头部表*/
CREATE TABLE jnr_nr(
id INT PRIMARY KEY AUTO_INCREMENT,
div_1 VARCHAR(255),
div_2 VARCHAR(255)
);
/*插入首页sp图片*/
INSERT INTO jnr_nr VALUES(NULL,'离上次见面已经',"2018-03-19")... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 17, 2021 at 01:52 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
CREATE DATABASE IF NOT EXISTS obocomer;
USE obocomer;
CREATE TABLE IF NOT EXISTS users(
id int(255) auto_increment not null,
name varchar(100),
nick varchar(100),
email varchar(255),
password varchar(255)
image varchar(255),
direccion varchar(255),
localidad varchar(25... |
CREATE OR REPLACE VIEW egtl_mv_dcb_view AS
SELECT lic.license_number AS licenseNumber,
lic.address,
lic.id AS licenseId,
licAdd.applicant_name AS username,
--lic.id_parent_bndry.parent.id AS zoneid,
lic.id_parent_bndry AS wardid,
lic.id_adm_bndry AS locality,
currdd.amount ... |
-- 表 broker_message.broker_message 结构
CREATE TABLE IF NOT EXISTS `broker_message` (
`message_id` VARCHAR(128) NOT NULL,
`message` VARCHAR(4000),
`try_count` INT(4) DEFAULT 0,
`status` VARCHAR(10) DEFAULT '',
`next_retry` TIMESTAMP NOT NULL DEFAULT '1970-1-1 08:00:01',
`create_time` TIMESTAMP NOT NULL DEFAU... |
CREATE TABLE bullet_group_bullet (
id BIGSERIAL PRIMARY KEY,
bullet_group_id BIGINT REFERENCES bullet_group(id) ON DELETE CASCADE,
bullet_id BIGINT REFERENCES bullet(id) ON DELETE CASCADE
);
CREATE INDEX bullet_group_bullet_bullet_group_id_idx ON bullet_group_bullet(bullet_group_id);
CREA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.