sql stringlengths 6 1.05M |
|---|
SELECT NAME
FROM CITY
WHERE COUNTRYCODE = 'USA'
AND POPULATION > 120000; |
UPDATE M_Attribute SET IsReadOnlyValues = 'Y' WHERE Value = 'QualityNotice'; |
<gh_stars>1000+
-- 2020-10-12T11:07:15.602Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET DisplayLogic=' ',Updated=TO_TIMESTAMP('2020-10-12 14:07:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12174
;
-- 2020-10-12T11:07:20.059Z
-- I forgot to set the DICTIONARY_ID... |
/* -----------------------------------------------------------------------------
Delete all data from the PIMS_LEASE_RESPONSIBILITY_TYPE table and repopulate.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Author Date Comment
------------ ----------- ------------------... |
/*字典表*/
ALTER TABLE t_base_sys_dic RENAME englist_name TO english_name;
/*修改卡的字段 period_id vachar(20) 为varchar(40)*/
ALTER TABLE t_base_period_setting ALTER COLUMN period_id TYPE VARCHAR(40);
|
CREATE TABLE `user` (
`userid` varchar(20) NOT NULL,
`passwd` varchar(20) NOT NULL,
`nickname` varchar(20) NOT NULL,
`name` varchar(16) NOT NULL,
`photo` varchar(100) NOT NULL,
`sex` char(1) NOT NULL COMMENT '0-man,1-women',
`mobile` varchar(13) NOT NULL,
`email` varchar(50) NOT NULL,
`recommend... |
<gh_stars>0
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
-- Copyright [2016-2018] EMBL-European Bioinformatics Institute
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-... |
<filename>Projects/Cabergoline/2_cab_full_cohort.sql<gh_stars>0
-- ----------------------------------------------------------------------
-- 2a. filter to geographical cohort and add patient demog data
-- ----------------------------------------------------------------------
use data_extracts;
drop procedure if exists... |
<gh_stars>0
insert into gasto (identificacion_usuario, valor_gasto, fecha_gasto)
values (:identificacionUsuario, :valorGasto, :fechaGasto) |
<gh_stars>0
update vdc_options
set option_value = (select vds_group_id from vds_groups where name ilike 'Default')
where option_name = 'AutoRegistrationDefaultVdsGroupID' and version = 'general';
|
<reponame>mamacmm/lemon<filename>src/main/resources/dbmigrate/mysql/party/V0_0_1__party_type.sql
CREATE TABLE PARTY_TYPE(
ID BIGINT auto_increment,
NAME VARCHAR(50),
PERSON INTEGER,
SCOPE_ID VARCHAR(50),
CONSTRAINT PK_PARTY_TYPE PRIMARY KEY(ID)
) ENGINE=INNODB CHARSET=UTF8;
|
/* ----------------------------------------------------------------
Stored procedures for database operations on Gluster Volume
related tables:
- gluster_volumes
- gluster_volume_bricks
- gluster_volume_options
- gluster_volume_access_protocols
- gluster_volume_transport_types
----------... |
<gh_stars>10-100
USE beekeeper;
ALTER TABLE housekeeping_path ADD INDEX `housekeeping_path_index_table_name_upper` ((upper(table_name)));
ALTER TABLE housekeeping_path ADD INDEX `housekeeping_path_index_status` (`housekeeping_status`);
DROP INDEX `housekeeping_path_index` ON housekeeping_path;
ALTER TABLE housekeepin... |
-- create normal table
drop table if exists px_parallel_corr_update_t1 cascade;
CREATE TABLE px_parallel_corr_update_t1 (c1 int, c2 int) ;
insert into px_parallel_corr_update_t1 select generate_series(1,100),generate_series(1,100);
drop table if exists px_parallel_corr_update_t2 cascade;
CREATE TABLE px_parallel_corr_... |
SET client_min_messages TO warning;
SET log_min_messages TO warning;
-- Create Delta E functions.
--
--
-- functions
--
CREATE OR REPLACE FUNCTION delta_e_cie_1976(double precision, double precision, double precision, double precision, double precision, double precision)
RETURNS double precision
AS 'color... |
<gh_stars>100-1000
SET client_min_messages TO 'WARNING';
INSERT INTO artist (id, gid, name, sort_name)
VALUES (1, '945c079d-374e-4436-9448-da92dedef3cf', 'Artist', 'Artist');
INSERT INTO artist_credit (id, name, artist_count) VALUES (1, 'Artist', 1);
INSERT INTO artist_credit_name (artist_credit, position, artist... |
<reponame>zdenulo/bigquery-openstreetmap
SELECT
2034 AS layer_code, 'poi_public' AS layer_class, 'recycling_metal' AS layer_name, feature_type AS gdal_type, osm_id, osm_way_id, osm_timestamp, all_tags, geometry
FROM `openstreetmap-public-data-prod.osm_planet.features`
WHERE
EXISTS(SELECT 1 FROM UNNEST(all_tags) AS ta... |
SELECT * FROM item_divulgacao
WHERE ra_aluno = $1 |
<filename>GetCompletedInvoices.sql<gh_stars>0
' To Creat on Go Daddy: Select Routines, Add Routine, copy everything from Begin to End. Set it to Contains SQL. Execute.
USE `bloodguys`;
DROP procedure IF EXISTS `GetCompletedInvoices`;
DELIMITER $$
USE `bloodguys`$$
CREATE PROCEDURE `GetCompletedInvoices` ()
BEGIN
Set @... |
CALL apoc.schema.assert(NULL, NULL, TRUE);
|
<reponame>Kesego23/SQL-PLSQL-scripts-
SELECT rent.propertyid FROM rent INNER JOIN property
ON property.propertyid=rent.propertyid
WHERE city = '&city'; |
CREATE DATABASE IF NOT EXISTS `robert_huaman_api`;
CREATE DATABASE IF NOT EXISTS `robert_huaman_api_acceptance_tests`;
CREATE USER 'root'@'localhost' IDENTIFIED BY '<PASSWORD>';
GRANT ALL ON *.* TO 'root'@'%';
|
<filename>db_scripts/Seasons_table.sql
CREATE TABLE SEASONS (
ID NUMBER NOT NULL,
TVSHOW_ID_FK NUMBER NOT NULL ,
SEASON_NUMBER NUMBER NOT NULL ,
SEASON_RELEASE_DATE DATE,
SEEN NUMBER(1),
SEEN_TIME DATE,
CREATION_TIME DATE NOT NULL
);
COMMENT ON COLUMN SEASONS.ID is 'Technische ID.';
COMMENT ON COLUMN SEA... |
CREATE TABLE `sap_planned_order_header_data`
(
`PlannedOrder` varchar(10) NOT NULL,
`PlannedOrderType` varchar(4) DEFAULT NULL,
`PlannedOrderProfile` varchar(4) DEFAULT NULL,
`Material` varchar(40) DEFAULT NULL,... |
<reponame>TungBS/thehinh.vn
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th9 20, 2020 lúc 09:24 AM
-- Phiên bản máy phục vụ: 10.4.13-MariaDB
-- Phiên bản PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00... |
CREATE VIEW [Query].[Secret]
AS
SELECT
Secrets.[UserLoginName]
,Secrets.[Secret]
,Secrets.[ValidUntil]
FROM
[dbo].[Secret] Secrets
-- END of [Query].[Secret] |
<reponame>timshadel/subdivision-list
CREATE TABLE subdivision_CL (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "subdivision_CL" ("id", "name", "level") VALUES (E'CL-AN', E'Antofagasta', E'region');
INSERT INTO "subdivision_CL" ("id", "name", "level") VALUES (E'CL... |
<reponame>sy3kic/nZEDb<gh_stars>100-1000
INSERT IGNORE INTO tmux (setting, value) VALUE ('showprocesslist', 'FALSE');
INSERT IGNORE INTO tmux (setting, value) VALUE ('processupdate', '2');
UPDATE site SET value = '143' WHERE setting = 'sqlpatch';
|
UPDATE `sys_page_compose_pages` SET `Title` = 'Store View Product' WHERE `Name` = 'bx_store_view';
UPDATE `sys_page_compose_pages` SET `Title` = 'Store User' WHERE `Name` = 'bx_store_my';
SET @iFirstColumn = (SELECT COUNT(*) FROM `sys_page_compose` WHERE `Page` = 'bx_store_view' AND `Column` = 1);
UPDATE `sys_pa... |
CREATE TABLE quickaccess (
id CHAVE NOT NULL,
new_window BOOLEAN NOT NULL,
link CHARACTER VARYING(255) NOT NULL,
CONSTRAINT pk_quickaccess PRIMARY KEY (id)
); |
SELECT [Sessions].[SessionId],
TestInfo.TestId,
NetworkInfo.Operator as 'Serving Operator',
NetworkInfo.HomeOperator as 'Home Operator',
TestInfo.Technology,
FileList.CallingModule,
FileList.ASideDevice,
Convert(varchar, TestInfo.StartTime, 104) as 'msgDate',
Convert(varchar, TestInfo.StartTime, 108) as 'msgTim... |
<gh_stars>0
{%- macro null_negative_numbers(value) -%}
IFF( {{ value }}::NUMBER < 0, NULL, {{ value }}::NUMBER )
{%- endmacro -%}
|
--load nwx.hurrcn table
copy nwx.hurrcn (productid,stnid,stnname,state,country,latitude,longitude,elevation) FROM stdin with delimiter as ',';
72202,KMIA,MIAMI_INTL_AIRP,FL,US,25.82,-80.28,4
99999,KNHC,NATIONAL_HURRICANE_CENTER(TPC),FL,US,25.82,-80.28,4
99999,KWBC,WASHINGTON/DULLES,VA,US,38.95,-77.45,98
99999,KWNH,WAS... |
<gh_stars>0
drop table if exists testheaderfooter;
create table testheaderfooter(voter_id int, name string, age int, contributions float, create_time string) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' tblproperties("skip.header.line.count"="2","skip.footer.line.count"="1");
LOAD DATA LOCAL INPATH 'framework/resourc... |
DROP CONSTRAINT ON (`port_properties`:`port_properties`) ASSERT `port_properties`.`entityId` IS UNIQUE;
DROP CONSTRAINT ON (`port_properties`:`port_properties`) ASSERT `port_properties`.`discriminator` IS UNIQUE;
|
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50712
Source Host : localhost:3306
Source Database : assist
Target Server Type : MYSQL
Target Server Version : 50712
File Encoding : 65001
Date: 2016-05-19 19:23:51
*/
SET FOREIGN_KEY_CHECKS=0;
-- --... |
<filename>DMS_Pipeline/udfExtractServerName.sql
/****** Object: UserDefinedFunction [dbo].[udfExtractServerName] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION dbo.udfExtractServerName
/****************************************************
** Extracts the server name from the given p... |
IF OBJECT_ID('finance.is_new_day_started') IS NOT NULL
DROP FUNCTION finance.is_new_day_started;
GO
CREATE FUNCTION finance.is_new_day_started(@office_id integer)
RETURNS bit
AS
BEGIN
IF EXISTS
(
SELECT TOP 1 0 FROM finance.day_operation
WHERE finance.day_operation.office_id = @office_id
... |
CREATE TABLE bctw.collar (
collar_id uuid DEFAULT crypto.gen_random_uuid() NOT NULL,
collar_transaction_id uuid DEFAULT crypto.gen_random_uuid() NOT NULL,
camera_device_id integer,
device_id integer,
device_deployment_status integer,
device_make integer,
device_malfunction_type integer,
... |
<filename>Hive/Interactive_MicroBenchmark/BigOP-e-commerce-orderby.sql
drop table tmp36;
create table tmp36 as SELECT * FROM bigdatabench_dw_item order by ITEM_ID;
|
<gh_stars>10-100
/*
* Copyright 2022 Google LLC
*
* 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 l... |
-- This is a new query in TPCDS v2.7
with results as (
select
i_item_id,
s_state, 0 as g_state,
ss_quantity agg1,
ss_list_price agg2,
ss_coupon_amt agg3,
ss_sales_price agg4
from
store_sales, customer_demographics, date_dim, store, item
where
ss_so... |
update jig set last_synced_at = null;
|
<filename>AutItems.sql
create table `auth_rule` (
`name` varchar(64) not null,
`data` text,
`created_at` integer,
`updated_at` integer,
primary key (`name`)
) engine InnoDB;
create table `auth_item` (
`name` varchar(64) not null,
`type` integer not null,
`description` text,
`rule_name` varchar(64),
`data` ... |
create class test_class (datetime_col datetimeltz not null);
insert into test_class values(NULL);
insert into test_class values(datetimeltz '1990-01-02 23:59:59.999');
select * from test_class;
drop class test_class; |
-- @testpoint: 插入正浮点数
drop table if exists float8_01;
create table float8_01 (name float8);
insert into float8_01 values (120.123);
insert into float8_01 values (99999.99999);
insert into float8_01 values (0.000001);
select * from float8_01;
drop table float8_01; |
SELECT
FROM HOME (
]
); |
-- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 12, 2018 at 09:38 AM
-- Server version: 5.6.36-cll-lve
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 08-07-2020 a las 00:42:13
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
-- CreateTable
CREATE TABLE "User" (
"id" SERIAL NOT NULL,
"name" TEXT,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY ("id")
);
|
<filename>Demos/Demo2_DataVirtualization/Demo2_DataVirtualization_Polybase.sql
---''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
--- SQL SCRIPT: Demo2_DataVirtualization_Polybase.sql
---
--- Description: Demo of data virtualization -
---
---
--- Parameters :
---
---
--- Date ... |
<filename>pouch.sql
/*
Navicat MySQL Data Transfer
Source Server : Localhost
Source Server Version : 100119
Source Host : localhost:3306
Source Database : pouch
Target Server Type : MYSQL
Target Server Version : 100119
File Encoding : 65001
Date: 2018-01-25 13:23:17
*/
SET FOREIGN... |
<filename>ops/db/init.sql
CREATE DATABASE IF NOT EXISTS ecommerce;
USE ecommerce;
CREATE TABLE IF NOT EXISTS reviews (
id varchar(50),
review_id varchar(50),
order_id varchar(50),
score integer,
comment_title varchar(255),
comment_message varchar(255),
created_at datetime,
answered_at da... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 22, 2020 at 09:06 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 15, 2021 at 03:31 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 16 Mar 2020 pada 04.36
-- Versi server: 10.1.36-MariaDB
-- Versi PHP: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
-- Adminer 4.3.1 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `Transactions`;
CREATE TABLE `Transactions` (
`transaction_id` bigint(20) NOT NULL AUTO_INCREMENT,
`uid` varchar(36) NOT NULL,
`wallet_type` varchar(80) ... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 26, 2019 at 02:06 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
-- Get the latency table from the database.
SELECT s.hostname as src_hostname, s.location as src_location, s.latitude as src_latitude, s.longitude as src_longitude,
d.hostname as dst_hostname, d.location as dst_location, d.latitude as dst_latitude, d.longitude as dst_longitude,
l.messages, l.timeouts, l... |
--
-- Management functions
-- -------------------------------------------------------
-- Truncate all tables for one or all schemas for the specified user.
-- Argument 'schema' must either be a valid schema name or "all" for all schemas.
CREATE OR REPLACE FUNCTION truncate_tables(username VARCHAR, schema VARCHAR)
RETU... |
/*
- ADMINISTRATOR : <EMAIL> / test
- TRAINER : <EMAIL> / test
- USER : <EMAIL> / test
*/
CREATE DATABASE onlinekursverwaltung;
USE onlinekursverwaltung;
CREATE TABLE `t_internal_user`
(
`internal_user_id` INT NOT NULL auto_increment,
`is_administrator` VARCHAR(1) NOT NUL... |
CREATE EXTENSION pgspeck;
-- test vector from the original whitepaper
select to_hex(pgspeck_encrypt32((x'6574694c')::int8, (x'1918111009080100')::int8));
select u.val, k.key, pgspeck_decrypt32(pgspeck_encrypt32(u.val, k.key), k.key)
from
unnest(array[
-- edge values
0, 1, 4294967294, 4294967295,
-- a randomly gen... |
ALTER TABLE ANDEL_TILKJENT_YTELSE
ADD COLUMN tilkjent_ytelse_id bigint references tilkjent_ytelse(id);
UPDATE ANDEL_TILKJENT_YTELSE aty
SET tilkjent_ytelse_id = ty.id
FROM tilkjent_ytelse ty WHERE aty.fk_behandling_id = ty.fk_behandling_id; |
<reponame>Shuttl-Tech/antlr_psql<filename>src/test/resources/sql/create_function/dda484be.sql
-- file:window.sql ln:315 expect:true
CREATE FUNCTION logging_sfunc_nonstrict(text, anyelement) RETURNS text AS
$$ SELECT COALESCE($1, '') || '*' || quote_nullable($2) $$
LANGUAGE SQL IMMUTABLE
|
# geneCheck.sql was originally generated by the autoSql program, which also
# generated geneCheck.c and geneCheck.h. This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly
# automatic way.
#results from gene-check program
CREATE TABLE geneCheck (
acc varchar(2... |
<reponame>umpirsky/currency-list<filename>data/no_NO/currency.mysql.sql<gh_stars>100-1000
CREATE TABLE list (id VARCHAR(10) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
INSERT INTO `list` (`id`, `value`) VALUES ('XPF', 'CFP-franc');
INSERT I... |
<filename>server/migrations/default/1652270901658_modify_primarykey_public_tag/up.sql
BEGIN TRANSACTION;
ALTER TABLE "public"."tag" DROP CONSTRAINT "tag_pkey";
ALTER TABLE "public"."tag"
ADD CONSTRAINT "tag_pkey" PRIMARY KEY ("uuid");
COMMIT TRANSACTION;
|
SET DEFINE OFF;
Insert into MDM_OWNER.REF_MATCH_PROPOSED_ACTION
(ID_PK, VERSION, CREATED_TS, UPDATED_TS, UPDATED_BY_USER, UPDATED_BY_TXN_ID, CONFIG_LANGUAGE_CODE_KEY, KEY, VALUE, DESCRIPTION)
Values
('1', 0, TO_TIMESTAMP('10/30/2017 5:10:56.527000 PM','fmMMfm/fmDDfm/YYYY fmHH12fm:MI:SS.FF AM'), TO_TIMESTAMP('10/... |
\connect lightshield;
CREATE SCHEMA REGION;
GRANT ALL PRIVILEGES ON SCHEMA REGION TO postgres;
|
create or replace package LANGUAGES
as
function ADD( i_languageid LANGUAGE.LANGUAGEID%type,
i_name LANGUAGE.NAME%type,
i_auduser LANGUAGE.AUDUSER%type)
return number;
function FIND( i_name LANGUAGE.NAME%type)
return LANGUAGE.LANGUAGEID%type;
function MODIFY( i_languageid LANGUAGE.LANGUAGEID%type,
i_name LANGU... |
<reponame>GiovanniColonni/HealthSystem
-- MySQL dump 10.13 Distrib 5.7.33, for Linux (x86_64)
--
-- Host: 192.168.127.12 Database: remoteMonitoring
-- ------------------------------------------------------
-- Server version 5.5.60-0+deb7u1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 ... |
/****** Object: Table [dbo].[BlitzCache] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BlitzCache](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[ServerName] [nvarchar](258) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CheckDate] [datetimeoffset](7) NULL,
[Version] [nvarchar](258) C... |
-- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64)
--
-- Host: ac3e91d5853dc11ea9212068202d388e-1942592115.us-west-2.elb.amazonaws.com Database: sortinghat
-- ------------------------------------------------------
-- Server version 5.5.5-10.3.16-MariaDB-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
* 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 ap... |
ALTER TABLE pglogical.subscription ADD COLUMN sub_apply_delay interval NOT NULL DEFAULT '0';
CREATE TABLE pglogical.replication_set_seq (
set_id oid NOT NULL,
set_seqoid regclass NOT NULL,
PRIMARY KEY(set_id, set_seqoid)
) WITH (user_catalog_table=true);
WITH seqs AS (
SELECT r.set_id, r.set_reloid
FR... |
<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/storage/filerep_end_to_end/sync2/sql/sync2_alter_tbl_add_column.sql
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--
-- HEAP TEST
--
CREATE TABLE sync2_add_column_heap (col1 char DEFAULT 'z' ,col2 numeric DEFAULT 100 ,col3 boolean DE... |
<filename>tests/_data/schema.sql
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for `profile`
-- ----------------------------
DROP TABLE IF EXISTS `profile`;
CREATE TABLE `profile` (
`user_id` int(11) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`public_email` varc... |
DO
$$
BEGIN
IF register_patch('AlterProposalAddNotified.sql', 'fredrikbolmsten', 'Adding notified field for proposal', '2020-05-19') THEN
BEGIN
ALTER table proposals ADD COLUMN notified BOOLEAN DEFAULT FALSE;
END;
END IF;
END;
$$
LANGUAGE plpgsql; |
<reponame>laudarch/GTAS
/*
*
* * All Application code is Copyright 2016, The Department of Homeland Security (DHS), U.S. Customs and Border Protection (CBP).
* *
* * Please see LICENSE.txt for details.
*
*/
drop table if exists pending_hit_detail;
|
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字generated(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists generated;
create group generated with password '<PASSWORD>';
drop group generated;
--关键字带双引号-成功
drop group if exists "generated";
create group "generated" with password '<PASSWORD>';
drop group "generat... |
<reponame>opengauss-mirror/Yat<filename>openGaussBase/testcase/KEYWORDS/Final/Opengauss_Function_Keyword_Final_Case0023.sql
-- @testpoint: opengauss关键字final(非保留),作为索引名,部分测试点合理报错
--前置条件,创建一个表
drop table if exists final_test;
create table final_test(id int,name varchar(10));
--关键字不带引号-成功
drop index if exists final;
cre... |
--DBA
create user shop
identified by shop;
grant resource,connect
to shop;
-- shop
create table member
(
userid varchar2(10) primary key,
passwd varchar2(10) not null,
username varchar2(10) not null,
post varchar2(6) not null,
addr1 varchar2(500) not null,
addr2 varchar2(500) not null,
... |
CREATE DEFINER=`root`@`localhost` PROCEDURE `prc_GetRecurringInvoiceLog`(
IN `p_CompanyID` INT,
IN `p_RecurringInvoiceID` INT,
IN `p_Status` INT,
IN `p_PageNumber` INT,
IN `p_RowspPage` INT,
IN `p_lSortCol` VARCHAR(50),
IN `p_SortOrder` VARCHAR(50),
IN `p_isExport` INT
)
BEGIN
DECLARE v_OffSet_ int;
SET... |
<reponame>Silvers-J/okintory-server
CREATE TABLE `role` (
roles varchar(10) not null
);
insert into role values ('ADMIN');
insert into role values ('MERCHANT');
insert into role values ('CUSTOMER');
|
<filename>Activity2/Exercise8/ex8.sql
-- Exercise 8
-- Mostrar el nombre del barrio(s) y la ciudad que tiene una casa nombrada “Las consultas”.
-- Asegúrese de que esta casa exista en sus registros y que existan registros coincidentes
-- en Barrios (Neighborhood)
-- 1 Way
SELECT "Neighborhood".n_name AS "Neighborhood"... |
SELECT COUNT(*)
FROM
tag as t,
site as s,
question as q,
tag_question as tq
WHERE
t.site_id = s.site_id
AND q.site_id = s.site_id
AND tq.site_id = s.site_id
AND tq.question_id = q.id
AND tq.tag_id = t.id
AND (s.site_name in ('stackoverflow'))
AND (t.name in ('apache2','comparison','dataset','ip','mobile-safari','modal-... |
alter table kontaktskjema alter column etternavn drop not null;
alter table kontaktskjema alter column fornavn drop not null; |
<filename>incident_report.sql
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 10-06-2021 a las 17:02:32
-- Versión del servidor: 10.4.18-MariaDB
-- Versión de PHP: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone =... |
<filename>db/schema.sql
DROP DATABASE IF EXISTS business_db;
CREATE DATABASE business_db;
USE business_db;
DROP TABLE IF EXISTS department_table;
CREATE TABLE department_table (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(30) NOT NULL
);
DROP TABLE IF EXISTS role_table;
CREATE TABLE role_table (
i... |
-- Recovery mode for DBs
SELECT
name AS [Database Name]
, recovery_model_desc AS [Recovery Model]
FROM sys.databases;
GO |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 24, 2020 at 11:46 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
EXEC [procfwkHelpers].[SetDefaultDataFactorys]; |
<reponame>trebortc/econ_codeigniter
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 20-11-2018 a las 21:42:36
-- Versión del servidor: 10.1.35-MariaDB
-- Versión de PHP: 7.1.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TR... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS `heroes` (
`char_id` decimal(11,0) NOT NULL default '0',
`class_id` decimal(3,0) NOT NULL default '0',
`count` decimal(3,0) NOT NULL default '0',
`played` decimal(1,0) NOT NULL default '0',
`active` tinyint NOT NULL default 0,
`message` varchar(300) NOT NULL default ''... |
Begin transaction
BEGIN TRY
ALTER TABLE SnDiscussionMessage ADD
[AdminAttentionReason] nvarchar(300) NULL
COMMIT TRANSACTION
END TRY
BEGIN CATCH
SELECT
ERROR_NUMBER() AS ErrorNumber,
ERROR_SEVERITY() AS ErrorSeverity,
ERROR_STATE() AS ErrorState,
ERROR_PROCEDURE() AS Er... |
<reponame>Triast/PublicUtilitiesRentManager
CREATE TABLE [dbo].[RoomTypes]
(
[Id] NVARCHAR(128) NOT NULL,
[Name] NVARCHAR(50) NOT NULL,
CONSTRAINT [PK_RoomTypes] PRIMARY KEY CLUSTERED ([Id] ASC)
)
|
<filename>test_data/type_mappings_case.sql
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `type_mappings_case` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`views` mediumint(8) unsigned NOT NULL,
`cluster` bigint(20) DEFAULT NULL,
`uu... |
<reponame>FelipeRamosOliveira/Portfolio
SELECT * FROM tbcliente;
# SELEÇÕES NUMÉRICAS
SELECT * FROM tbcliente WHERE IDADE = 22; #igual
SELECT * FROM tbcliente WHERE IDADE > 22; #maior
SELECT * FROM tbcliente WHERE IDADE < 22; #menor
SELECT * FROM tbcliente WHERE IDADE <= 22; #menor igual
SELECT * FROM tbcliente WHERE... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 03, 2020 at 06:18 PM
-- Server version: 5.6.12-log
-- PHP Version: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... |
-- file:arrays.sql ln:396 expect:true
insert into arr_pk_tbl values (1, '{3,4,5}') on conflict (pk)
do update set f1[1] = excluded.f1[1], f1[3] = excluded.f1[3]
returning pk, f1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.