sql stringlengths 6 1.05M |
|---|
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 29, 2022 at 07:34 PM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 8.1.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<gh_stars>0
CREATE PROC NewUser
@Username nvarchar(50),
@Password n<PASSWORD>(50),
@Email nvarchar(50)
AS
INSERT INTO TblLogin(Username,Password,Email)
VALUES (@Username, @Password, @Email)
|
<reponame>revisohq/demo-app
DROP TABLE "public"."trips";
|
select distinct C.customer_name from Customer C,Depositor D,Account A
where C.customer_name = D.customer_name and D.account_number = A.account_number and A.balance > 500;
|
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 21-01-2022 a las 22:44:52
-- Versión del servidor: 5.7.37
-- Versión de PHP: 7.4.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 11, 2016 at 07:41 PM
-- Server version: 10.1.8-MariaDB
-- PHP Version: 5.6.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
<reponame>VickyJFoster/my_sql_octopus_poc
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[GetUserIDFromBlogUserID]
@BlogUserID int
AS
SELECT SSCID
FROM CommunityServer.dbo.cs_Users
WHERE UserID = @BlogUserID
GO
GRANT EXECUTE ON [dbo].[GetUserIDFromBlogUserID] TO [ssc_webapplication]
GO
|
CREATE TABLE public.user(
id_user BIGSERIAL NOT NULL CONSTRAINT public_user_pkey PRIMARY KEY,
id_gallery BIGINT NOT NULL CONSTRAINT public_user_gallery_fkey REFERENCES public.gallery(id_gallery) MATCH SIMPLE ON UPDATE CASCADE ON DELETE RESTRICT,
first_name CHARACTER VARYING(20) NOT NULL,
last_name CHARACTER VARYING... |
CREATE TABLE [dbo].[BingoInstance] (
[BingoInstanceId] UNIQUEIDENTIFIER CONSTRAINT [DF_BingoInstance_BingoInstanceId] DEFAULT (newid()) NOT NULL,
[MeetingId] UNIQUEIDENTIFIER NULL,
[NumberOfColumns] INT NOT NULL,
[NumberOfRows] INT ... |
SELECT "Medicare1_2"."DRUG_NAME" AS "DRUG_NAME" FROM "Medicare1_2" WHERE ("Medicare1_2"."DRUG_NAME" IS NULL) LIMIT 1;
|
<reponame>markddrake/XFILES<filename>XMLSchemaWizard/sql/registerSchemas.sql
set echo on
spool registerSchema.log
--
set pages 0
set lines 256
set long 10000000
set trimspool on
--
def USERNAME = '&1'
--
DEF TARGET_DIRECTORY = '&2'
--
def SCHEMA_ARCHIVE = '&3'
--
@&TARGET_DIRECTORY/setVariables
--
drop user &USERNAME ... |
-- creates the table unique_id id INT with the default value 1 and unique
CREATE TABLE IF NOT EXISTS unique_id
(
id INT(1) AUTO_INCREMENT UNIQUE, name VARCHAR(256)
);
|
<gh_stars>0
INSERT INTO `#__joomlawatch_ip2c` (`start`, `end`, `a2`, `a3`, `country`) VALUES (3284467712, 3284531775, 'FI', 'FIN', 'FINLAND'),
(3284531776, 3284531779, 'NL', 'NLD', 'NETHERLANDS'),
(3284531780, 3284533247, 'FI', 'FIN', 'FINLAND'),
(3284533248, 3284598783, 'SE', 'SWE', 'SWEDEN'),
(3284598784, 3284664... |
select fn_db_create_constraint('vds_interface', 'vds_interface_vds_id_network_name_unique', 'unique (vds_id, network_name)');
|
CREATE TABLE ubicaciones(
id INTEGER NOT NULL AUTO_INCREMENT,
codigo VARCHAR(10),
descripcion VARCHAR(50),
CONSTRAINT pk_ubicaciones PRIMARY KEY(id)
);
CREATE TABLE tipos(
id INTEGER NOT NULL AUTO_INCREMENT,
descripcion VARCHAR(50) NOT NULL,
CONSTRAINT pk_tipos PRIMARY KEY(id)
);
CREATE TABLE traductores(
id... |
(
SELECT
c.`id` AS id,
c.`started` AS started,
c.`stopped` AS stopped,
c.`client` AS client,
c.`user` AS user,
NULL AS topic,
"connect" AS type
FROM `connects` c
INNER JOIN `clients` cc ON c.`client` = cc.`uuid`
WHERE c.`client` = ?
)
UNION
(
SELECT
c.`id` AS id,
c.... |
<reponame>hangxingliu/assignment-database-student-system<gh_stars>1-10
UPDATE TOP(1) TLend SET BackTime=GETDATE()
WHERE LendID = @LendID AND BackTime IS NULL;
|
DROP TABLE IF EXISTS dummy_entity;
CREATE TABLE dummy_entity (id_Prop BIGINT PRIMARY KEY, NAME VARCHAR(100));
|
--SQL Name: NEDS_M8005.sql
--Update History:
--2018-4-10: initial version by gaozw
select
lnbts_id
,lncel_id
,period_start_time
--avg rssi/sinr of pucch/pusch
,RSSI_PUCCH_AVG
,RSSI_PUSCH_AVG
,SINR_PUCCH_AVG
,SINR_PUSCH_AVG
from
NOKLTE_PS_LPQUL_MNC1_RAW
where
period_start_time >= to_date(&sta... |
<gh_stars>0
-- @testpoint:opengauss关键字read(非保留),作为字段数据类型(合理报错)
--前置条件
drop table if exists read_test cascade;
--关键字不带引号-合理报错
create table read_test(id int,name read);
--关键字带双引号-合理报错
create table read_test(id int,name "read");
--关键字带单引号-合理报错
create table read_test(id int,name 'read');
--关键字带反引号-合理报错
create table r... |
-- @testpoint: opengauss关键字tsfield(非保留),作为存储过程名,部分测试点合理报错
--关键字不带引号-成功
drop procedure if exists tsfield;
create procedure tsfield(
section number(6),
salary_sum out number(8,2),
staffs_count out integer)
is
begin
select sum(salary), count(*) into salary_sum, staffs_count from staffs where section_id = section;
... |
alter database [database_name] set partner failover |
--
-- large DWH & xsmall DWH
-- 6M rows full load with PKEY
-- 60M rows --''--
--destination (final) table
CREATE TABLE "lineitems_final" (
"L_ORDERKEY" varchar(4000) NOT NULL DEFAULT NULL,
"L_PARTKEY" varchar(4000) NOT NULL DEFAULT NULL,
"L_SUPPKEY" varchar(4000) NOT NULL DEFAULT NULL,
... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS `storage` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`name` TEXT,
`path` TEXT,
`counter` INTEGER NOT NULL DEFAULT 1,
`hash` VARCHAR(64) NOT NULL,
`salt` VARCHAR(256) NOT NULL,
`created` DATETIME NOT NULL,
`updated` DATETIME NOT NULL,
`expired` DATETIME NOT NULL
);... |
<filename>Src/Metrics.sql/dbo/Stored Procedures/ImportImageCount.sql<gh_stars>0
CREATE PROCEDURE [dbo].[ImportImageCount]
AS
BEGIN
SET NOCOUNT ON;
-- Add region where not known
INSERT INTO [dbo].[Region] ([Region])
SELECT x.[Region]
FROM [dbo].[ImageCountImport] x
WHERE x.[Region] is NOT... |
<gh_stars>0
SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE `carreras` CHANGE `nivel_Educativo_id` `carreranivel_id` INT( 10 ) UNSIGNED NOT NULL;
ALTER TABLE `aud_carreras_log` CHANGE `nivel_Educativo_id` `carreranivel_id` INT( 10 ) UNSIGNED NOT NULL;
/*ALTER TABLE docentes DISABLE TRIGGERS ALL; */
SET FORE... |
<gh_stars>0
USE `diablo`;
SELECT
`name`,
(CASE
WHEN HOUR(`start`) BETWEEN 0 AND 11 THEN 'Morning'
WHEN HOUR(`start`) BETWEEN 12 AND 17 THEN 'Afternoon'
ELSE 'Evening'
END) AS 'Part of the Day',
(CASE
WHEN `duration` <= 3 THEN 'Extra Short'
WHEN `duration` BETWEE... |
<reponame>MrWalshyType2/ims-starting-point<filename>target/test-classes/sql-schema.sql
drop ims_test1 if exists;
create database if not exists ims_test1;
create table if not exists ims_test1.customers(id int primary key auto_increment not null unique, first_name varchar(32) not null, surname varchar(32) not null);
crea... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 26-Jun-2018 às 22:20
-- Versão do servidor: 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 = "+00:00";
/*!40101 SET @OLD... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 25, 2020 at 06:49 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.1.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... |
select fred
from flintstones
where yabadabadoo = wilma
and -- something is missing here...
; |
-- Database generated with pgModeler (PostgreSQL Database Modeler).
-- PostgreSQL version: 9.3
-- Project Site: pgmodeler.com.br
-- Model Author: ---
SET check_function_bodies = false;
-- ddl-end --
-- Database creation must be done outside an multicommand file.
-- These commands were put in this file only for conve... |
<gh_stars>1-10
-- https://www.hackerrank.com/challenges/name-of-employees/problem?isFullScreen=true&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen
SELECT name FROM Employee ORDER BY name
|
<reponame>Shuttl-Tech/antlr_psql
-- file:alter_table.sql ln:276 expect:true
ALTER TABLE tmp3 add constraint tmpconstr foreign key(c) references tmp2 match full
|
BEGIN;
SET search_path = xplankonverter, pg_catalog;
--
-- TOC entry 4493 (class 1247 OID 408036)
-- Name: enum_factory; Type: TYPE; Schema: xplankonverter; Owner: -
--
CREATE TYPE enum_factory AS ENUM (
'sql',
'form',
'default'
);
--
-- TOC entry 7516 (class 1247 OID 875084)
-- Name: enum_geometrie_ty... |
<filename>addition/anticheat_characters.sql<gh_stars>1-10
-- Anticheat tables from /dev/rsa
-- Config
DROP TABLE IF EXISTS `anticheat_config`;
CREATE TABLE IF NOT EXISTS `anticheat_config` (
`checktype` mediumint(8) unsigned NOT NULL COMMENT 'Type of check',
`description` varchar(255),
`check_peri... |
EXEC sp_rename 'Lookup.Category', 'WeeeCategory';
GO
-- EeeOutputAmount
ALTER TABLE [PCS].[EeeOutputAmount] DROP CONSTRAINT FK_EeeOutputAmount_Category;
GO
EXEC sp_rename 'PCS.EeeOutputAmount.CategoryId', 'WeeeCategoryId', 'COLUMN';
GO
ALTER TABLE [PCS].[EeeOutputAmount] WITH CHECK ADD CONSTRAINT [FK_EeeOutputAmoun... |
<reponame>luolxb/tracker-server
create table roles_depts
(
id BIGINT(19) auto_increment
primary key,
role_id BIGINT(19) null,
dept_id BIGINT(19) null,
constraint roles_depts_ibfk_1
foreign key (role_id) references role (id),
constraint roles_depts_ibfk_2
foreign key (dep... |
-- MySQL dump 10.13 Distrib 5.1.61, for redhat-linux-gnu (x86_64)
--
-- Host: mysql-eg-devel-1.ebi.ac.uk Database: test_escherichia_coli_core
-- ------------------------------------------------------
-- Server version 5.5.36-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CH... |
<filename>conf/evolutions/default/12.sql
# --- !Ups
ALTER TABLE project ALTER COLUMN share_option RENAME TO is_public;
# --- !Downs
ALTER TABLE project ALTER COLUMN is_public RENAME TO share_option;
|
vacuum full analyze bayes_seen;
vacuum full analyze bayes_token;
vacuum full analyze bayes_vars;
|
<reponame>wanghongxiang2018/cstore_fdw
/* cstore_fdw/cstore_fdw--1.4--1.5.sql */
CREATE FUNCTION cstore_clean_table_resources(oid)
RETURNS void
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE OR REPLACE FUNCTION cstore_drop_trigger()
RETURNS event_trigger
LANGUAGE plpgsql
AS $csdt$
DECLARE v_obj record;
BEGIN
FOR ... |
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
SET SERVEROUTPUT ON;
WHENEVER SQLERROR EXIT SQL.SQLCODE;
WHENEVER OSERROR EXIT 9;
DROP SEQUENCE PDS_SEQ;
DROP SEQUENCE PAT_SEQ;
DROP SEQUENCE PRO_SEQ;
D... |
<reponame>opengauss-mirror/Yat
-- @testpoint: reltime整数时间段除以负数
drop table if exists test_date01;
create table test_date01 (col1 reltime);
insert into test_date01 values ('60');
select col1/-10 from test_date01;
drop table if exists test_date01; |
<reponame>N-Rod1/postgresql2<gh_stars>0
SELECT pfirstname, (pfavorites -> 'Desserts') ? 'ice cream' FROM people; |
use Test;
select MAX(salary)
from instructor; |
CREATE DATABASE IF NOT EXISTS `swims` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `swims`;
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: swims
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.21-MariaDB
/*!40101 SET @OLD_CHAR... |
-- +migrate Up
create table users
(
id serial not null
constraint users_pk
primary key,
created_at timestamp not null,
updated_at timestamp not null
);
create table "users_individual"
(
user_id int not null
constraint users_individual_pk
primary key
cons... |
<gh_stars>0
select
NAME
from
City
where
COUNTRYCODE = 'USA'
and POPULATION > 120000
;
|
insert into servicio_laptop (num_servicio, laptop_id, importe, diagnostico, factura, sucursal_id) values (2, 1, '2784.87', 'Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.', fx_carga_blob('PROYECTO_FINAL_FACTURAS_DIR','fa'||round(dbms_random.value(1,40))||'.png'), 2645);
insert into servicio... |
<gh_stars>1-10
/*
*/
set serveroutput on size unlimited timing on
define schema=''
set termout off
column schema new_value schema
SELECT sys_context('USERENV', 'CURRENT_SCHEMA') as schema FROM dual;
set termout on
ACCEPT schema DEFAULT '&schema' PROMPT "Schema name. [&schema]: "
begin
for t in (select owner, tabl... |
SET IDENTITY_INSERT [dbo].[ApplicationUnsuccessfulReasonType] ON
GO
MERGE INTO [dbo].[ApplicationUnsuccessfulReasonType] AS Target
USING (VALUES
(0, N'', N'', N'Please Select...', 0, N'n/a', N'Please Select...', 1),
(1, N'CIP', N'CIP', N'You’re not eligible for an apprenticeship', 6, N'Thank you for your applicatio... |
-- file:jsonb.sql ln:281 expect:true
SELECT jsonb '{"a":null, "b":"qq"}' ?| ARRAY['c','d']
|
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5627590_sys_RabbitMQ_Message_Audit.sql
-- 2022-02-24T14:58:25.132Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Table (AccessLevel,ACTriggerLength,AD_Client_ID,AD_Org_ID,AD_T... |
ALTER TABLE db_version CHANGE COLUMN required_11516_01_mangos_spell_proc_event required_11517_01_mangos_spell_proc_event bit;
DELETE FROM `spell_proc_event` WHERE entry = 57870;
INSERT INTO `spell_proc_event` VALUE
(57870, 0x00, 9, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x... |
DROP TABLE IF EXISTS villages;
CREATE TABLE IF NOT EXISTS villages
(
id char(10) not null,
district_id char(7) not null,
name varchar(255) not null,
primary key (id),
constraint villages_district_id_foreign
foreign key (district_id)
references districts ... |
<filename>data_commons/common_functions.sql
-- BEGIN transaction
BEGIN;
CREATE OR REPLACE FUNCTION public.unset_bulk_upload() RETURNS BOOLEAN AS $$
SELECT set_config('rbk.bulk_upload', 'False', False);
SELECT true;
$$ LANGUAGE SQL;
CREATE OR REPLACE FUNCTION public.get_bulk_upload() RETURNS BOOLEAN AS $$
SE... |
<gh_stars>0
CREATE DATABASE Ebook;
CREATE TABLE usuario(
codUsuario integer PRIMARY KEY,
nome VARCHAR(255) NOT NULL,
senha VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
dataDeNascimento Date NOT NULL,
cpf VARCHAR(255) NOT NULL,
sexo char NOT NULL,
codEndereco integer
); |
/*
* Copyright 2021 The University of Manchester
*
* 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 ... |
-- drop role
DROP ROLE IF EXISTS het_application_proxy;
DROP USER IF EXISTS trdbhetd;
DROP USER IF EXISTS trdbhett;
DROP USER IF EXISTS trdbhetp;
|
<filename>Tellma.Database.Application/dbo/Tables/dbo.DashboardDefinitionRole.sql
CREATE TABLE [dbo].[DashboardDefinitionRoles]
(
[Id] INT CONSTRAINT [PK_DashboardDefinitionRoles] PRIMARY KEY IDENTITY,
[DashboardDefinitionId] INT NOT NULL CONSTRAINT [FK_DashboardDefinitionRoles_DashboardDefinitionId] REFE... |
DROP TABLE IF EXISTS provider_power_daily;
CREATE TABLE provider_power_daily (
provider VARCHAR(20) NOT NULL,
date DATE,
"avg(rawBytePower)" DOUBLE PRECISION,
"avg(qualityAdjPower)" DOUBLE PRECISION
);
|
BEGIN;
SET search_path = 'cover_art_archive';
CREATE TABLE art_type (
id SERIAL NOT NULL, -- PK
name TEXT NOT NULL
);
CREATE TABLE cover_art (
id BIGINT NOT NULL, -- PK
release INTEGER NOT NULL, -- references musicbrainz.release.id CASCADE
comment TEXT NOT NULL DEFAULT '',
edit INTEGER NOT NU... |
/*
First derived from View "mgd.voc_evidence_view"
TEC: unused?
*/
SELECT e._annotevidence_key,
vat.name as annot_type,
e.inferredfrom,
t0.abbreviation AS evidencecode,
t0.sequencenum AS evidenceseqnum,
t1.term as bibreftyp,
c.jnumid,
c.numericpart AS jnum,
c.mgiid as mgipub,
c.... |
USE NBNDATA
GO
IF object_ID('NBNReporting.dbo.locations_without_admin_areas') IS NOT NULL
DROP TABLE NBNReporting.dbo.locations_without_admin_areas
GO
SELECT
FID = IDENTITY(int,1,1),
L.LOCATION_KEY,
LN.ITEM_NAME,
L.LAT, L.LONG,
LAA.LOCATION_ADMIN_AREAS_KEY
INTO NBNReporting.dbo.locations_witho... |
SET IDENTITY_INSERT geometry ON;
INSERT INTO dbo.geometry (ogr_fid, ogr_geometry, code, name, lat, long, boundary_level_id) VALUES (10763, 0xE610000001041D00000012E7BC6C86D7F2BFA5EDF6957E594B40DBC075E290C8F2BF31F326538D584B406AAF0AC11A24F3BF612F92386A594B40FB21EC94FAFFF2BF28EAC5AAD1584B407F5B57C2702FF3BFCD9E84E91B574B... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.7
-- Dumped by pg_dump version 14.0
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', '', fal... |
<filename>+usados/Novos/Buffer Cache/buffer_busy_waits-7.3.sql
-------------------------------------------------------------------------------
--
-- Script: buffer_busy_waits.sql
-- Purpose: to report the block classes and tablespace affect by bbwaits
-- For: 7.3
--
-- Copyright: (c) Ixora Pty Ltd
-- Author: <N... |
<filename>SQL/Q5.sql
-- Write a query to return the ratings data in a more readable format:
-- reviewer name, movie title, stars, and ratingDate.
-- Also, sort the data, first by reviewer name, then by movie title, and lastly by number of stars.
SELECT RE.name, RA.date, RA.rating as star, M.title
from Movies M
JOIN... |
<filename>db/equipmentunit_update.sql
ALTER TABLE `equipmentunit` ADD `fluids_tracked` varchar(200) NOT NULL DEFAULT '' AFTER `person_responsible`; |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 27, 2020 at 07:28 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
DROP VIEW IF EXISTS individual_part1_mb_geo;
DROP TABLE IF EXISTS individual_part1_mb;
CREATE TABLE individual_part1_mb (LIKE individual_part1);
ALTER TABLE individual_part1_mb ALTER COLUMN code TYPE text;
ALTER TABLE individual_part1_mb ADD PRIMARY KEY (code);
INSERT INTO individual_part1_mb SELECT * FROM individual_p... |
/*
Warnings:
- You are about to drop the column `dealershipId` on the `Category` table. All the data in the column will be lost.
- Added the required column `companyId` to the `Category` table without a default value. This is not possible if the table is not empty.
*/
-- DropForeignKey
ALTER TABLE "Category" DR... |
CREATE TABLE IF NOT EXISTS maw.country (
id SMALLSERIAL,
code CHAR(2) NOT NULL,
name VARCHAR(30) NOT NULL,
CONSTRAINT pk_maw_country PRIMARY KEY (id),
CONSTRAINT uq_maw_country_code UNIQUE (code),
CONSTRAINT uq_maw_country_name UNIQUE (name)
);
GRANT SELECT
ON maw.country
TO website;
|
CREATE TABLE [col_header] (
-- [id] integer NOT NULL PRIMARY KEY AUTOINCREMENT,
[name] varchar(40) NOT NULL PRIMARY KEY,
[itemType] varchar(30) NOT NULL,
[schema] varchar(4000) NULL
);
CREATE TABLE [col_item] (
[id] integer NOT NULL PRIMARY KEY AUTOINCREMENT,
[col] varchar(40) NOT NULL,
[key] varchar(60) ... |
CREATE TABLE pessoa (
id int NOT NULL identity(1,1) primary key,
nome varchar(255) NOT NULL default '',
datanascimento date not null default '',
endereco varchar(255) NOT NULL default '',
ativo char(1) NOT NULL default '1',
dathorinclusao datetime default current_timestamp,
dathoralteracao datetime... |
ALTER TABLE dettl_import_log
ADD COLUMN language TEXT,
ADD COLUMN mode TEXT;
|
-- This file should undo anything in `up.sql`
ALTER TABLE `entries` DROP COLUMN `user_id` INT NOT NULL;
|
ALTER TABLE player
RENAME COLUMN full_name TO display_name;
ALTER TABLE player
ADD COLUMN full_name VARCHAR(64) NULL,
ADD COLUMN onboarding_time_ms INTEGER NULL;
|
SET IDENTITY_INSERT Person ON;
INSERT INTO Person (Id,Name)
VALUES (2, 'Doe');
INSERT INTO Person (Id,Name)
VALUES (1, 'John');
SET IDENTITY_INSERT Person OFF; |
<reponame>jdkoren/sqlite-parser<filename>src/test/resources/pragma.test_21.sql
-- pragma.test
--
-- execsql {
-- pragma aux.synchronous;
-- }
pragma aux.synchronous; |
SELECT
date(block_time_solution) AS day,
AVG(token_usd_price)
FROM
gnosis_protocol.view_price_batch
WHERE
token_id = 7
GROUP BY
day
ORDER BY day;
|
<reponame>vlatkov/playgrounds<filename>target/classes/flyway/V3__insertValues.sql<gh_stars>0
INSERT INTO role(name, description) VALUE ('ROLE_ADMIN', 'Rola administratora profila');
INSERT INTO role(name, description) VALUE ('ROLE_USER', 'Rola korisničkog profila');
INSERT INTO role(name, description) VALUE ('ROLE_SUPE... |
<filename>annis-service/src/main/distribution/sql/indexes_staging_v33.sql
CREATE INDEX tmpidx_pk_node_token ON _node(id) WHERE token_index is not null;
CREATE INDEX tmpidx_unique_name_appendix_helper ON _node ("name", corpus_ref, id);
CREATE INDEX tmpidx_fk1_rank ON _rank (node_ref);
CREATE INDEX tmpidx__continuous_h... |
-- code to generate a segmented table with exactly 1 row per node
CREATE TABLE :tablename (segval int, node_name varchar(100)) segmented by hash(segval) :nodes ksafe;
-- create a temp table to store at least one row per node
CREATE LOCAL TEMP TABLE stage:tablename (a int) segmented by hash(a) :nodes;
-- load table with... |
CREATE DATABASE todo_livesolve;
CREATE TABLE tasks (
id SERIAL PRIMARY KEY,
tasks VARCHAR (100),
is_completed BOOLEAN DEFAULT FALSE
);
INSERT into tasks (name)
VALUES ('fun thing to do'); |
SELECT sd.id AS id,
sd.tanggal,
sd.kode,
sd.jumlah AS jumlah_in,
coalesce(i.jumlah,0) AS jumlah_konversi,
coalesce(p.jumlah, 0) AS jumlah_penjualan,
sd.jumlah - coalesce(i.jumlah,0)- coalesce(p.jumlah,0) AS sisa
FROM transaction_stok_det sd
LEFT OUTER JOIN
( SELECT ki.stok_id,... |
<reponame>awanz/ujici
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 20 Mar 2019 pada 12.04
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... |
--
-- TOC entry 206 (class 1259 OID 16471)
-- Name: publicacion; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.publicacion (
id integer NOT NULL,
titulo character varying(50),
descripcion character varying(50),
latitud double precision,
longitud double precision,
id_pers... |
--Consultas
select * from cadastro.tb_cargo tc order by dsc_cargo asc; --Ou desc que é descresente
select isn_estado_civil,count(*) from cadastro.tb_pessoa tp group by isn_estado_civil; --Estado civil das pessoas e o Count(*) vai contar quantas pessoas vai ter em cada estado civil
select isn_cargo, count(*), sum(vlr... |
SELECT m.date,
t.team_long_name AS opponent,
CASE WHEN home_team_goal > away_team_goal THEN 'Home Team Win'
WHEN home_team_goal < away_team_goal THEN 'Away Team Win'
ELSE 'Tie' END AS Outcome
FROM Match AS m
LEFT JOIN Team AS t
ON m.away_team_api_id = t.team_api_id
-- Filter for a team
-- WHERE m.home_... |
/*
Navicat Premium Data Transfer
Source Server : Venli@172.16.58.3
Source Server Type : MySQL
Source Server Version : 50641
Source Host : 192.168.3.117:3306
Source Schema : dblog
Target Server Type : MySQL
Target Server Version : 50641
File Encoding : 65001
Date: 24/... |
<filename>undergrad/dbscratch/learn-db/hw/hw38_07.sql
DROP TABLE if exists indexed_docs ;
CREATE TABLE indexed_docs (
doc_id UUID NOT NULL DEFAULT uuid_generate_v4() primary key,
document_title TEXT NOT NULL,
document_body TEXT NOT NULL,
document_tokens TSVECTOR
);
INSERT INTO indexed_docs ( document_ti... |
<filename>facade_twitter_dataset.sql
version https://git-lfs.github.com/spec/v1
oid sha256:23c45f26f29826fe18edb00be122ac5b44a44b167ae481adb713ed86320bc640
size 117898457
|
CREATE SCHEMA `critter` ;
CREATE USER 'sa'@'localhost' IDENTIFIED BY 'udacity';
GRANT ALL ON critter.* TO 'sa'@'localhost'; |
<reponame>andmarruda/SimpleBlog-PHP-PostgreSQL
CREATE TABLE article_tags(
id_article_tag BIGSERIAL NOT NULL CONSTRAINT article_tag_pkey PRIMARY KEY,
id_article BIGINT NOT NULL CONSTRAINT article_tags_article_fkey REFERENCES article(id_article) MATCH SIMPLE ON UPDATE CASCADE ON DELETE RESTRICT,
tag_text VARCHAR(60) N... |
<reponame>gprando/UTFPR
docker run -d --name p3-banco -e POSTGRES_PASSWORD=<PASSWORD> -p 5432:5432 postgres
-- ------------------------------------------- PROVA DE BANCO ---------------------------------------------------------------------
drop table Measure;
drop table Point;
drop table TypePoint;
drop table Sourc... |
<reponame>Nigth-Devs/CSM_Software<filename>database/scsm.sql
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 23-09-2021 a las 06:13:17
-- Versión del servidor: 10.4.18-MariaDB
-- Versión de PHP: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
STAR... |
--------------------------------------------------------------------------------
-- willie-treeregister - Update database structure
--------------------------------------------------------------------------------
DO $$
DECLARE
ver varchar;
BEGIN
EXECUTE 'SELECT value FROM core_options WHERE name = ''treeregister.d... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 18 Agu 2021 pada 08.35
-- Versi server: 10.4.14-MariaDB
-- Versi PHP: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.