sql stringlengths 6 1.05M |
|---|
<filename>migrations/2016-06-21-2249.sql
DROP TABLE IF EXISTS `menu_item`;
CREATE TABLE IF NOT EXISTS `menu_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`menu_id` int(11) NOT NULL,
`label` varchar(25) COLLATE utf8_czech_ci NOT NULL,
`url` varchar(255) COLLATE utf8_czech_ci NOT NULL,
`params` varchar(255) COL... |
INSERT INTO department (name)
VALUES ("Sales"), ("Engineering"), ("HR & Finance"), ("Legal");
INSERT INTO role (title, salary, department_id)
VALUES ("Account Manager", 90000, 1), ("Software Engineer", 150000, 2), ("Sales Executive", 135000, 1), ("Finance Manager", 75000, 3), ("Lawyer", 120000, 4);
INSERT INTO employ... |
--16.Create SoftUni Database
--Towns (Id, Name)
--Addresses (Id, AddressText, TownId)
--Departments (Id, Name)
--Employees (Id, FirstName, MiddleName, LastName, JobTitle, DepartmentId, HireDate, Salary, AddressId)
--PersonID int FOREIGN KEY REFERENCES Persons(PersonID) - HOW TO ADD FOREIGN KEY
CREATE TABLE Towns (... |
<filename>db_backup.sql
-- MySQL dump 10.13 Distrib 8.0.22, for osx10.15 (x86_64)
--
-- Host: localhost Database: temiyage
-- ------------------------------------------------------
-- Server version 8.0.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@C... |
CREATE DATABASE tvshows;
\c tvshows
CREATE TABLE tv_shows (id SERIAL PRIMARY KEY, title VARCHAR(255), start_year VARCHAR(255), end_year VARCHAR(255), characters VARCHAR(255), plot VARCHAR(255), original_network VARCHAR(255));
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 29 Mei 2018 pada 09.22
-- Versi Server: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... |
CREATE VIEW AddressAssociations AS
SELECT (SELECT Account FROM Addresses WHERE AddressInputs.Address = Addresses.Address) AS 'Related to Account',
'In' AS 'Direction',
InputAddress AS 'In/Out Address',
TXID, BlockHeight,
Address
FROM AddressInputs
UNION
SELECT (SELECT Account FROM Addresses WHERE Addre... |
<filename>Sql_file/blog (1).sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 25, 2017 at 02:37 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 S... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 13, 2017 at 09:08 AM
-- Server version: 5.5.50-0ubuntu0.14.04.1
-- PHP Version: 5.6.31-6+ubuntu14.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/... |
CREATE TABLE
product
(
id BIGINT NOT NULL,
serial_number VARCHAR,
item_name VARCHAR,
purchase_price NUMERIC,
purchase_date DATETIME,
customer_name VARCHAR,
customer_email VARCHAR,
customer_phone VARCHAR,
customer_address VARCHAR,
PRIMARY KEY (id)
);
CREATE ... |
<filename>CustomerFinder/CustomerFinderDB/dbo/Functions/Scalar-valued Functions/fnGetTwitterAccountUrlByUserName.sql<gh_stars>0
CREATE FUNCTION [dbo].[fnGetTwitterAccountUrlByUserName]
(
-- Add the parameters for the function here
@username nvarchar(100)
)
RETURNS nvarchar(500)
AS
BEGIN
DECLARE @result nvarchar(5... |
--
-- 表的结构 `test`
--
CREATE TABLE `test` (
`id` int(10) UNSIGNED NOT NULL,
`username` varchar(100) NOT NULL,
`create_time` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- 转存表中的数据 `test`
--
INSERT INTO `test` (`id`, `username`, `create_time`) VALUES
(1, 'singwa', 1520763235),
(2, 'singwa2... |
<filename>courses.sql
-- MySQL dump 10.13 Distrib 5.6.19, for osx10.7 (i386)
--
-- Host: 127.0.0.1 Database: codingdojo
-- ------------------------------------------------------
-- Server version 5.5.38
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR... |
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 29, 2016 at 05:54 AM
-- Server version: 5.6.25
-- PHP Version: 5.6.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
CREATE TABLE users (
user_id varchar(36) PRIMARY KEY,
username varchar(50) NOT NULL,
password varchar(60) NOT NULL,
email varchar(50) NOT NULL,
display_name varchar(50) NULL,
profile_image varchar(50) NULL,
info1 varchar(50) NULL,
info2 varchar(50) NULL,
info3 ... |
Create procedure [dbo].[UpdateFileProcessingStatusInDEDs] (@ukprn int, @fileName NVARCHAR(100)) as
BEGIN
UPDATE DEDS_FD
SET [Success]='1'
FROM [dbo].[FileDetails] DEDS_FD
WHERE [UKPRN] = @ukprn AND [Filename] = @fileName
END
|
<reponame>alikashi543211/DeviotechToonTutors
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 21, 2021 at 09:53 AM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+0... |
DROP FUNCTION IF EXISTS "create_user_v1";
DROP FUNCTION IF EXISTS "find_user_by_email_v1";
DROP FUNCTION IF EXISTS "find_user_by_id_v1";
DROP FUNCTION IF EXISTS "update_user_v1";
DROP FUNCTION IF EXISTS "user_exists_v1";
DROP FUNCTION IF EXISTS "find_user_by_query_v1"; |
/*
*/
DECLARE @contextValue sysname = (SELECT CAST(p.[value] AS sysname) FROM sys.[triggers] t INNER JOIN sys.[extended_properties] p ON t.[object_id] = p.[major_id]
WHERE t.[name] = N'dynamic_data_auditing_trigger_template' AND p.[name] = N'DDATrigger - Bypass Value');
IF @contextValue IS NOT NULL BEGIN
EXEC sp_... |
<filename>db/25_refresh_views.sql
begin;
refresh materialized view faelle_prediction_cache;
end; |
create table Role (
id integer generated by default as identity,
name varchar(255),
primary key (id)
)
create table Employee_Role (
Employee_id integer not null,
roles_id integer not null,
primary key (Employee_id, roles_id)
)
insert into Role(name) values('Administrator');
insert into T_ROLE(... |
WITH source AS (
SELECT *
FROM {{ source('zuora', 'rate_plan') }}
), renamed AS(
SELECT
id AS rate_plan_id,
name AS rate_plan_name,
--keys
subscriptionid AS subscription_id,
productid AS product_id,
productrateplanid AS ... |
<reponame>cloudsTrafton/Vulnerator
CREATE TABLE IF NOT EXISTS CustomTestCases (
CustomTestCase_ID INTEGER PRIMARY KEY,
TestCaseName NVARCHAR (25) NOT NULL,
TestCaseDescription NVARCHAR (500) NOT NULL,
TestCaseBackground NVARCHAR (500) NOT NULL,
TestCaseClassification NVARCHAR (25) NOT NULL,
Test... |
CREATE VIEW vEspacioConfirmado AS
SELECT campanias.id as id_campania,
title,
start,
end,
espacios.id as id_espacio,
espacios.nombre
FROM campania_espacio
INNER JOIN campanias ON campania_espacio.id_campania = campanias.id
INNER JOIN espacios ON campania_espacio.id_espacio = espacios.id
where campanias.s... |
CREATE CAST (TEXT AS _rrule.RRULE)
WITH FUNCTION _rrule.rrule(TEXT)
AS IMPLICIT;
CREATE CAST (TEXT AS _rrule.RRULESET)
WITH FUNCTION _rrule.rruleset(TEXT)
AS IMPLICIT;
CREATE CAST (jsonb AS _rrule.RRULE)
WITH FUNCTION _rrule.jsonb_to_rrule(jsonb)
AS IMPLICIT;
CREATE CAST (jsonb AS _rrule.RRULESET)
... |
<filename>data/sql/test/test-data.sql
INSERT INTO entities (pub_id) VALUES ('E9EB036A-0194-4AD4-B598-2412FB9C8F5B');
-- TODO: 'SET' is not ANSI SQL; for this and other reasons, we want to do a
-- replacement scheme. Possibly something like:
-- 1) Name template files with a commen prefix ('.sql.template').
-- 2) Use bas... |
<reponame>manorathn/UTA-AUS-FSF-PT-12-2020-U-C
-- Drops the programming_db if it already exists --
DROP DATABASE IF EXISTS programming_db;
-- Create a database called programming_db --
CREATE DATABASE programming_db;
-- Use programming db for the following statements --
USE programming_db;
CREATE TABLE programming_... |
-- +----------------------------------------------------------------------------+
-- | <NAME> |
-- | <EMAIL> |
-- | www.idevelopment.info |
-- |-----------------... |
/*
This is a development SQL script to patch Skyline from v2.1.0-patch-dev-4264
*/
USE skyline;
/*
# @added 20210928 - Feature #4264: luminosity - cross_correlation_relationships
# Feature #4266: metric_group DB table
*/
CREATE TABLE IF NOT EXISTS `metric_group` (
`metric_id` INT(11) NOT NULL COMM... |
<gh_stars>10-100
CREATE TABLE IF NOT EXISTS `bug` (
`id` serial,
`name` varchar(100) NOT NULL,
`robot_id` bigint unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY (`robot_id`)
);
CREATE TABLE IF NOT EXISTS `manufacturer` (
`id` serial,
`name` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT E... |
<filename>src/main/resources/db/migration/ixsi/V0_2_7__update.sql
-- Initially, these data types were more restricted (smallint) which caused problems every now and then.
-- It is probably a good idea to be less restrictive and upgrade them to integer.
ALTER TABLE ixsi.attribute
ALTER COLUMN importance TYPE INTEGER;
... |
<gh_stars>0
/**
* Author: hallef.sud
* Created: 04/12/2018
*/
-- Table: permirte_tela_login
-- DROP TABLE permirte_tela_login;
CREATE TABLE permirte_tela_login
(
id serial NOT NULL,
ip character varying(20),
host_name character varying(20),
id_super_usuario integer,
CONSTRAINT "PK_PERMIRTE_TELA_LOGIN"... |
-- $ID$
-- TPC-H/TPC-R Local Supplier Volume Query (Q5)
-- Functional Query Definition
-- Approved February 1998
:x
:o
select
n_name,
sum(l_extendedprice * (1 - l_discount)) as revenue
from
customer,
orders,
lineitem,
supplier,
nation,
region
where
c_custkey = o_custkey
and l_orderkey = o_orderkey
and l_supp... |
<gh_stars>0
create database Storage1 character set utf8 COLLATE utf8_general_ci;
use Storage1;
create table Friends
(
User_Id int not null,
Friend_Id int not null,
primary key (User_Id, Friend_Id)
);
create table User
(
Id int not null AUTO_INCREMENT,
... |
<filename>src/main/resources/data-mysql.sql
delete from book;
delete from user;
insert into book (book_title, isbin, authors, publish_date, publisher, price, stock) values ('Mrutyunjay', '9783161484100', 'Shivaji Sawant', '2018-10-14', 'Phantom', 450.25, 55);
insert into book (book_title, isbin, authors, publish_date, ... |
-- create decision definition table --
create table ACT_RE_DECISION_DEF (
ID_ varchar(64) not null,
REV_ integer,
CATEGORY_ varchar(255),
NAME_ varchar(255),
KEY_ varchar(255) not null,
VERSION_ integer not null,
DEPLOYMENT_ID_ varchar(64),
RESOURCE_NAME_ varchar(4000),
DGRM_RESOURCE... |
<filename>yoo-master-dc2492330d5d46b48f1ceca891e0f9f7e1593fee/module/common/uxb-service/src/main/java/tpl/sql/Title.sql
#macro($findAllTitle())
SELECT * FROM title WHERE status = 0 ORDER BY sequence ASC,code ASC
#end |
<gh_stars>1-10
-- 参考官方
create schema if not exists msa_jdbc collate utf8mb4_unicode_ci;
create table if not exists clientdetails
(
appId varchar(128) not null
primary key,
resourceIds varchar(256) null,
appSecret varchar(256) null,
scope varchar(256) null,
grantTypes varchar(256) null,
redirectUrl varchar(256... |
-- Move ip and network_id from system to future_a_record
ALTER TABLE system DROP CONSTRAINT "SYSTEM_PT_UK";
ALTER TABLE future_a_record ADD ip INTEGER;
ALTER TABLE future_a_record ADD network_id INTEGER;
UPDATE future_a_record SET ip = (SELECT ip FROM system WHERE system.id = future_a_record.system_id);
UPDATE future_a... |
<reponame>Datasilk/Kandu
CREATE PROCEDURE [dbo].[Organization_Enable]
@orgId int
AS
UPDATE Organizations SET enabled=1 WHERE orgId=@orgId |
<reponame>lintzc/GPDB
-- @description : Create Data and execute select statements on UAO tables INTERSECT
--
DROP TABLE IF EXISTS city_uao cascade;
DROP TABLE IF EXISTS country_uao cascade;
DROP TABLE IF EXISTS countrylanguage_uao cascade;
BEGIN;
CREATE TABLE city_uao (
id integer NOT NULL,
name text NO... |
<reponame>lintzc/GPDB<gh_stars>0
-- @author prabhd
-- @created 2012-12-05 12:00:00
-- @modified 2012-12-05 12:00:00
-- @tags dml
-- @db_name dmldb
-- @description test1: Boundary test for circle
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS dml_circle;
CREATE ... |
CREATE TABLE `log_activity_group` (
`id` int(11) UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`activity_log_id` int(11) NOT NULL,
`group_id` int(11) unsigned NOT NULL
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE ... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 08 Jan 2022 pada 16.21
-- Versi server: 10.4.19-MariaDB
-- Versi PHP: 8.0.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<reponame>sultanularefin/Framework7<filename>framework7.sql
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 09, 2018 at 03:49 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
STAR... |
CREATE TABLE BEAR2 (
BEAR_ID INTEGER PRIMARY KEY,
BEAR_NAME VARCHAR2(100),
BEAR_BIRTHDATE DATE,
BEAR_WEIGHT NUMBER(5,2) DEFAULT 200.00,
BEAR_TYPE_ID INTEGER NOT NULL,
CAVE_ID INTEGER
);
/
CREATE TABLE BEAR2_TYPE (
BEAR_TYPE_ID INTEGER PRIMARY KEY,
BEAR_TYPE_NAME VARCHAR2(100)
);
/
CREATE TABLE CAVE2 (
... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 5.6.24 - MySQL Community Server (GPL)
-- SO del servidor: Win32
-- HeidiSQL Versión: 9.4.0.5137
-- --------------------------------------------------------
/*... |
DROP TABLE IF EXISTS QUYDINH;
DROP TABLE IF EXISTS PHIEURUT;
DROP TABLE IF EXISTS PHIEUGUI;
DROP TABLE IF EXISTS SOTIETKIEM;
DROP TABLE IF EXISTS LOAIKYHAN;
DROP TABLE IF EXISTS KHACHHANG;
DROP TABLE IF EXISTS BAOCAONGAY;
DROP TABLE IF EXISTS BAOCAOTHANG; |
<filename>src/Ampla Project/Item.InheritPermissions.sql<gh_stars>1-10
/*
Item.InheritPermissions.sql
*/
WITH Item_CTE(ID, FullName, TypeID, Depth)
AS
(
SELECT ID, Cast(Name as VARCHAR(MAX)) as FullName, TypeID, 1 as Depth
FROM dbo.Items
WHERE ParentID = '00000000-0000-0000-0000-000000000000'
UNION ALL
SELECT it... |
<gh_stars>1-10
-- Adminer 4.2.5 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
CREATE DATABASE `Athena` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `Athena`;
DROP TABLE IF EXISTS `indicateur`;
CREATE TABLE `indicateur` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
`value` int... |
<gh_stars>1-10
CREATE TABLE articles
(
article_id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(255),
article_text TEXT NOT NULL,
newspaper VARCHAR(255),
publisher VARCHAR(255),
publish_date DATETIME,
city VARCHAR(30),
state VARCHAR(15),
latitude VARCHAR(20),
longitude VARCHAR(20),
... |
/*
Navicat Premium Data Transfer
Source Server : Mac
Source Server Type : MySQL
Source Server Version : 50731
Source Host : localhost:3306
Source Schema : repo_demo
Target Server Type : MySQL
Target Server Version : 50731
File Encoding : 65001
Date: 10/11/2020 21:12:... |
-- file:opr_sanity.sql ln:736 expect:true
SELECT p1.oid, p1.oprname
FROM pg_operator as p1 LEFT JOIN pg_description as d
ON p1.tableoid = d.classoid and p1.oid = d.objoid and d.objsubid = 0
WHERE d.classoid IS NULL AND p1.oid <= 9999
|
<gh_stars>10-100
-- file:domain.sql ln:474 expect:true
drop type rposint
|
-- file:rowsecurity.sql ln:1570 expect:true
ALTER TABLE r2 DISABLE ROW LEVEL SECURITY
|
<filename>Database/Tables/ActivityType.sql
IF EXISTS (select * from dbo.sysobjects where id = object_id(N'ActivityType') and
OBJECTPROPERTY(id, N'IsUserTable') = 1)
DROP TABLE ActivityType
GO
CREATE TABLE ActivityType(
Ident BIGINT IDENTITY(1,1) NOT NULL,
ActivityGroupIdent BIGINT NULL,
Name1 NVARCHAR(500) NULL,
... |
<reponame>perverse/mongo2mysqltask
CREATE TABLE customers (
id int(10) UNSIGNED NOT NULL,
email varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
name varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO customers (id, emai... |
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50621
Source Host : localhost
Source Database : telegram
Target Server Type : MySQL
Target Server Version : 50621
File Encoding : utf-8
Date: 04/30/2018 18:46:... |
--
-- Copyright (C) 2013 <NAME> <j.atienza at har.mrc.ac.uk>
--
-- MEDICAL RESEARCH COUNCIL UK MRC
--
-- Harwell Mammalian Genetics Unit
--
-- http://www.har.mrc.ac.uk
--
-- 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... |
<reponame>kkarpesh/dress-rental
INSERT INTO dress (dress_id, dress_name) VALUES (1, 'Jacquard shirt dress');
INSERT INTO dress (dress_id, dress_name) VALUES (2, 'Ruffled printed dress');
INSERT INTO dress (dress_id, dress_name) VALUES (3, 'Printed satin dress');
INSERT INTO dress (dress_id, dress_name) VALUES (4, 'Prin... |
<gh_stars>0
/*
Copyright 2011 tSQLt
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 to ... |
-- Table: public.searchfilters
-- DROP TABLE public.searchfilters;
CREATE TABLE public.searchfilters
(
searchfilters_id integer NOT NULL
GENERATED ALWAYS AS IDENTITY
( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
searchfilters_value character varying
(100) COLLATE pg_catalog."defa... |
-- Revert data_bag_insert_update
BEGIN;
DROP FUNCTION goiardi.merge_data_bags(m_name text);
COMMIT;
|
<filename>RailwayDB/Procedure/DeletePContact.sql
use RailWaySystemDB
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME>
-- Create date: 17/12/2019
-- Description: Delete Passenger Contact
-- =============================================
create PROCEDURE ... |
<filename>db/migrations/mysql/000004_create_command_webhooks.down.sql
DROP TABLE IF EXISTS CommandWebhooks;
|
\c gptest;
\d+ ao_table
select * from ao_table order by a; -- order 1
\d+ new_ao_table
select * from new_ao_table order by a; -- order 1
|
<filename>fixtures/doctests/alter_index/000_rename/input.sql<gh_stars>0
ALTER INDEX distributors RENAME TO suppliers;
|
SET ROLE 'aiohttpdemo_user';
INSERT INTO question (id, question_text, pub_date) VALUES (1, 'What''s new?', '2015-12-15 17:17:49.629+02');
--
-- Name: question_id_seq; Type: SEQUENCE SET; Schema: public; Owner: polls
--
SELECT pg_catalog.setval('question_id_seq', 1, true);
INSERT INTO choice (id, choice_text, vote... |
UPDATE
v1_entries
SET
project_name = "default"
WHERE
project_name IS null;
|
<filename>src/tacos_source_database.sql/dbo/Functions/udf_ParseOutCrossListedCourses.sql<gh_stars>0
-- =============================================
-- Author: <NAME>
-- Create date: October 11, 2018
-- Description: Parse out individual cross-listed courses
-- from the course and cross-listed course sting provided.... |
CALL createUser('user1', 'pass1', @user1)//
CALL createUser('user2', 'pass2', @user2)//
CALL createUser('user3', 'pass3', @user3)//
CALL createEmail('<EMAIL>', @user1, @email1)//
CALL createEmail('<EMAIL>', @user2, @email21)//
CALL createEmail('<EMAIL>', @user2, @email22)//
CALL createEmail('<EMAIL>', @user3, @email31... |
<filename>_Database/wcuc_618_1.sql
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 23, 2020 at 09:20 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/... |
<gh_stars>0
DELETE FROM rating WHERE 1;
DELETE FROM comment WHERE 1;
DELETE FROM article WHERE 1;
DELETE FROM category WHERE 1;
INSERT INTO category VALUES ('nyheter');
INSERT INTO category VALUES ('kjendis');
INSERT INTO category VALUES ('kultur');
INSERT INTO category VALUES ('sport');
INSERT INTO article VALUE... |
<reponame>RonaldoDe/New_turn
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 23-06-2020 a las 21:48:03
-- Versión del servidor: 5.7.30-0ubuntu0.18.04.1
-- Versión de PHP: 7.2.31-1+ubuntu18.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VAL... |
-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
--
-- Host: 192.168.3.11 Database: oes_db
-- ------------------------------------------------------
-- Server version 8.0.28
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... |
-- @see schema.sql
create table calendar_users
(
id bigint identity,
email varchar(256) not null unique,
password varchar(256) not null,
first_name varchar(256) not null,
last_name varchar(256) not null
);
create table events
(
id bigint identity,
when timest... |
DROP TABLE IF EXISTS `#__LoginTokens`;
|
set serveroutput on;
--DBMS_OUTPUT.PUT_LINE()
DECLARE
CURSOR update_B IS select* from Tabel FOR UPDATE OF B NOWAIT;
updated_rows integer;
suma integer:=0;
BEGIN
for v_linie in update_B loop
if trunc(sqrt(5*v_linie.A*v_linie.A+4))=sqrt(5*v_linie.A*v_linie.A+4)
or trunc(sqrt(5*v_linie.A*v_linie.A-4))=... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 19, 2021 at 02:25 AM
-- Server version: 10.4.14-MariaDB-log
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... |
CREATE TABLE IF NOT EXISTS `barter` (
`uid` varchar(32) NOT NULL,
`barterdata` text,
KEY `barter_ibfk_1` (`uid`),
CONSTRAINT `barter_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
<reponame>cimav/sapos<filename>db/queries/trigger_3oct_2019.sql
DROP TRIGGER IF EXISTS failing_grade;
delimiter //
CREATE trigger failing_grade AFTER UPDATE
ON term_course_students
FOR EACH ROW
BEGIN
IF NEW.grade < 70 THEN
INSERT INTO emails VALUES(NULL,"<EMAIL>","<EMAIL>","Un estudiante ha recibido califi... |
/*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
... |
select user.name as user,
election.name as election,
confirmation,
when_cast
from ballot
inner join user
on ballot.user_id = user.id
inner join election
on ballot.election_id = election.id
where election_id = (select id from election whe... |
<reponame>gil0109/corteza-server
ALTER TABLE sys_team RENAME TO sys_role;
ALTER TABLE sys_team_member RENAME TO sys_role_member;
ALTER TABLE `sys_role_member` CHANGE COLUMN `rel_team` `rel_role` BIGINT UNSIGNED NOT NULL;
ALTER TABLE `sys_rules` CHANGE COLUMN `rel_team` `rel_role` BIGINT UNSIGNED NOT NULL;
|
CREATE SCHEMA IF NOT EXISTS atomic;
CREATE TABLE IF NOT EXISTS atomic.com_mparticle_snowplow_user_attributes_1 (
-- Schema of this type
schema_vendor varchar(128) not null encoding rle,
schema_name varchar(128) not null encoding rle,
schema_format varchar... |
<gh_stars>1-10
BEGIN;
DROP INDEX builds_running_builds_by_serial_groups_idx;
DROP INDEX worker_resource_cert_volumes_idx;
DROP INDEX pending_builds_idx;
DROP INDEX next_build_pipes_job_id_idx;
COMMIT;
|
-- Deploy ggircs-portal:policies/ciip_application_wizard_policies to pg
-- requires: tables/ciip_application_wizard
begin;
do
$policy$
begin
-- ciip_administrator RLS
perform ggircs_portal_private.upsert_policy('ciip_administrator_select_ciip_application_wizard', 'ciip_application_wizard', 'select', 'ciip_administrat... |
<filename>sources/packages/api/src-sql/ProgramYear/Add-col-start-end-dates.sql
ALTER TABLE
sims.program_years
ADD
COLUMN IF NOT EXISTS start_date DATE NOT NULL DEFAULT NOW();
ALTER TABLE
sims.program_years
ADD
COLUMN IF NOT EXISTS end_date DATE NOT NULL DEFAULT NOW();
COMMENT ON COLUMN sims.program_years.star... |
<gh_stars>10-100
INSERT INTO domain_services (id, domain_id, type) VALUES (1, 1, 'noop');
INSERT INTO domains (id, cluster_id, name, uuid) VALUES (1, 'west', 'germany', 'uuid-for-germany');
INSERT INTO project_services (id, project_id, type, scraped_at, stale, scrape_duration_secs, rates_scraped_at, rates_stale, rate... |
UPDATE `budget`
SET `acct_id` = %s, `alloc_yr` = %s, `alloc_mo` = %s, `memo` = %s, `target_amnt_inc_vat` = %s, `date_begin` = %s, `date_end` = %s
WHERE `id` = %s |
<filename>examples/out/examples/mysql_database_example_tables_temp.sql<gh_stars>0
-- ----------------------------
-- -- Table for users user_info {'sharding_date_begin': 'None', 'sharding_date_end': 'None', 'space': 'user_spaces'}
-- ----------------------------
DROP TABLE IF EXISTS `user_info`;
CREATE TEMPORARY TABLE... |
/*
Navicat Premium Data Transfer
Source Server : skd
Source Server Type : PostgreSQL
Source Server Version : 110003
Source Host : localhost:5432
Source Catalog : lbs_upload
Source Schema : public
Target Server Type : PostgreSQL
Target Server Version : 110003
File Encod... |
select avg(rental_rate) from film;
select count(*) from film where title like 'C%';
select max(length) from film where rental_rate=0.99;
select count(discint replacement_cost) from film where lenght>150;
|
DROP TABLE IF EXISTS rules; |
<reponame>ValeriyShnurovoy/TestParser
-- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Май 25 2020 г., 09:37
-- Версия сервера: 10.1.25-MariaDB
-- Версия PHP: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET tim... |
<reponame>Faruq000/api
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 13, 2021 at 02:06 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
<reponame>rbpermadi/bobobox
-- phpMyAdmin SQL Dump
-- version 4.9.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 09, 2020 at 02:04 PM
-- Server version: 5.7.26
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+07:00";
/*!40101 SET @OLD_CHARACTER_SET_... |
<filename>src/fhirbase_indexing.sql
-- #import ./fhirbase_coll.sql
-- #import ./fhirbase_gen.sql
-- #import ./fhirbase_idx_fns.sql
-- #import ./fhirbase_date_idx.sql
CREATE EXTENSION IF NOT EXISTS btree_gist ;
func _token_index_fn(dtype text, is_primitive boolean) RETURNS text
SELECT 'fhirbase_idx_fns.index_'
||... |
<gh_stars>1-10
CREATE OR REPLACE PROCEDURE "HS"."DELETE_WORKER_ACCOUNT"
(ss NUMBER)
as
begin
delete from worker where SSN=ss;
delete from account where SSN=ss;
end;
/
|
CREATE TABLE [dbo].[WageType] (
[WageTypeId] INT NOT NULL IDENTITY (-1, -1),
[CodeName] NVARCHAR (3) NOT NULL,
[ShortName] NVARCHAR (10) NOT NULL,
[FullName] NVARCHAR (50) NOT NULL,
CONSTRAINT [PK_WageType] PRIMARY KEY CLUSTERED ([WageTypeI... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.