sql stringlengths 6 1.05M |
|---|
/*
Navicat Premium Data Transfer
Source Server : test
Source Server Type : MySQL
Source Server Version : 50735
Source Host : localhost:3306
Source Schema : jrjx_base
Target Server Type : MySQL
Target Server Version : 50735
File Encoding : 65001
Date: 06/09/2021 11:01... |
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', 'public', false);
SET check_function_bodies = false;
SET xmloption = content;
SET default_tablespace = '';
CREATE... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- 主机: localhost
-- 生成日期: 2020-12-18 13:51:20
-- 服务器版本: 5.7.26
-- PHP 版本: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
-- 系统用户表
CREATE TABLE `sys_user` (
`id` VARCHAR ( 40 ) NOT NULL COMMENT 'ID',
`mobile` VARCHAR ( 40 ) NOT NULL COMMENT '手机号码',
`username` VARCHAR ( 255 ) NOT NULL COMMENT '用户名称',
`password` VARCHAR ( 255 ) DEFAULT NULL COMMENT '密码',
`avatar` VARCHAR ( 255 ) DEFAULT NULL COMMENT '头像',
`enable_state` INT ( 2 ) DEFA... |
<reponame>brucelawson/almanac.httparchive.org
#standardSQL
# 10_15a: % of websites classified as fast/avg/slow
SELECT
ROUND(COUNTIF(fast_fcp >= .9 AND fast_fid >= .95) * 100 / COUNT(0), 2) AS pct_fast,
ROUND(COUNTIF(NOT(slow_fcp >= .1 OR slow_fid >= 0.05) AND NOT(fast_fcp >= .9 AND fast_fid >= .95)) * 100 / COUNT(0... |
ALTER TABLE student RENAME COLUMN nickname to name; |
{%- if target.type == 'bigquery' -%}
{{ config(project=var('alternate_db')) }}
{%- else -%}
{{ config(database=var('alternate_db')) }}
{%- endif -%}
select * from {{ ref('seed') }}
|
<reponame>zachvalenta/pgFormatter<filename>pg-test-files/expected/money.sql
--
-- MONEY
--
CREATE TABLE money_data (
m money
);
INSERT INTO money_data
VALUES ('123');
SELECT
*
FROM
money_data;
SELECT
m + '123'
FROM
money_data;
SELECT
m + '123.45'
FROM
money_data;
SELECT
m - '12... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 03, 2014 at 01:24 AM
-- Server version: 5.5.38-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
DROP INDEX "geonames_alternate_geoname_id";
DROP INDEX "geonames_alternate_variant"; |
autocommit off;
create class xxx (abc int);
create class yyy as subclass of xxx;
create class zzz (s9 string, x9 xxx);
insert into zzz values ('x', insert into xxx values (10));
insert into zzz values ('y', insert into yyy values (20));
select zzz.x9{xxx}.abc from zzz,xxx order by 1;
select zzz.x9{yyy}.abc from zzz,... |
-- @testpoint:opengauss关键字routine_name(非保留),作为外部数据源名
--关键字不带引号-成功
drop data source if exists routine_name;
create data source routine_name;
drop data source routine_name;
--关键字带双引号-成功
drop data source if exists "routine_name";
create data source "routine_name";
drop data source "routine_name";
--关键字带单引号-合理报错
drop d... |
<filename>conf/evolutions/default/76.sql
# --- !Ups
alter table client_case_note add column appointment_id uuid;
alter table client_case_note add constraint fk_case_note_appointment foreign key (appointment_id) references appointment (id) on delete restrict;
create index idx_case_note_appointment on client_case_note (a... |
DROP DATABASE IF EXISTS great_BayDB;
CREATE DATABASE great_BayDB;
USE great_BayDB;
CREATE TABLE auction (
id INT NOT NULL AUTO_INCREMENT,
listing VARCHAR(45) NULL,
bid DECIMAL(10, 2) NULL,
PRIMARY KEY (id)
);
|
<gh_stars>0
--1.List all superheroes in Earth
--In the format
--Id Name
--1 Iron man
--2 The Hulk
--3 Thor
SELECT s.Id AS Id,s.name AS Name from Superheroes s,Planets p,PlanetSuperheroes ps
WHERE s.id =ps.Superhero_Id AND p.id = ps.Planet_Id and p.name = 'Earth'
--2.List all superheroes with their powers and powe... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 16, 2022 at 03:01 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
REM INSERTING into SYS.APPLY$_CONF_HDLR_COLUMNS
SET DEFINE OFF;
|
CREATE SCHEMA [tck]
|
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 19, 2022 at 05:27 AM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<reponame>jd-foster/Dieter.jl<filename>test/testdata/DTR_regions_test_data/base/arcs.sql<gh_stars>0
-- This query creates arcs between all nodes by default:
-- CREATE VIEW Arcs_Def AS
-- SELECT FromNodes, ToNodes, 1 as IncludeFlag
-- FROM
-- (SELECT RegionID as FromNodes, RegionType as FromType
-- FROM Regions
-- WHERE... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : lun. 13 déc. 2021 à 15:34
-- Version du serveur : 10.3.31-MariaDB-0+deb10u1
-- Version de PHP : 8.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... |
<gh_stars>0
CREATE TABLE moneda (
id VARCHAR(4) PRIMARY KEY
);
INSERT INTO moneda(id) VALUES
('MXN'), ('BRL'), ('CLP'), ('USD');
CREATE TABLE tipo_cambio (
id SERIAL PRIMARY KEY,
moneda_origen VARCHAR(4),
moneda_destino VARCHAR(4),
valor NUMERIC
CONSTRAINT postivie_ex_rates
CHEC... |
<reponame>SkillsFundingAgency/das-poc-matching
CREATE NONCLUSTERED INDEX [IX_LocalEnterprisePartnershipDistricts_AdminDistrictCode]
ON [dbo].[LocalEnterprisePartnershipDistricts] ([AdminDistrictCode])
|
<filename>function/ti/getdatasetsampledepagents.sql
CREATE OR REPLACE FUNCTION ti.getdatasetsampledepagents(_datasetid integer)
RETURNS TABLE(sampleid integer, depagent character varying)
LANGUAGE sql
AS $function$
SELECT ndb.samples.sampleid, ndb.depagenttypes.depagent
FROM ndb.depagents INNER JOIN
ndb.samples ... |
<gh_stars>10-100
--
-- CzechIdM 7.7 Flyway script
-- BCV solutions s.r.o.
--
-- add index on name in idm_notification_template table
CREATE INDEX idx_idm_n_template_name
ON idm_notification_template
USING btree
(name);
|
begin;
create table pbp.matchups (
game_id text,
start_time interval,
end_time interval,
elapsed_time interval,
elapsed_secs integer,
home_player1_id integer,
home_player2_id integer,
home_player3_id integer,
home_player4_id in... |
<reponame>PacktPublishing/SQL-Server-on-Linux<filename>Chapter12.sql
/* Chapter 11. Beyond SQL Server
SQL Source code*/
USE AdventureWorks
--Activate query store
ALTER DATABASE AdventureWorks SET QUERY_STORE = ON
--If you want to see more detailed information of what is in the "Query store", run this query
SE... |
INSERT INTO aa_anlassart (id, value) VALUES ('000000', 'Ersteinrichtung');
INSERT INTO aa_anlassart (id, value) VALUES ('010307', 'Eintragung des Flurstückes');
INSERT INTO aa_anlassart (id, value) VALUES ('010308', 'Löschen des Flurstückes');
INSERT INTO aa_anlassart (id, value) VALUES ('010309', 'Veränderung der Geme... |
<gh_stars>10-100
/*
Inserts a new user record.
NOTE: We only add schema here to demonstrate the ability of class QueryFile
to pre-format SQL with static formatting parameters when needs to be.
*/
INSERT INTO ${schema~}.users(name, message, tacos)
VALUES(${name}, ${message}, ${tacos})
RETURNING *
|
-- file:hash_index.sql ln:41 expect:true
SELECT * FROM hash_txt_heap
WHERE hash_txt_heap.random = '111111112222222233333333'::text
|
<filename>AutomaticPlanRegressionCorrection/5_batchrequests_history.sql<gh_stars>1-10
SELECT top 70 counter_name, [retrieval_time],
CASE WHEN LAG(batch_requests_second,1) OVER (ORDER BY [retrieval_time]) IS NULL THEN
batch_requests_second-batch_requests_second
... |
<gh_stars>0
ALTER TABLE db_version CHANGE COLUMN required_11813_01_mangos_mangos_string required_11827_01_mangos_creature_linking_template bit;
DROP TABLE IF EXISTS creature_linking_template;
CREATE TABLE creature_linking_template (
entry INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'creature_template.entry of t... |
CREATE TABLE [dbo].[NodeType] (
[NodeTypeID] INT NOT NULL,
[Name] VARCHAR (100) NOT NULL,
CONSTRAINT [PK_NodeType] PRIMARY KEY CLUSTERED ([NodeTypeID] ASC)
);
|
CREATE TABLE "CTATTRIBUTE_TYPE"
( "ATTRIBUTE_TYPE" VARCHAR2(60 CHAR) NOT NULL ENABLE,
"COLLECTION_CDE" VARCHAR2(10) NOT NULL ENABLE,
"DESCRIPTION" VARCHAR2(4000 CHAR),
CONSTRAINT "PK_CTATTRIBUTE_TYPE" PRIMARY KEY ("ATTRIBUTE_TYPE", "COLLECTION_CDE")
USING INDEX ENABLE
) |
/********************************************************************************
component-centric-delta-mrcm-attribute-range-referencedcomponentId-exist-in-attribute-domain-refset-referencedcomponentid
Assertion:
ReferencedComponentId in MRCM ATTRIBUTE RANGE DELTA exists in the ReferencedComponentId values of M... |
-- Add interwiki and fragment columns to redirect table
ALTER TABLE /*$wgDBprefix*/redirect
ADD rd_interwiki varchar(32) default NULL,
ADD rd_fragment varchar(255) binary default NULL;
|
CREATE TABLE public.t1 (
c1 integer
);
CREATE SEQUENCE public.s1
START WITH 2
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE ONLY public.t1 ALTER COLUMN c1 SET DEFAULT nextval('public.s1'::regclass);
GRANT ALL ON SCHEMA public TO maindb; |
<filename>auth/db/db.sql<gh_stars>1000+
SET NAMES utf8;
DROP DATABASE IF EXISTS sc_auth;
CREATE DATABASE sc_auth DEFAULT CHARSET utf8mb4;
USE sc_auth;
-- access_token存储表
DROP TABLE IF EXISTS oauth_access_token;
CREATE TABLE oauth_access_token
(
token_id VARCHAR(256) COMMENT 'MD5加密的access_token的值',
to... |
<filename>sql/_13_issues/_12_1h/cases/bug_bts_6942.sql
set system parameters 'create_table_reuseoid=no';
--TEST: Accessing deleted object error occurs when trying to update a view.
create table foo(a int);
insert into foo values(3);
create view v as select * from foo where a <2;
update v set a=3;
drop view v;
create... |
<gh_stars>0
WITH RECURSIVE cte(n) AS (
SELECT 1
UNION
SELECT *
FROM (
WITH nested AS (
SELECT n + 1
FROM cte
WHERE n < 10
)
SELECT *
FROM nested
) t
)
SELECT *
FROM cte
ORDER BY n DESC
|
INSERT INTO `month` (`name`, `is_active`, `is_closed`, `from_date`, `to_date`, `year_id`, `sortable_rank`) VALUES
('I', 0, 1, '2016-01-01', '2016-01-31', 1, 1),
('II', 0, 1, '2016-02-01', '2016-02-29', 1, 2),
('III', 0, 1, '2016-03-01', '2016-03-31', 1, 3),
('IV', 0, 1, '2016-04-01', '2016-04-30', 1, 4),
('V'... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 04, 2019 at 10:02 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>prasertcbs/sql_server
select getdate() -- GETDATE() วันและเวลาปัจจุบัน
select CONVERT(date, getdate()) -- เอาเฉพาะส่วนของวันที่
select CONVERT(time, getdate()) -- เอาเฉพาะส่วนที่เป็นเวลา
select getdate(),
year(getdate()) as year,
month(getdate()) as month,
day(getdate()) as date
-- int ... |
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 22, 2018 at 08:25 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
--DROP TABLE Applications
ALTER TABLE LatestTestResults
ADD SuiteName NVARCHAR(MAX) NOT NULL
CONSTRAINT DF_LatestTestResultsDefaultSuiteName DEFAULT ''
ALTER TABLE LatestTestResults
DROP CONSTRAINT DF_LatestTestResultsDefaultSuiteName
SELECT * FROM LatestTestResults |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 20, 2016 at 02:50 PM
-- Server version: 10.1.10-MariaDB
-- PHP Version: 7.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
<gh_stars>0
-- Doctrine Migration File Generated on 2017-11-04 19:32:45
-- Version 20171031202734
ALTER TABLE transferfahrten CHANGE fahrzeuge_id fahrzeuge_id INT NOT NULL;
INSERT INTO migration_versions (version) VALUES ('20171031202734');
-- Version 20171104192245
ALTER TABLE transferfahrten CHANGE created_at creat... |
<reponame>kodema5/iot.sql<filename>web/load.sql
---------------------------------------------------------------------------
-- manually loads raw-data to data
-- url: /api/iot/load
-- input
-- {
-- min_ts: from # seconds ago
-- max_ts: to # seconds ago
-- }
-- output:
-- {
-- "device_type": { n, n_... |
<reponame>Loncor/alchemic-wealth<filename>source/database/tst/ut_task.pks<gh_stars>0
create or replace package ut_task as
-- %suite(Task Package Suite)
--%beforeall
--%rollback(manual)
procedure beforeall;
-- %test(Test log_issue)
procedure log_issue;
-- %test(Test each non-abort severity)
procedure ... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 30, 2021 at 12:29 PM
-- Server version: 10.4.16-MariaDB
-- PHP Version: 7.4.12
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.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 19 Mar 2020 pada 20.14
-- Versi server: 10.1.32-MariaDB
-- Versi PHP: 5.6.36
SET SQL_MODE = "";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@... |
<filename>resources/migrations/20170819223313-user-create-date.up.sql
ALTER TABLE users ADD COLUMN created TIMESTAMPTZ DEFAULT now(); |
<gh_stars>1-10
CREATE TABLE Users (
Id INT PRIMARY KEY AUTO_INCREMENT,
Username VARCHAR(64) NOT NULL UNIQUE,
BcryptPassword CHAR(60) NOT NULL
);
CREATE TABLE Links (
UserId INT NOT NULL,
Link VARCHAR(512) NOT NULL,
Shortened CHAR(7) PRIMARY KEY,
Clicks INT NOT N... |
CREATE TABLE `proto_qp`.`qp` ( `code_quartier` VARCHAR(200) NOT NULL , `departement` INT(255) NOT NULL , `nom_dept` VARCHAR(3000) NOT NULL , `quartier_prioritaire` VARCHAR(3000) NOT NULL , `noms_des_communes_concernees` VARCHAR(1000) NOT NULL , `nom_epci` VARCHAR(1000) NOT NULL , `nom_reg` VARCHAR(1000) NOT NULL , `geo... |
<gh_stars>1-10
if object_id('empleados') is not null
drop table empleados;
create table empleados(
nombre varchar(20),
documento char(8),
fechaingreso datetime
);
-- Seteamos el formato de la fecha para que guarde día, mes y año:
set dateformat dmy;
insert into empleados values('<NAME>','22222222','12-01-198... |
<filename>app/server/createStoredProc.sql<gh_stars>10-100
DROP PROCEDURE queryApproval;
DELIMITER //
CREATE PROCEDURE `queryApproval`(IN id int )
BEGIN
SELECT DisplayName, Markup.*
FROM Markup
INNER JOIN Users ON Markup.UserID=Users.UserID where ApprovalID = id;
END //
DELIMITER ;
CALL queryApproval(1); |
INSERT INTO OFFENDER_EMPLOYMENTS (OFFENDER_BOOK_ID,EMPLOY_SEQ,TERMINATION_REASON_TEXT,COMMENT_TEXT)
VALUES (-1,1,'Some Termination Reason Text','Some Comment Text');
INSERT INTO OFFENDER_EMPLOYMENTS (OFFENDER_BOOK_ID, EMPLOY_SEQ, EMPLOYMENT_DATE, EMPLOYMENT_POST_CODE, EMPLOYMENT_TYPE, TERMINATION_DATE, EMPLOYER_NAME, ... |
<reponame>jdkoren/sqlite-parser<gh_stars>100-1000
-- vacuum3.test
--
-- execsql {
-- PRAGMA auto_vacuum=OFF;
-- PRAGMA page_size = 1024;
-- CREATE TABLE t1(a, b, c);
-- INSERT INTO t1 VALUES(1, 2, 3);
-- }
PRAGMA auto_vacuum=OFF;
PRAGMA page_size = 1024;
CREATE TABLE t1(a, b, c);
INSERT INTO t1 VALUES(... |
<reponame>gianadda/ZenPRM
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'SystemType')
AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
DROP TABLE SystemType
GO
CREATE TABLE SystemType (
Ident BIGINT IDENTITY(1,1) NOT NULL ,
Name1 NVARCHAR(150) NULL ,
AddASUserIdent BIGINT NULL ,
AddDateTime SMALLDATET... |
GRANT USAGE ON SCHEMA public TO solarauthn;
GRANT USAGE ON SCHEMA solaruser TO solarauthn;
GRANT SELECT(auth_token, user_id, status, token_type, jpolicy) ON solaruser.user_auth_token TO solarauthn;
GRANT SELECT(user_id, node_id, archived) ON solaruser.user_node TO solarauthn;
GRANT SELECT ON TABLE solaruser.user_auth_... |
--
-- Copyright (C) 2010-2012 the original author or authors.
--
-- 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>AbstractBits/sql-edu-crm
drop function if exists new_user;
create or replace function new_user (
p_user_id int,
p_username varchar,
p_password varchar,
p_firstname varchar,
p_lastname varchar,
p_gender gender,
p_birthday date,
p_state_id int
) returns table (
user_id int,
user_username character var... |
<filename>atc/db/migration/migrations/1579713186_add_version_md5_to_next_build_inputs.down.sql
BEGIN;
TRUNCATE TABLE next_build_inputs;
ALTER TABLE next_build_inputs
ADD COLUMN resource_config_version_id integer NOT NULL REFERENCES resource_config_versions (id) ON DELETE CASCADE,
ADD COLUMN id integer NOT ... |
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for db_heartbeat_monitor
-- ----------------------------
DROP TABLE IF EXISTS `db_heartbeat_monitor`;
CREATE TABLE `db_heartbeat_monitor` (
`ID` bigint(19) NOT NULL AUTO_INCREMENT COMMENT '心跳表主键',
`DS_NAME` varchar(64) NOT NULL CO... |
ALTER PROCEDURE [dbo].[RegularProcedure]
(
@name varchar(255)
)
AS
BEGIN
SELECT @name
END
GO
EXEC sp_updateextendedproperty
@name = N'MS_Description', @value = 'changed procedure description',
@level0type = N'SCHEMA', @level0name = N'dbo',
@level1type = N'PROCEDURE', @level1name = N'RegularProcedure',
@leve... |
/*
2020-09-17 Resource Utilization
Returns Discovery Device and RU info for all non-network devices
- Changed to use the avg and max functions to replace the sum functions
- Only showing devices that have RU data collected for CPU, Disk, Memory and NIC IO
*/
With
target_device_data as (
... |
<reponame>boost-entropy-azure/steampipe-plugin-azure
select id, name, display_name
from azure.azure_policy_definition
where display_name = '{{ output.resource_name.value }}';
|
BEGIN;
REINDEX INDEX cr_ao_reindex_gist_idx1;
COMMIT;
|
<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/storage/aoco_alter/aoco_alter_scenario_test/sql/alter_aoco_tab_utilitymode.sql
\d alter_aoco_tab_utilitymode;
alter table alter_aoco_tab_utilitymode add column add_col1 character varying(35) default 'abc' ;
select count(*) as add_col1 from pg_attribute pa, pg_class pc wh... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50554
Source Host : localhost:3306
Source Database : fab
Target Server Type : MYSQL
Target Server Version : 50554
File Encoding : 65001
Date: 2017-08-21 17:42:55
*/
SET FOREIGN_KEY_CHECKS=0;
-- ------... |
<reponame>mik-sea/todo-notes
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 25, 2020 at 05:22 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.2.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!4010... |
<gh_stars>0
INSERT
INTO
obj_provider(
prv_db,
id_prv,
prv_name,
prv_url,
prs_manager,
prv_type_id,
prv_type,
prs_state_id,
prs_state,
accept_status_id,
accept_status,
shema_id,
... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 06-08-2020 a las 16:07:57
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
<filename>sql/spbex-halts/stop.sql
drop function if exists loop_[%#payload.serviceId%]();
create or replace function loop_[%#payload.serviceId%]()
returns void as
$$
try {
plv8.execute(`select dblink_disconnect('ppp-[%#payload.serviceId%]');`);
} catch (e) {
return;
}
$$ language plv8;
|
<filename>database/r27c27.sql<gh_stars>0
#This populates the r81 and c81 columns in the pitches table
#If you divide the strike zone into 27 rows and 27 columns (and each of the 8 adjacent zones outside of the strike zone), you have 6561 (3^8) zones. r81 tells you which row the pitch was in, r81 tells you which column ... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS tb_users(
user_id SERIAL PRIMARY KEY,
discord_id VARCHAR(50),
aut_score INT,
norm_score INT,
nice_score INT,
toxic_score INT
);
|
/*
MySQL Backup
Source Server Version: 5.5.5
Source Database: jam_olshop
Date: 12/22/2016 19:29:36
*/
-- ----------------------------
-- Table structure for `tabel_kategori`
-- ----------------------------
DROP TABLE IF EXISTS `tabel_kategori`;
CREATE TABLE `tabel_kategori` (
`id_kategori` int(11) NOT NULL AUTO_IN... |
<reponame>lgcarrier/AFW<gh_stars>1-10
SET DEFINE OFF;
CREATE UNIQUE INDEX AFW_01_MESG_TRADC_APEX_PK ON AFW_01_MESG_TRADC_APEX
(SEQNC)
LOGGING
/
|
<filename>net.violet.db-engine/src/test/java/net/violet/db/records/DecoratedAssociationTest_setup.sql
SET FOREIGN_KEY_CHECKS = 0;
delete from `object_has_read_content`;
delete from `object` where object_login like 'DecoratedAssociationTest%';
delete from annu;
delete from `files` where path like '%DecoratedAssociatio... |
<reponame>dragoNOTES/dragoNOTES
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', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client... |
<gh_stars>1-10
SELECT max(datetime) as 시간 from animal_ins; |
<filename>Test_Data_Flow.sql
-- Check initial value
SELECT CustomerId, FirstName, LastName, ModifiedDate FROM DimCustomer WHERE CustomerId = 4
-- Update the record
UPDATE [dbo].[CustomerSource]
SET LastName = 'Lopez'
WHERE [CustomerId] = 4
-- Recheck value
SELECT CustomerId, FirstName, LastName, ModifiedDate FROM Dim... |
-- @version $Id: //product/DAS/version/11.3/templates/DAS/sql/media_ddl.xml#2 $$Change: 1393648 $
-- media content repository tables.
create table media_folder (
folder_id varchar2(40) not null,
version integer not null,
creation_date date null,
description varchar2(254) null,
name varchar2(254) no... |
{% macro Batch_insert_update(b_status,b_id,SourceSystem_Name) %}
{%- if b_status == 'INSERT' -%}
{% set query -%}
Insert into ABC.PUBLIC.ABC_Batch_Details (Batch_ID,Batch_Name,Start_Timestamp,SourceSystem_Name,Batch_Status)
VALUES ('{{b_id}}','JDE',sysdate(),'{{SourceSystem_Na... |
-- 使用`on duplicate key update`避免重复写入测试数据
insert into user (id, nickname, mobile, password, ctime) values (1, '<PASSWORD>', '<PASSWORD>000000', md5('123456'),now()) on duplicate key update nickname = 'zlikun'; |
select
payment_id as unique_field,
count(*) as n_records
from "sqlsampledatastack"."dbo"."stg_payments"
where payment_id is not null
group by payment_id
having count(*) > 1
|
CREATE TABLE B_TABLE (
B_ID BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY,
C_ID BIGINT,
D_ID BIGINT,
TEST_NAME VARCHAR(100),
TEST1 VARCHAR(100),
TEST2 VARCHAR(500),
TEST3 VARCHAR(500)
);
COMMENT ON table B_TABLE is 'B_TABLE';
COMMENT ON column B_TABLE.B_ID is 'B_ID';
COMMENT ON column B_TABLE.C_ID is 'C_ID... |
<filename>projects/OG-MasterDB/install/db/hsqldb/patch_3/upgrade-db.sql<gh_stars>1-10
DROP INDEX IF EXISTS ix_cfg_config_oid;
DROP INDEX IF EXISTS ix_cfg_config_ver_from_instant;
DROP INDEX IF EXISTS ix_cfg_config_ver_to_instant;
DROP INDEX IF EXISTS ix_cfg_config_corr_from_instant;
DROP INDEX IF EXISTS ix_cfg_config_... |
DO
$$
BEGIN
IF NOT EXISTS (SELECT 1 FROM information_schema.columns
WHERE table_schema=current_schema AND table_name = 'encrypted_secret' AND column_name = 'secret_status') THEN
-- add non-null column 'secret_status' with initial value 'EXPIRED'
ALTER TABLE "encrypted_secret" ADD COLUMN secret_status CHARACTER... |
<filename>query/ecs/ecs_unattached_disk_encryption_enabled.sql<gh_stars>1-10
select
-- Required Columns
arn as resource,
case
when encrypted then 'ok'
else 'alarm'
end as status,
case
when encrypted then title || ' encryption enabled.'
else title || ' encryption disabled.'
end as reason,
... |
<reponame>subhamX/train-ticketing<filename>database/triggers.sql
--* TRIGGER 1: create a new table and add seats to this table on addition of a new train into train_instance
create or replace function handle_on_new_train_instance()
returns trigger
language plpgsql
as
$$
declare
train_table_name v... |
PRINT 'Adding Cities'
SET IDENTITY_INSERT dbo.[Cities] ON
INSERT INTO dbo.[Cities] (
[Id]
, [Name]
, [Code]
, [IsDisabled]
) VALUES (1, 'No City Yet', '1', 0),
(2, '100 Mile House', '2', 0),
(3, '150 Mile House', '3', 0),
(4, 'Abbotsford', '4', 0),
(5, 'Agassiz', '5', 0),
(6, 'Ahousaht', '6', 0),
(7, ... |
<reponame>trammell/test
USE test;
DROP TABLE IF EXISTS t1;
CREATE TEMPORARY TABLE t1 (
name text, pw text
);
INSERT INTO t1 VALUES ('jim', PASSWORD('<PASSWORD>') );
INSERT INTO t1 VALUES ('bob', MD5('foo') );
INSERT INTO t1 VALUES ('sally', SHA1('foo') );
SELECT * FROM t1;
SELECT * FROM t1 WHERE pw=PASSWORD('... |
/*
Navicat Premium Data Transfer
Source Server : mariadb
Source Server Type : MariaDB
Source Server Version : 100307
Source Host : localhost:3307
Source Schema : akhdanihr
Target Server Type : MariaDB
Target Server Version : 100307
File Encoding : 65001
... |
/* Replace this file with actual dump of your database */
|
<reponame>mikaelparsekyan/Softuni-Task-Solutions
SELECT town_id, name FROM `towns`
WHERE name NOT LIKE "R%" AND
name NOT LIKE "B%" AND
name NOT LIKE "D%"
ORDER BY name ASC; |
-- Your SQL goes here
ALTER TABLE order_items ALTER COLUMN prep_time SET NOT NULL |
INSERT INTO cidadaos (cpfcnpj, nome, email, telefone1, telefone2, endereco_id)
VALUES ('98765432152', 'Teste', '<EMAIL>', '(99)99999999', NULL, '1'); |
CREATE TABLE IF NOT EXISTS `categories` (
`cat_id` int(11) NOT NULL AUTO_INCREMENT,
`cat_name` varchar(50) NOT NULL,
`cat_url_name` varchar(15) NOT NULL,
PRIMARY KEY (`cat_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
TRUNCATE TABLE categories;
INSERT INTO `categories` VALUES (1,'Shirts','shi... |
-- +migrate Up
ALTER TABLE `groups_attempts`
DROP INDEX `group_item_minus_score_best_answer_date_id`,
DROP COLUMN `minus_score`,
ADD INDEX `group_item_score_desc_best_answer_at` (`group_id`,`item_id`,`score` DESC,`best_answer_at`);
DROP TRIGGER IF EXISTS `before_insert_groups_attempts`;
-- +migrate Stateme... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.