sql stringlengths 6 1.05M |
|---|
<reponame>eeyes-net/down-2016-10<gh_stars>1-10
CREATE DATABASE IF NOT EXISTS `test_down` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `test_down`;
CREATE TABLE IF NOT EXISTS `down_list` (
`id` INT NOT NULL AUTO_INCREMENT COMMENT '自增序号',
`name` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '软件名称',
`icon_pa... |
metadata :name => "RabbitMQ Connector",
:description => "Connector plugin for RabbitMQ middleware",
:author => "Puppet Labs",
:license => "ASL 2.0",
:version => "1.0.0",
:url => "https://docs.puppetlabs.com/mcollective/plugin_dir... |
ALTER TABLE roles ENGINE = InnoDB;
ALTER TABLE roles
ADD CONSTRAINT fk_roles_grantor_entity FOREIGN KEY (grantor) REFERENCES entity (id),
ADD CONSTRAINT fk_roles_grantee_entity FOREIGN KEY (grantee) REFERENCES entity (id);
ALTER TABLE white_list ENGINE = InnoDB;
ALTER TABLE white_list
ADD CONSTRAINT fk_white_list_orga... |
#namespace("test")
#include("logInfo.sql")
#end
|
<gh_stars>1-10
-- This software is subject to the terms of the Eclipse Public License v1.0
-- Agreement, available at the following URL:
-- http://www.eclipse.org/legal/epl-v10.html.
-- You must accept the terms of that agreement to use this software.
--
-- Copyright (C) 2009-2009 Pentaho
-- All Rights Reserved.
-- My... |
-- Database: cache
-- Change Parameter: existingColumnName=state
-- Change Parameter: existingTableName=address
-- Change Parameter: newColumnName=abbreviation
-- Change Parameter: newTableName=state
CREATE TABLE state AS SELECT DISTINCT state AS abbreviation FROM address WHERE state IS NOT NULL;
ALTER TABLE state ALTE... |
CREATE TABLE test (a BIT(3), b BIT VARYING(5));
INSERT INTO test VALUES (B'101', B'00');
INSERT INTO test VALUES (B'10', B'101');
ERROR: bit string length 2 does not match type bit(3)
INSERT INTO test VALUES (B'10'::bit(3), B'101');
SELECT * FROM test;
a | b
-----+-----
101 | 00
100 | 101
|
create database api_senjani_kitchen;
create table pelanggan(
pelanggan_id int(10) primary key auto_increment unsigned,
email varchar(50),
password varchar(50),
salt text,
nama_lengkap varchar(50),
alamat varchar(100),
no_hp_wa varchar(20),
alergi_makanan varchar(150),
created_by int(... |
<filename>database/scripts/init.sql
-- Table: public.secure_access
-- DROP TABLE IF EXISTS public.secure_access;
CREATE TABLE IF NOT EXISTS public.secure_access
(
id serial NOT NULL,
title text,
code character(8) NOT NULL,
token_id numeric NOT NULL,
PRIMARY KEY (id)
)
TABLESPACE pg_default;
ALTE... |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 02, 2019 at 08:03 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 5.6.37
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- créé la bdd 3xadvisor_test
CREATE DATABASE IF NOT EXISTS 3xadvisor_test CHARACTER SET 'utf8';
-- utilise la bdd 33xadvisor_test
USE `3xadvisor_test`;
-- --------------------------------------------------------
--
-- Structure de la table `city`
--
CREATE TABLE IF NOT EXISTS `3xadvisor_test`.`city` (
`id` int(11) ... |
INSERT INTO `intern`.`intern_rehearsals` (`start`, `end`, `title`, `description`, `semester_id`)
SELECT
`dateTimeBegin`,
IF(`dateTimeEnd` = "0000-00-00 00:00:00", `dateTimeBegin`, `dateTimeEnd`),
`name`,
`description`,
3
FROM
`old_intern`.events
WHERE
`rehearsal` = 1 AND
`dateTimeBegin` >= "2018-04-01 00:00:00... |
create table level(
id_level int auto_increment,
nama_level varchar(50),
primary key(id_level)
);
insert into level values ("Owner"),("Supervisor"),("Cashier"),("Driver"),("Customer"));
create table group_customer(
id_group_customer int auto_increment,
nama_group_customer varchar(50),
margin double,
pri... |
<filename>15-19_07/SQL_Querus/dbo.Table_Diario-1.sql
CREATE TABLE [dbo].[Diario-1]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY,
[Aluno] VARCHAR(100) NOT NULL,
[Materia] VARCHAR(100) NOT NULL,
[Nota1] INT NOT NULL,
[Nota2] INT NOT NULL,
[Nota3] INT NOT NULL,
[Nota4] INT NOT NULL,
[Nota5] INT NOT NU... |
<gh_stars>0
declare @buscar varchar(50)
SET @buscar = 'cartera'
SELECT
ROUTINE_NAME
,ROUTINE_DEFINITION
FROM
INFORMATION_SCHEMA.ROUTINES
WHERE
ROUTINE_NAME LIKE '%' + @buscar + '%'
AND ROUTINE_TYPE ='PROCEDURE'
ORDER BY
ROUTINE_NAME |
SET DEFINE OFF;
CREATE INDEX AFW_07_AUDIT_STRUC_APLIC_FK5 ON AFW_07_AUDIT_STRUC_APLIC
(REF_DOMN)
LOGGING
/
|
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.16
-- Dumped by pg_dump version 9.6.16
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_path', '',... |
<filename>test.sql
CREATE TABLE IF NOT EXISTS employees (
id BIGSERIAL NOT NULL UNIQUE,
name varchar(40),
position varchar(20),
role varchar(40),
team varchar(40),
status boolean,
startdate date,
enddate date,
Primary Key(id)
);
CREATE TABLE IF NOT EXISTS projects (
id BIGSERIAL NOT NULL UNIQUE,
... |
CREATE TABLE {prefix}_{dirname}_inbox (
`inbox_id` int(8) unsigned NOT NULL auto_increment,
`uid` int(8) unsigned NOT NULL default '0',
`from_uid` int(8) unsigned NOT NULL default '0',
`title` varchar(100) NOT NULL,
`message` text NOT NULL,
`utime` int(11) unsigned NOT NULL default '0',
`is_read` int(1) u... |
<gh_stars>0
INSERT INTO `#__joomlawatch_ip2c` (`start`, `end`, `a2`, `a3`, `country`) VALUES (3262855856, 3262855863, 'DE', 'DEU', 'GERMANY'),
(3262855864, 3262855935, 'NL', 'NLD', 'NETHERLANDS'),
(3262855936, 3262857215, 'DE', 'DEU', 'GERMANY'),
(3262857216, 3262860031, 'NL', 'NLD', 'NETHERLANDS'),
(3262860032, 32... |
<reponame>Gurikin/brn
UPDATE series SET description = 'Распознавание похожих фраз' WHERE description = 'Распознование похожих фраз';
UPDATE series SET description = 'Распознавание сигналов по длительности' WHERE description = 'Распознование сигналов по длительности';
UPDATE series SET description = 'Распознавание сигна... |
insert into _report_editor (report,username) select identifier,'<EMAIL>' from report where identifier like 'nca3%';
insert into _report_editor (report,username) select identifier,'<EMAIL>' from report where identifier like 'nca3%';
insert into _report_editor (report,username) select identifier,'<EMAIL>' from report wh... |
<gh_stars>0
INSERT INTO `qb_config` (`id`, `type`, `title`, `c_key`, `c_value`, `form_type`, `options`, `ifsys`, `htmlcode`, `c_descrip`, `list`, `sys_id`) VALUES(0, -1, 'SEO标题', 'mseo_title', '', 'text', '', 0, '', '', 100, 4);
INSERT INTO `qb_config` (`id`, `type`, `title`, `c_key`, `c_value`, `form_type`, `options`... |
<gh_stars>0
ALTER TABLE form_vitals
MODIFY `weight` FLOAT(5,2) default 0,
MODIFY `height` FLOAT(5,2) default 0,
MODIFY `BMI` FLOAT(4,1) default 0;
#IfNotTable form_misc_billing_options
CREATE TABLE IF NOT EXISTS `form_misc_billing_options` (
id bigint(20) NOT NULL auto_increment,
... |
{% macro teradata__list_schemas(database) %}
{% call statement('list_schemas', fetch_result=True, auto_begin=False) -%}
SELECT DatabaseName AS schema_name
FROM {{ information_schema_name(database) }}.DatabasesV
{%- endcall %}
{{ return(load_result('list_schemas').table) }}
{% endmacro %}
... |
/*****Start of table creation script*****/
CREATE TABLE XX_RISK_ASSESSMENT_STATUS(application_number VARCHAR2(100),
application_status VARCHAR2(25));
/*****End of table creation script*****/
/*****Start of function creation script*****/
CREATE OR REPLACE FUNCTION XX_BANK_RISK_ASSESSMENT_CHECK (in_applicat... |
<filename>src/main/resources/database/mysql/alter_9_3_0_to_9_4_0.sql
alter table o_gp_business add column ownersintern bit not null default 0;
alter table o_gp_business add column participantsintern bit not null default 0;
alter table o_gp_business add column waitingintern bit not null default 0;
alter table o_gp_busin... |
CREATE TABLE "THAANUM_NOTFOUND_MASTER"
( "THAANUM_NUMBER" VARCHAR2(100),
"MEDIA_ID" NUMBER
) |
<gh_stars>1-10
-- OPEN IZ DATABASE CORE
-- COPYRIGHT (c) 2015, OPEN IZ
-- PORTIONS COPYRIGHT (C) 2015, Mohawk College of Applied Arts and Technology
-- LICENSED UNDER THE APACHE 2.0 LICENSE
/*
SECTION: SECURITY TABLES
*/
/**
* SECURITY USER CLASS CODES. THESE CODES ARE USED TO IDENTIFY THE USER CLASSES AND ARE USE... |
CREATE TABLE `kwf_maintenance_job_runs` (
`id` int(11) NOT NULL,
`job` varchar(255) NOT NULL,
`status` varchar(20) NOT NULL,
`start` datetime NOT NULL,
`runtime` int(11) NOT NULL,
`log` text NOT NULL,
`last_process_seen` datetime NOT NULL,
`pid` int(11) NOT NULL,
`progress` int(11) NULL
) ENGINE=InnoD... |
<filename>sql/_31_cherry/issue_21672_json_functions/cases/json_array_append_in_dml.sql
set names utf8;
drop table if exists t10;
create table t10(id int primary key auto_increment, name varchar collate utf8_en_ci, de json default json_array_append('{"bar": "baz", "balance": 7.77, "active":"false"}' collate utf8_en_ci, ... |
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
DROP PUBLIC SYNONYM ZSTG_CLONE
/
--
-- ZSTG_CLONE (Synonym)
--
-- Dependencies:
-- ZSTG_CLONE (Table)
--
CREATE PUBLIC SYNONYM ZSTG_CLONE FOR ZSTG_CLONE
/
|
<filename>Database/Schema/RDF..GetPropertyRangeList.StoredProcedure.sql
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [RDF.].[GetPropertyRangeList]
@PropertyID BIGINT = NULL,
@PropertyURI VARCHAR(400) = NULL,
@returnTable BIT = 0,
@returnXML BIT = 1,
@PropertyRangeListXML XML = NULL OUTPUT
AS
B... |
-- @testpoint: 查询临时表数据,使用string_agg函数
-- @modify at: 2020-11-24
--建表
drop table if exists temp_table_074;
create TEMPORARY table temp_table_074 (id int,name char(20),class char(10),course char(20),score float(1));
--插入数据
insert into temp_table_074 values(4,'小明',1,'数学',87.5);
insert into temp_table_074 values(2,'小红',2,'... |
CREATE TABLE top5 AS
SELECT id, comment_count, title, author, content, sentiment
FROM ptt_food
WHERE title LIKE '%頤宮%' or title LIKE '%教父牛排%' or title LIKE '%MUME%' or title LIKE '%RAW%' or title LIKE '%JL Studio%'; |
-- CreateTable
CREATE TABLE "appointments" (
"id" VARCHAR(50) NOT NULL,
"date" DATE NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
"vaccination_point_id" VARCHAR(50) NOT NULL,
"patient_id" VARCHAR(50) NOT NULL,
PRIMARY KEY ("id")
... |
<filename>Applications/Joomla/Web/administrator/components/com_admin/sql/updates/postgresql/3.1.0.sql
/* Changes to tables where data type conflicts exist with MySQL (mainly dealing with null values */
ALTER TABLE "#__modules" ALTER COLUMN "content" SET DEFAULT '';
ALTER TABLE "#__updates" ALTER COLUMN "data" SET DEFAU... |
<gh_stars>0
ALTER TABLE dbo.OBJECT_TYPE_DEFINITION ALTER COLUMN baseType NVARCHAR(255);
ALTER TABLE dbo.OBJECT_TYPE_DEFINITION ALTER COLUMN contentStreamAllowed NVARCHAR(255);
ALTER TABLE dbo.OBJECT_TYPE_DEFINITION ALTER COLUMN description NVARCHAR(255);
ALTER TABLE dbo.OBJECT_TYPE_DEFINITION ALTER COLUMN displayName N... |
<filename>Catbert3/Schema Objects/Schemas/dbo/Tables/Keys/FK_Unit_Schools.fkey.sql
ALTER TABLE [dbo].[Unit]
ADD CONSTRAINT [FK_Unit_Schools] FOREIGN KEY ([SchoolCode]) REFERENCES [dbo].[Schools] ([SchoolCode]) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
<reponame>adambirse/innovation-funding-service<gh_stars>0
-- IFS-5208 Add webtest data to check eu contacts are showing correctly
INSERT INTO `eu_contact` (`job_title`, `name`, `email`, `telephone`)
VALUES
("developer", "<NAME>", "<EMAIL>", "999"),
("tester", "<NAME>", "<EMAIL>", "123"),
("business analyst", "<NAME>... |
-- Add userguide
INSERT
INTO portti_view_bundle_seq
(
view_id,
bundle_id,
seqno,
config,
state,
startup,
bundleinstance
)
VALUES (
(SELECT id FROM portti_view WHERE application='asdi_guest' AND type='DEFAULT'),
(SELECT id FROM portti_bundle WHERE name='userguide'),
(SELECT max(seqno)+1 FROM portti_view_bundle... |
/*
Navicat MySQL Data Transfer
Source Server : zombi-host
Source Server Version : 100410
Source Host : localhost:3306
Source Database : dev_cvainunjaya
Target Server Type : MYSQL
Target Server Version : 100410
File Encoding : 65001
Date: 2020-05-31 21:19:38
*/
SET FOREIGN_KEY_CHEC... |
DROP TABLE "PlayerRatingHistory";
CREATE TABLE "PlayerRatingHistory" (
"PlayerID" blob(16) NOT NULL,
"LeagueID" blob(16) NOT NULL,
"CreatedAt" INT NOT NULL,
"RatingPeriodStartedAt" INT NOT NULL,
"Rating" REAL NOT NULL,
"Deviation" REAL NOT N... |
<reponame>Bhaskers-Blu-Org2/FetchClimate<filename>src/Utils/FetchConfigurator/Database/AzureScript.sql<gh_stars>1-10
CREATE TABLE [DataSets](
[dataSetID] [int] IDENTITY(1,1) NOT NULL,
[deleted] [bit] NOT NULL,
[deflation] [int] NOT NULL,
CONSTRAINT [PK_DataSets] PRIMARY KEY CLUSTERED
(
[dataSetID] ASC
)
)
GO
CREA... |
<gh_stars>10-100
CREATE PROCEDURE [dbo].[sp_dashboard_get]
AS
BEGIN
DECLARE @TotalSessions INT,
@TotalUsers INT,
@TotalRoles INT,
@TotalConfigItems INT;
SELECT @TotalSessions = COUNT(1)
FROM [Session] (NOLOCK)
SELECT @TotalUsers = COUNT(1)
FROM [User] (NOLOCK)
SELECT @TotalRoles = COUNT(1)
FROM [Ro... |
alter table "public"."default_royalty_recipients" drop constraint "default_royalty_recipients_artwork_id_fkey";
|
INSERT INTO departments (name)
VALUES
("Creative"),
("Sound Engineering"),
("Management"),
("Executive");
INSERT INTO roles (title, salary, departments_id)
VALUES
("Rapper", "5000000", 1),
("Producer", "3000000", 2),
("Agent", "1000000", 3),
("Label Owner", "5000000", 4);
INSERT IN... |
-- 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.
PRINT N'Creating primary key [CourseOfferedGradeLe... |
<reponame>braziltaiany/happy
-- SQLite
DELETE FROM orphanages;
|
CREATE TABLE moviestore_db.movie_player (
`movie_id` bigint(20) NOT NULL,
`player_id` bigint(20) NOT NULL,
KEY `FKgf0p5d0ufjmd4laj8gca35t0f` (`player_id`),
KEY `FKhhyh6b04umdfgow640dsqttpl` (`movie_id`),
CONSTRAINT `FKgf0p5d0ufjmd4laj8gca35t0f` FOREIGN KEY (`player_id`) REFERENCES `player` (`id`),
CONSTRAIN... |
<reponame>mdivk/TPC-DS
INSERT INTO tpcds.customer_demographics SELECT * FROM ext_tpcds.customer_demographics;
|
<reponame>Nuvoloso/kontroller_open_source
/* Copyright 2019 <NAME>
*
* 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 require... |
<reponame>felipetsi/attikgrc<filename>install/db_default - ONLY DEMONSTRATION.sql
/* This script is only to create a demonstration base manually if necessary, SHOULDN'T be use to create a production environment. USE INSTALATION'S SCRIPT.
Before run this script you need create the base and tables with attik-grc.sql.*... |
<reponame>ampersign/util-mailstats
CREATE TABLE `dnsbl_reject_stats` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` datetime NOT NULL,
`dnsbl` varchar(64) NOT NULL,
`rejections` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`,`date`,`dnsbl`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
;
|
<reponame>lihkin213/dex<gh_stars>1-10
-- +migrate Up
CREATE TABLE IF NOT EXISTS "trusted_peers" (
"client_id" text not null,
"trusted_client_id" text not null,
primary key ("client_id", "trusted_client_id")) ;
|
<filename>db/dynamic_db2.sql
/*
Navicat Premium Data Transfer
Source Server : localhost_docker
Source Server Type : MySQL
Source Server Version : 50736
Source Host : localhost:3306
Source Schema : dynamic_db2
Target Server Type : MySQL
Target Server Version : 50736
File Encodi... |
select name, id, region, type, kind, consistency_policy_max_interval, consistency_policy_max_staleness_prefix, default_consistency_level, database_account_offer_type, disable_key_based_metadata_write_access, document_endpoint, enable_automatic_failover, enable_multiple_write_locations, is_virtual_network_filter_enabled... |
<gh_stars>10-100
SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1
SELECT name FROM PersonFriend GROUP BY name HAVING count(*) = 1
SELECT date_of_birth FROM Guests WHERE gender_code = "Male"
SELECT Fname FROM Student WHERE Major = 600
SELECT customer_phone F... |
CREATE OR REPLACE FUNCTION jobcenter.do_outargsmap(a_jobtask jobtask, a_outargs jsonb, OUT vars_changed boolean, OUT newvars jsonb)
RETURNS record
LANGUAGE plpgsql
SET search_path TO jobcenter, pg_catalog, pg_temp
AS $function$DECLARE
o_vars_changed ALIAS FOR $3;
o_newvars ALIAS FOR $4;
v_action_id integer;
v_ol... |
DROP VIEW IF EXISTS view_buku_penerimaan_korpri;
CREATE VIEW view_buku_penerimaan_korpri AS
SELECT
*
FROM
view_buku_penerimaan_kabupaten
WHERE
1 = 1 AND
id_skpd = 27;
GRANT ALL PRIVILEGES ON view_buku_penerimaan_korpri TO lap_korpri;
REVOKE INSERT, UPDATE, DELETE ON view_buku_penerimaan_korpri FROM lap_korpri;
|
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.6.24 - MySQL Community Server (GPL)
-- Server OS: Win32
-- HeidiSQL Version: 9.2.0.4947
-- --------------------------------------------------------
/*... |
<reponame>antonioCC/proyecto-final<filename>dbproyecto2.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 12-12-2021 a las 06:25:59
-- Versión del servidor: 5.7.31
-- Versión de PHP: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TR... |
<filename>数据库/invitationCodeList.sql
/*
Navicat Premium Data Transfer
Source Server : 阿里云
Source Server Type : MySQL
Source Server Version : 50728
Source Host : 172.16.58.3:3306
Source Schema : yiqianLibrary
Target Server Type : MySQL
Target Server Version : 50728
File Encodin... |
<reponame>MohithGowdaHR/PES-Engineering-Lab-Programs
-- For each pilot who is certified for more than three aircrafts, find the eid and the maximum cruisingrange of the aircraft for which she or he is certified.
SELECT C.eid, MAX(A.cruisingrange)
FROM Certified C, Aircraft A
WHERE A.aid = C.aid
GROUP BY C.eid
HAVING C... |
SELECT *
FROM prediction
WHERE time BETWEEN
(SELECT MAX(time) - interval '47 hours' FROM prediction)
AND
(SELECT MAX(time) FROM prediction);
|
-- MySQL dump 10.16 Distrib 10.2.15-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: atributos
-- ------------------------------------------------------
-- Server version 10.2.15-MariaDB-10.2.15+maria~xenial-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @O... |
<reponame>TodorChapkanov/CSharp-Databases-Basics---MS-SQL
SELECT TOP 10 FirstName, LastName, DepartmentID FROM Employees AS e1
WHERE Salary > (SELECT AVG(Salary) FROM Employees AS e2
WHERE e2.DepartmentID = e1.DepartmentID
GROUP BY DepartmentID) |
--
-- Base de datos: `album_photo`
--
CREATE DATABASE IF NOT EXISTS `album_photo` DEFAULT CHARACTER SET utf8 COLLATE utf8_spanish2_ci;
USE `album_photo`;
|
use vze_db;
create table user
(
user_id int primary key auto_increment,
user_name VARCHAR(20) NOT NULL default 'suger',
user_img VARCHAR(1000) default 'http://blog.qianlon.cn/upload/2021/11/image-c571dd25ab744ff0a954fae2cfe5b61a.png'
);
select *
from user
where user_id in (
select user_id
... |
CREATE TABLE voting_tokens (
id SERIAL PRIMARY KEY NOT NULL,
electionid INTEGER NOT NULL,
token VARCHAR(255) NOT NULL,
used BOOLEAN NOT NULL DEFAULT FALSE
);
CREATE INDEX voting_tokens_electionid_idx ON voting_tokens (electionid);
CREATE INDEX voting_tokens_token_idx ON voting_tokens ... |
<reponame>CDLUC3/dataup2<gh_stars>1-10
CREATE TABLE [dbo].[User] (
[UserId] INT IDENTITY (1, 1) NOT NULL,
[NameIdentifier] VARCHAR (256) NOT NULL,
[IdentityProvider] VARCHAR (128) NULL,
[FirstName] NVARCHAR (64) NULL,
[MiddleName] NVARCHAR (64) NULL,
[... |
CREATE EXTENSION citext;
--;;
CREATE TABLE "user" (
"id" serial PRIMARY KEY,
"name" text,
"email" citext UNIQUE
);
--;;
CREATE TABLE "track" (
"id" serial PRIMARY KEY,
"slug" text UNIQUE,
"user_id" integer REFERENCES "user",
"name" text,
"metadata" json,
"stats" json
);
--;;
CR... |
<reponame>gmackie/todo-points-backend
-- Your SQL goes here
CREATE TABLE users (
id SERIAL PRIMARY KEY NOT NULL,
username VARCHAR NOT NULL,
email VARCHAR NOT NULL,
password VARCHAR NOT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
login_session VARCHAR NOT NULL DEFAULT ''
); |
<reponame>MiladTehrany/jclj
/*ALTER TABLE employees MODIFY COLUMN employeeNumber INT NOT NULL AUTO_INCREMENT;
ALTER TABLE orders MODIFY COLUMN orderNumber INT NOT NULL AUTO_INCREMENT;
ALTER TABLE productlines MODIFY htmlDescription mediumtext CHARACTER SET utf8mb4;*/
CREATE TABLE customers
(
customerNumber ... |
-- cast.test
--
-- execsql {SELECT '123abc'}
SELECT '123abc' |
-- file:domain.sql ln:127 expect:true
create table dcomptable (d1 dcomptypea unique)
|
-- MssqlCertificate: SimpleCertificate
CREATE CERTIFICATE [SimpleCertificate] AUTHORIZATION [MyUser]
FROM ASSEMBLY [MyAssembly]
ACTIVE FOR BEGIN_DIALOG = ON;
GO |
<filename>scripts/controleAcesso.sql
CREATE TABLE `transmetais`.`usuario` (
`id` INT NOT NULL,
`login` VARCHAR(45) NOT NULL ,
`nome` VARCHAR(100) NOT NULL ,
`senha` VARCHAR(100) NULL,
`email` VARCHAR(100) NULL ,
`senha_inicial` VARCHAR(100) NOT NULL ,
`ativo` TINYINT(1) NOT NULL DEFAULT '1' ,
PRIMARY KE... |
<reponame>aptyInc/dbmigrate
CREATE TABLE account(
user_id serial PRIMARY KEY,
username VARCHAR (50) UNIQUE NOT NULL,
password VARCHAR (50) NOT NULL,
email VARCHAR (355) UNIQUE NOT NULL,
created_on TIMESTAMP NOT NULL,
last_login TIMESTAMP
); |
<reponame>greenvilleassociates/fusionshellplus<filename>WIKI/maintenance/archives/patch-rc_len.sql
--
-- patch-rc_len.sql
-- Adds two rows to recentchanges to hold the text size befor and after the edit
-- 2006-12-03
--
ALTER TABLE /*$wgDBprefix*/recentchanges
ADD COLUMN rc_old_len int, ADD COLUMN rc_new_len int;
|
<gh_stars>10-100
-- -------------------------------------------------------------------
-- @2020, Odysseus Data Services, Inc. All rights reserved
-- MIMIC IV CDM Conversion
-- -------------------------------------------------------------------
-- -------------------------------------------------------------------
-- ... |
<filename>Advanced features/SessionCounter example.sql
--add a session counter to all events and use that to show the totals per xth session.
WITH DATA AS
(SELECT eventName,
userId,
sessionId,
CONDITIONAL_CHANGE_EVENT(sessionid) over (partition BY userId
... |
<reponame>Rob--W/phabricator
ALTER TABLE {$NAMESPACE}_metamta.metamta_mail
DROP COLUMN retryCount;
|
select toDate32(toDateTime64('2019-01-01 00:00:00', 3, 'Europe/Moscow')), toDateTime64(toDate32('2019-01-01'), 3, 'Europe/Moscow') |
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS CITY_CO;
CREATE TABLE CITY_CO (
id integer NOT NULL,
name text NOT NULL,
countrycode character(3) NOT NULL,
district text NOT NULL,
population integer NOT NULL
) with (appendonly=true,orientation=co... |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.17.32
-- Generation Time: 29-Jun-2019 às 23:45
-- Versão do servidor: 10.1.34-MariaDB
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... |
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
ALTER TABLE AR_CHROMOSOMAL_LOCATION_TMP
DROP PRIMARY KEY CASCADE
/
DROP TABLE AR_CHROMOSOMAL_LOCATION_TMP CASCADE CONSTRAINTS PURGE
/
--
-- AR_CHROMOSOMAL_LOCATION_TMP ... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.3.11
-- Waktu pembuatan: 10 Apr 2021 pada 04.35
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 7.4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... |
<filename>Databases Basics/08.ExamPreparation(24-04-2017)/19.DetectDelivery.sql
CREATE TRIGGER tr_OrderDeliver ON Orders AFTER UPDATE
AS
BEGIN
DECLARE @NewStatus INT = (SELECT Delivered FROM inserted)
DECLARE @OldStatus INT = (SELECT Delivered FROM deleted)
IF (@NewStatus = 1 AND @OldStatus = 0)
BEGIN
DECLARE ... |
/*
SQLyog Community v13.1.5 (64 bit)
MySQL - 8.0.19-0ubuntu0.19.10.3 : Database - users_db
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_K... |
<filename>db/seeds.sql
-- INSERT INTO quotes (quote, author) VALUES ('Know your "why" in any of your endeavors. That will push you through any wall you hit.', '<NAME>');
INSERT INTO burgers(burger_name,devoured) VALUES ("mushroom Swiss",true);
INSERT INTO burgers(burger_name,devoured) VALUES ("BBQ Bacon",true);
INSER... |
<filename>src/main/resources/sql/postgres/init.sql
create database categories;
create user categorizeus with password 'password';
grant all privileges on database categories to categorizeus; |
-- MySQL dump 10.11
--
-- Host: localhost Database: cucet
-- ------------------------------------------------------
-- Server version 5.0.67-community-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_CO... |
select x.term_str as core, y.term_str as partner
from token x join token y using(author, book, chapter, para_num, sent_num)
where y.token_num in (x.token_num +1, y.token_num = x.token_num +2,
y.token_num = x.token_num -1, y.token_num = x.token_num -2)
and x.term_str is not NULL
and y.term_str is not NULL
|
<reponame>LibrariesHacked/librarydata-db
create table plr_authority (
id serial,
code character (2),
name character varying (200),
constraint pk_plrauthority_id primary key (id)
);
create unique index idx_plrauthority_id_code on plr_authority (id, code);
cluster plr_authority using idx_plrauthority_id_code; |
<filename>Query/DBCreation.sql
-- *********************************************
-- * Standard SQL generation
-- *--------------------------------------------
-- * DB-MAIN version: 11.0.2
-- * Generator date: Sep 14 2021
-- * Generation date: Wed Nov 24 14:57:11 2021
-- * ... |
<filename>08.AdvancedSQLHomework/11.ManagersWith5Employees.sql<gh_stars>0
use TelerikAcademy;
select * from
(select i.FirstName + ' ' + i.LastName as [Manager], count(*) as [Employees Count]
from Employees e
inner join Employees i on e.ManagerID = i.EmployeeID
group by i.FirstName + ' ' + i.LastName) x
where x.[Em... |
CREATE TABLE sailors (
sid integer not null,
sname varchar(32),
rating integer,
age real,
CONSTRAINT PK_sailors PRIMARY KEY(sid)
);
CREATE TABLE boats (
bid integer not null,
bname varchar(32),
color varchar(32),
CONSTRAINT PK_boats PRIMARY KEY(bid)
);
CREATE TABLE reserves (
sid integer not null,
bid integer not nul... |
<gh_stars>1-10
CREATE TABLE [dbo].[tbl_randverse] (
[book] INT NULL,
[chapter] INT NULL,
[verse] INT NULL,
[id] INT NULL
);
|
<reponame>honestworker/szlogin<filename>database/migrations/safetyzone.sql
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 24, 2018 at 09:14 PM
-- Server version: 5.6.41-84.1
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUT... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.