sql stringlengths 6 1.05M |
|---|
<reponame>hannahrogers-google/google-cloud-java
/*
* Copyright 2019 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
*
... |
<gh_stars>10-100
SET search_path = pg_catalog;
ALTER TYPE public.typ_composite
ALTER ATTRIBUTE key TYPE character varying(80) COLLATE pg_catalog."ru_RU",
ALTER ATTRIBUTE val TYPE text COLLATE pg_catalog."en_GB.utf8";
|
ALTER TABLE `lh_departament` ADD `inform_close_all` int(11) NOT NULL, COMMENT='';
ALTER TABLE `lh_departament` ADD `inform_close_all_email` varchar(250) NOT NULL, COMMENT='';
INSERT INTO `lh_chat_config` (`identifier`, `value`, `type`, `explain`, `hidden`) VALUES ('product_show_departament', '0', 0, 'Enable products sh... |
CREATE TABLE [dbo].[BankAccount] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[RoutingNumber] VARCHAR (255) NULL,
[CryptedPrivateAccountNumber] VARCHAR (255) NULL,
[NameOnAccount] VARCHAR (255) NULL,
[BankAccountTypeId] INT ... |
<filename>db/patch8.sql
-- patch to create the database versioning tables
CREATE TABLE `patch_history` ( patch_history_id int primary key auto_increment, patch_number int, date_patched timestamp);
INSERT INTO patch_history SET patch_number = 8;
|
<reponame>opengauss-mirror/Yat
-- @testpoint: 改变表字段的数据类型,不带column
drop table if exists yy;
create table yy(id int);
alter table yy add ( age int,t_name char(20));
ALTER TABLE yy ALTER t_name TYPE varchar(2);
drop table if exists yy; |
SELECT t1.name, count(*)
FROM
site as s,
so_user as u1,
question as q1,
answer as a1,
tag as t1,
tag_question as tq1
WHERE
q1.owner_user_id = u1.id
AND a1.question_id = q1.id
AND a1.owner_user_id = u1.id
AND s.site_id = q1.site_id
AND s.site_id = a1.site_id
AND s.site_id = u1.site_id
AND s.site_id = tq1.site_id
AND s.s... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 08 Mar 2017 pada 15.02
-- Versi Server: 10.1.13-MariaDB
-- PHP Version: 7.0.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... |
<filename>create.sql
use `noker`;
drop table if exists `user_blog_activities`;
drop table if exists `user_friends`;
drop table if exists `bookmarks`;
drop table if exists `blogs`;
drop table if exists `users`;
create table `users` (
`id` varchar(255) primary key,
`name` varchar(255) not null,
`email` varchar(25... |
-- CreateTable
CREATE TABLE "User" (
"id" SERIAL NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
"username" TEXT NOT NULL,
"email" TEXT NOT NULL,
"img" TEXT,
"password" TEXT NOT NULL,
"displayName" TEXT NOT NULL,
"birth" TEXT ... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 16 Jul 2020 pada 05.29
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<filename>deployment/local/init.sql
CREATE ROLE bsmusic_app WITH LOGIN PASSWORD '<PASSWORD>' VALID UNTIL 'infinity' ;
GRANT CONNECT ON DATABASE bsmusic TO bsmusic_app ;
REVOKE CREATE ON schema public FROM public ;
GRANT CREATE ON schema public TO bsmusic_admin ;
ALTER DEFAULT PRIVILEGES IN SCHEMA public
GRANT SEL... |
CREATE TABLE settings(
id BIGSERIAL PRIMARY KEY,
key VARCHAR(255) NOT NULL,
value BYTEA NOT NULL,
salt BYTEA,
version BIGINT NOT NULL DEFAULT 0,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL
);
CREATE UNIQUE INDEX idx_settings_key ON settings(key); |
<gh_stars>100-1000
CREATE TABLE [dbo].[test] (
[Column B] [varchar](100),
)
|
SELECT title, year from movies where title LIKE 'Harry Potter%' ORDER by year; |
<filename>src/SqlSync/SqlBuild/Utility/Rename Column.sql
${Title: Rename column <<Table Name>>.<<Old Column Name>> to <<New Column Name>>}
DECLARE @Table nvarchar(100)
DECLARE @OldColumn nvarchar(100)
DECLARE @NewColumn nvarchar(100)
DECLARE @NewColumnTmp nvarchar(100)
DECLARE @NewColumnTmpQual nvarchar(200)
SET @Tabl... |
-- phpMyAdmin SQL Dump
-- version 4.4.10
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 29, 2015 at 01:20 AM
-- Server version: 5.5.42
-- PHP Version: 5.6.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
-- 2021-10-27T05:34:12.300Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE EXP_FormatLine SET Position=310,Updated=TO_TIMESTAMP('2021-10-27 07:34:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE EXP_FormatLine_ID=549925
;
-- 2021-10-27T09:44:24.327Z
-- I forgot to set the DICTIONARY_ID_COMME... |
ALTER TABLE submission RENAME TO ega_submission;
ALTER TABLE submission_sample_submission_object RENAME TO ega_submission_sample_submission_object;
ALTER TABLE ega_submission_sample_submission_object RENAME COLUMN submission_samples_to_submit_id TO ega_submission_samples_to_submit_id;
ALTER TABLE submission_data_file... |
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1075950694579544065', 'consumptionType', '0', '[0],', '账单类型', '', '/consumptionType', '99', '1', '1', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcod... |
CREATE TABLE [dbo].[LanguageType] (
[LanguageTypeId] INT NOT NULL,
[Code] VARCHAR (50) NOT NULL,
[DisplayText] NVARCHAR (128) NOT NULL,
[DisplayPriority] INT CONSTRAINT [DF_LanguageType_DisplayPriority] DEFAULT ((100)) ... |
<filename>src/sql_scripts/createPatientToBeAdmitted.sql
delimiter //
drop procedure if exists `bahmni_create_patient_to_admit` //
create procedure bahmni_create_patient_to_admit(_firstName varchar(50), _lastName varchar(50), inout _patientIdentifiers text, out _thisPatientIdentifier varchar(50))
begin
/* USAGE
se... |
/*
SQLyog Community v12.4.3 (64 bit)
MySQL - 5.7.19 : Database - translationportal
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS... |
<filename>src/sql/example.sql<gh_stars>1-10
CREATE TABLE `student`(
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`name` varchar(16) NOT NULL DEFAULT "",
`mobile` varchar(16) NOT NULL DEFAULT "",
`status` int unsigned NOT NULL DEFAULT "0",
`attr` text,
`creationTime` datetime,
`updateTime` datetime
)... |
<filename>Eva Version 1/01 - Planilla Quincenal/00 - Sub-Rutinas de Formulaciones/03 - EvoData - agrega_reservas_historial.sql
/* Script Generado por Evolution - Editor de Formulación de Planillas. 16-01-2017 11:52 AM */
begin transaction
delete from [sal].[fac_factores] where [fac_codigo] = 'D4C9E398-0A79-40F8-8123-... |
<reponame>flowacademyhu/joukkue
create table likes(id serial, mood varchar(50), date date, type varchar(500), typeid bigint, userid bigint);
alter table public.likes
add constraint likes_users_id_fk
foreign key(userid)
references users(id);
|
<filename>undergrad/dbscratch/02/create.sql
CREATE EXTENSION if not exists "uuid-ossp";
CREATE EXTENSION if not exists pgcrypto;
DROP TABLE if exists a02_title_to_tag cascade ;
DROP TABLE if exists a02_title cascade ;
DROP TABLE if exists a02_tags cascade ;
CREATE TABLE a02_title (
id uuid DEFAULT uuid_generate... |
CREATE PROCEDURE IF NOT EXISTS SP_UpdateUserAccount(
IN puserid INT,
IN pusername VARCHAR(100),
IN pcomplete_name VARCHAR(100),
IN pusertype VARCHAR(100),
IN pmodifiedby INT,
IN ppassword VARCHAR(100),
IN ppassword_repeat VARCHAR(100),
IN phashed_new_... |
-- Created by Vertabelo (http://vertabelo.com)
-- Last modification date: 2019-10-04 04:03:33.943
-- tables
-- Table: customers
CREATE TABLE customers (
name varchar(30) NOT NULL,
bidnum integer NOT NULL,
numid_ofcustomers integer NOT NULL,
user_numid_ofuser integer NOT NULL,
CONSTRAINT customers_p... |
truncate table tb_catdirecciones;
insert into tb_catdirecciones (nombre, estado) values ("DIRECCIÓN ENLACE ADMINISTRATIVO",1);
insert into tb_catdirecciones (nombre, estado) values ("COMISARÍA GENERAL",1);
insert into tb_catdirecciones (nombre, estado) values ("DIVISIÓN DE PLANEACIÓN Y GESTIÓN ESTRATÉGICA",1);
insert ... |
<reponame>ligana/Ensemble-om-SpringBoot
drop table if exists FM_MARITAL_STATUS;
/*==============================================================*/
/* Table: FM_MARITAL_STATUS */
/*==============================================================*/
create table FM_MARITAL_STATUS
(
... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Май 11 2018 г., 20:40
-- Версия сервера: 5.7.19
-- Версия PHP: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 07, 2019 at 07:52 PM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>luizgribeiro/airbyte<filename>airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql
{{ config(schema="TEST_N... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 20, 2020 at 03:28 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>JeffBarnard/WingtipTicketsSaaS-DbPerTenant
CREATE PROCEDURE [dbo].[sp_DeleteVenue]
@VenueId int = 0
AS
IF @VenueId IS NULL
BEGIN
RAISERROR ('Error. @VenueId must be specified', 11, 1)
RETURN 1
END
DELETE [dbo].[Tickets] WHERE VenueId = @VenueId
DELETE [db... |
<gh_stars>10-100
-- Patch to drop unused etp_user
-- give current table temporary name
ALTER TABLE /*_*/echo_target_page RENAME TO /*_*/temp_echo_target_page;
-- recreate table without etp_user
CREATE TABLE /*_*/echo_target_page (
etp_id int unsigned not null primary key auto_increment,
etp_page int unsigned ... |
-- we don't know how to generate root <with-no-name> (class Root) :(
create table datamodel_datatables
(
TableName varchar(64) not null
primary key,
TableInformation varchar(249),
StatusID INTEGER default 1,
CreatedDate timestamp
);
create index IDX_datamodel_datatables
on datamodel_datatables (TableName, Table... |
<gh_stars>1-10
DROP TABLE IF EXISTS user_events;
DROP TABLE IF EXISTS event_template;
create table event_template
(
id bigint generated by default as identity
constraint event_template_pkey
primary key,
name varchar(100) not null,
description varchar(255),
startdatetime timestamp,
... |
DELETE FROM @target_database_schema.@target_cohort_table where cohort_definition_id = @target_cohort_id;
/*Black*/
INSERT INTO @target_database_schema.@target_ref_table (subgroup_cohort_definition_id, subgroup_name)
VALUES(@target_cohort_id, 'Persons with race = Black');
INSERT INTO @target_database_schema.@target_co... |
<reponame>hemin1003/sword-ocean
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for sys_script
-- ----------------------------
DROP TABLE IF EXISTS `sys_script`;
CREATE TABLE `sys_script` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(255) NOT NULL COMMENT '1=SQL,2=存储过程',
... |
<filename>kata-files/lesson2/hsql/expected/MYLARGESCHEMA/sp/SP231.sql
CREATE PROCEDURE SP231(OUT MYCOUNT INTEGER) SPECIFIC SP231_100551 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE19;SELECT COUNT(*)INTO MYCOUNT FROM TABLE148;SELE... |
<filename>tests/queries/0_stateless/00547_named_tuples.sql
SELECT CAST((1, 'Hello') AS Tuple(x UInt64, s String)) AS t, toTypeName(t), t.1, t.2, tupleElement(t, 'x'), tupleElement(t, 's');
|
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: portalsite
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ... |
<filename>openGaussBase/testcase/KEYWORDS/space/Opengauss_Function_Keyword_Space_Case0029.sql
-- @testpoint:opengauss关键字space(非保留),作为表空间名
--关键字不带引号,创建成功
drop tablespace if exists space;
CREATE TABLESPACE space RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
drop tablespace space;
--关键字带双引号,创建成功
drop tablesp... |
<reponame>christophanneser/Bao-for-Presto
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 ('crossfilter','delp... |
CREATE DATABASE IF NOT EXISTS `biblio` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_spanish_ci */;
USE `biblio`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: biblio
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.26-MariaDB
... |
<filename>07. Database Programmability and Transactions/Exercises/08. Delete Employees and Departments/Delete Employees and Departments.sql
CREATE OR ALTER PROCEDURE usp_DeleteEmployeesFromDepartment (@departmentId INT)
AS
--Create collection of employees to be deleted as table of Ids
DECLARE @empIDsToBeDeleted TABLE... |
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 24, 2017 at 11:04
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... |
<reponame>asephendra/crudgen_bootstrap4_ori<gh_stars>0
/*
SQLyog Ultimate v11.11 (32 bit)
MySQL - 5.5.5-10.1.32-MariaDB : Database - crudgen_stock
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECK... |
<filename>core-services/egov-user/src/main/resources/db/migration/seed/V20180104155010__insert_works_role_data.sql
insert into eg_role (id,name,code,description,createddate,createdby,lastmodifiedby,lastmodifieddate,version,tenantid)values
(nextval('SEQ_EG_ROLE'),'Abstract Estimate Creator','AE_CREATOR','Who has a acces... |
<filename>codice/procedure/procedura_calcolo_statistiche_studente.sql
-- Procedura che calcola le statistiche degli esami e della laurea per uno studente la cui matricola viene passata in input
CREATE OR REPLACE PROCEDURE procedura_calcola_statistiche_esami_e_laurea (matricola_studente_input IN studente.matricola_stude... |
<reponame>jamsrandorjb/AlgorithmProblems
/**
* https://www.hackerrank.com/challenges/weather-observation-station-1/problem
* hackerrank profile url: https://www.hackerrank.com/jamsrandorjb?hr_r=1
* solved by jama
*/
SELECT CITY, STATE FROM STATION;
/*
Enter your query here.
Please append a semicolon ";" at the en... |
create table "Messages"
(
"MessageId" uuid not null
constraint "PK_Messages"
primary key,
"Uid" uuid not null,
"Username" text not null,
"Avatar" text,
"Content" text not null,
"Type" text not null,
"CreatedAt" timestamp no... |
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5621340_sys_gh12300_ExclusionFromPurchaseReason_Trl.sql
-- 2022-01-13T10:13:57.145Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Name='<NAME>', PrintName='<NAME>in... |
<gh_stars>0
-- GrossOutlaysDeliveredOrdersPaidTotal (FYB) = USSGL(4902 + 4908 + 4982). This applies to the award level.
SELECT
row_number,
gross_outlays_delivered_or_fyb,
ussgl490800_authority_outl_fyb,
COALESCE(gross_outlays_delivered_or_fyb, 0) - COALESCE(ussgl490800_authority_outl_fyb, 0) AS "differe... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 19, 2017 at 07:20 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S... |
<gh_stars>1-10
CREATE TABLE access_token (
id NUMBER PRIMARY KEY,
token_value VARCHAR2(4000),
expiration TIMESTAMP NULL,
token_type VARCHAR2(256),
refresh_token_id NUMBER(19),
client_id NUMBER(19),
auth_holder_id NUMBER(19),
id_token_id NUMBER(19),
approved_site_id NUMBER(19)
);
CREATE SEQUENCE acce... |
<gh_stars>1-10
CREATE PROCEDURE dbo.TPW_SERVICE_SERVICE_PING
(
@inIs_Primary BIT
)
AS
SET NOCOUNT ON;
/* SQL Server 2008
MERGE INTO dbo.TPW_PUMP_SERVER P
USING
(
SELECT
HOST_NAME() AS SERVER_NAME,
GETDATE() AS SERVICE_BEAT,
@inIs_Primary AS IS_PRIMARY,
SUSER_NAME() AS SERVICE_ACC... |
<reponame>andreylipattsev/almanac.httparchive.org
#standardSQL
CREATE TEMPORARY FUNCTION getSelectorParts(css STRING)
RETURNS STRUCT<
class ARRAY<STRING>,
id ARRAY<STRING>,
attribute ARRAY<STRING>,
pseudo_class ARRAY<STRING>,
pseudo_element ARRAY<STRING>
>
LANGUAGE js
OPTIONS (library = "gs://httparchive/lib/... |
<filename>prisma/migrations/20220325100600_safetychecks_request_insteadof_place/migration.sql<gh_stars>1-10
/*
Warnings:
- You are about to drop the column `place_id` on the `SafetyCheck` table. All the data in the column will be lost.
- Added the required column `request_id` to the `SafetyCheck` table without a... |
<reponame>jonyg80/reimagined-octo-spoon
-- Authenticator login
GRANT web_anon TO authenticator;
-- Web3.Storage user
GRANT web3_storage TO authenticator;
GRANT USAGE ON SCHEMA public TO web3_storage;
-- allow access to all tables/sequences/functions in the public schema currently
GRANT SELECT, INSERT, UPDATE ON ALL TAB... |
<filename>src/test/regress/sql/uao_compaction/full_eof_truncate.sql
-- @Description Tests the behavior while compacting is disabled
CREATE TABLE full_eof_truncate (a INT, b INT, c CHAR(128)) WITH (appendonly=true);
CREATE INDEX full_eof_truncate_index ON full_eof_truncate(b);
BEGIN;
INSERT INTO full_eof_truncate SELEC... |
<filename>forms6i/sql/tablas/SRI_VENTA_ESTABLECIMIENTO.sql<gh_stars>0
--------------------------------------------------------
-- DDL for Table SRI_VENTA_ESTABLECIMIENTO
--------------------------------------------------------
--drop table SRI_VENTA_ESTABLECIMIENTO;
CREATE TABLE "SRI_VENTA_ESTABLECIMIENTO"
( "ID... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 25, 2018 at 05:27 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... |
INSERT INTO public.notification(
createdat, updatedat, id, type, notes, receivers)
VALUES (1578060923000, 1578060923000, '6ea94a9a-2e34-11ea-978f-2e728ce88125', 'mail', '', '<EMAIL>');
INSERT INTO public.notification(
createdat, updatedat, id, type, notes, receivers)
VALUES (1578060923000, 1578060923000, '6ea94dc4... |
<gh_stars>0
\set ON_ERROR_STOP on
\if :{?schema}
SET search_path = :schema;
\endif
-- JetBrains IDEs: start execution from here
SET TIMEZONE = 'US/Eastern';
\set ECHO all
\copy stg_clusters(node_seq_id, cluster_no, min_k, cluster_modularity) FROM pstdin (FORMAT csv)
|
<filename>DATABASE/create-cispaces-tables.sql
-- SQL to generate CISpaces database tables
-- <EMAIL>
-- FixMe - This is insecure and needs to be randomly generated an install
connect 'jdbc:derby://localhost:1527/gaiandb;create=true;user=gaiandb;password=<PASSWORD>';
CREATE TABLE GAIANDB.CISPACES_USERS
(
USER_ID ... |
CREATE procedure [changeOwnership](
@ownership_id int,
@owner_id int,
@first_surrogate_id int,
@second_surrogate_id int,
@responsible_id int,
@description nvarchar(max)
)
as
begin
declare @old_owner_id int, @old_owner_pic_id int,
@old_first_id int, @old_first_incident_id int,
@old... |
-- \set ECHO queries
/* ###################################################################################################### */
\ir './_trm.sql'
-- \ir './set-signal-color.sql'
-- \ir './test-begin.sql'
-- \pset pager on
\timing off
\set filename intershop/100-harfbuzz.sql
\set signal :green
-- ------------------... |
CREATE PROCEDURE [dbo].[dnn_EasyDNNNewsGetItemsPerCategory]
@PortalID int,
@UserID int,
@MenuModuleID int,
@DefaultTabID int,
@DefaultModuleID int,
@CurrentDate DateTime,
@AdminOrSuperUser bit = 0,
@CountItems bit = 0,
@IsSocialInstance bit = 0,
@FilterByDNNUserID int = 0, -- filter by some UserID / not ... |
<reponame>TIBHannover/orkg-backend
--liquibase formatted sql
--changeset mharis:5 dbms:postgresql
create table user_observatories
(
user_id uuid not null
constraint user_id_fk references users,
observatory_id uuid not null
constraint observatories_id_fk refer... |
-- Drop tables
DROP TABLE IF EXISTS agents CASCADE;
DROP TABLE IF EXISTS regions CASCADE;
DROP TABLE IF EXISTS agent_region_junction CASCADE;
-- Create a table of students
CREATE TABLE agents (
agent_id INT PRIMARY KEY,
first_name VARCHAR NOT NULL,
last_name VARCHAR NOT NULL
);
-- Create a table of courses
CREA... |
create table items (
id integer
);
alter table items enable row level security;
create table projects (
id integer
);
alter table projects force row level security;
|
CREATE TABLE [dbo].[table2] (
[table2_id] INT IDENTITY (1000, 1) NOT NULL,
[table1_id] INT NOT NULL,
[data] VARCHAR(1000) NULL,
[modified_date] DATETIME2(7) NOT NULL,
CONSTRAINT [pk_table2] PRIMARY KEY CLUSTERED (table2_id),
CONSTRAINT [CK_table2] CHECK (data IS NOT NULL)
)
GO |
/**********************************************************************************************************
NAME: Search terms results
SYNOPSIS: Comparison between search terms with and without results
DEPENDENCIES: BigQuery Editor role (at least)
AUTHOR: <NAME> - @fserrey (ins... |
<gh_stars>0
-- Table: app_configuration
-- DROP TABLE app_configuration;
CREATE TABLE app_configuration
(
key character varying(255) NOT NULL, -- Indice
value text, -- Valor plano
name_wrapper character varying(200) NOT NULL, -- Nombre del contenedor de la configuracion
description character varying(255),
e... |
select
c.character_set_name
from information_schema.tables as t,
information_schema.collation_character_set_applicability as c
where c.collation_name = t.table_collation
and t.table_schema = "marira"; |
<gh_stars>1000+
-- +migrate Up
CREATE TABLE notification_logs (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
alert_id BIGINT NOT NULL REFERENCES alerts (id) ON DELETE CASCADE,
contact_method_id UUID NOT NULL REFERENCES user_contact_methods (id) ON DELETE CASCADE,
process_timestamp TIMESTAMP WITH TIM... |
SELECT length(buildId()) >= 16;
|
<filename>persistence/sql/migrations/sql/20210311102338000016_form_refactoring.mysql.up.sql
ALTER TABLE `selfservice_recovery_flows` DROP COLUMN `messages`; |
<reponame>villawang/SNAP
fullscreen #f
undecorated #t
win-origin 0 0 # note: use this to move the window to the location where you need it (on your virtual desktop)
win-size 1000 800 # note: set the size of the window here...
cursor-hidden #t |
CREATE TYPE STATUS AS ENUM ('exist', 'deleted');
CREATE TABLE IF NOT EXISTS char_info (
charname VARCHAR(64) NOT NULL PRIMARY KEY,
hidden BOOLEAN NOT NULL DEFAULT FALSE,
tabled BOOLEAN NOT NULL DEFAULT FALSE,
display_uni VARCHAR(8),
display_ids VARCHAR(8),
display_pua VARCHAR(8),
exact_cns ... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 24, 2018 at 05:52 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<reponame>saeschdivara/SecretWhisperer-Desktop-Client<gh_stars>0
CREATE TABLE IF NOT EXISTS contact (
user_name CHAR(255) NOT NULL,
public_key TEXT NOT NULL,
connected_user CHAR(255) NOT NULL
);
|
CREATE TABLE [dbo].[Dim_Categoria]
(
[Cod_Categoria] NVARCHAR(50) NOT NULL PRIMARY KEY,
[Desc_Categoria] NVARCHAR(200) NULL
)
|
-- objetos na recycle bin aparecem aqui: para limpar recycle bin digite PURGE RECYCLEBIN;
select owner, segment_name, blocks, extents, bytes/1024 KBYTES
from dba_segments
where tablespace_name = '&TABLESPACE_NAME';
-- tamanho total de um determinado tablespace
select SUM(bytes)/1024/1024 MBYTES
f... |
<filename>prisma/migrations/20220227140526_added/migration.sql
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_User" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"email" TEXT NOT NULL,
"password" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" D... |
<reponame>jaymegordo/SMSEventLog<gh_stars>1-10
Select FactoryCampaign.FCNumber, IIF(FCSummary.SubjectShort Is Null, FCSummary.Subject, FCSummary.SubjectShort) as 'Subject', Count(FactoryCampaign.FCNumber) as 'FCs Completed'
From UnitID Inner Join (EventLog Right Join (FactoryCampaign Left Join FCSummary on FCSummary.FC... |
<reponame>sudarnoinggris/umkm
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.36-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 10.3.0.5771
-- -----------------... |
CREATE TABLE `Audits` (
`id` varchar(36) NOT NULL,
`note` text,
`status` text,
`timestamp` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE Events
ADD COLUMN audit_id varchar(36);
ALTER TABLE Events
ADD CONSTRAINT fk_audit_id FOREIGN KEY (audit_id) REFERENCES Au... |
#sqlite3 webhooks.db
CREATE TABLE stores (
id INTEGER PRIMARY KEY AUTOINCREMENT,
storeId TEXT,
rate TEXT,
bitcoinJungleUsername TEXT
);
CREATE TABLE invoices (
id INTEGER PRIMARY KEY AUTOINCREMENT,
storeId TEXT,
invoiceId TEXT,
isProcessing BOOLEAN DEFAULT FALSE,
isProcessed BOOLEAN DEFAULT FALSE
);
CREA... |
<gh_stars>1-10
USE RTK;
SET @script = 'scriptsTemplate.sql';
DELIMITER $$
DROP PROCEDURE IF EXISTS sp $$
CREATE PROCEDURE sp(
IN scriptName VARCHAR(255)
)
BEGIN
IF NOT EXISTS (SELECT * FROM MigrationHistory WHERE Script = scriptName) THEN
--
-- Query goes here. Make sure you also set the @script variable on ... |
SET search_path TO nyctrees;
-- Creating view for information specifically about trees
CREATE VIEW trees AS
SELECT ge.genus, sp.species, tree_dbh, he.healthstatus, gu.infguard, sh.infshoes, cr.sidwcrack, ye.year, nf.ntanamefull
FROM facts
JOIN genus ge ON genus_id = ge.id
JOIN species sp ON species_id = sp.id
JOIN he... |
{% macro sqlserver__log_natural(x) %}
log({{ x }})
{%- endmacro -%} |
CREATE FUNCTION [dbo].[RegexMatches] (@input [nvarchar] (max), @pattern [nvarchar] (4000))
RETURNS TABLE (
[Index] [int] NULL,
[Text] [nvarchar] (max) COLLATE Latin1_General_100_CI_AI NULL)
WITH EXECUTE AS CALLER
EXTERNAL NAME [Msdn.SqlRegex].[UserDefinedFunctions].[RegexMatches]
GO
|
<gh_stars>1-10
metadata :name => "sysctl",
:description => "Retrieve values for a given sysctl",
:author => "R.I.Pienaar <<EMAIL>>",
:license => "Apache-2.0",
:version => "3.0.0",
:url => "https://github.com/choria-plugins/sysctl... |
<reponame>calvinaco/chain-indexing
CREATE TABLE projections (
id VARCHAR NOT NULL,
last_handled_event_height BIGINT NOT NULL,
PRIMARY KEY(id)
); |
/*!40101 SET NAMES binary*/;
/*T![placement] SET PLACEMENT_CHECKS = 0*/;
CREATE TABLE `quo``te/table` (`quo``te/col` INT(11) NOT NULL,`a` INT(11) DEFAULT NULL,`gen``id` INT(11) GENERATED ALWAYS AS(`quo``te/col`) VIRTUAL,PRIMARY KEY(`quo``te/col`)) ENGINE = InnoDB DEFAULT CHARACTER SET = LATIN1 DEFAULT COLLATE = LATIN1_... |
-- @testpoint: polygon类型,使用(x1,y1),...,(xn,yn)方式插入较大坐标值
drop table if exists test_polygon04;
create table test_polygon04 (name polygon);
insert into test_polygon04 values (polygon'(99999999999999999999999999999,99999999999999999999999999999999),(99999999999999999999999999999,99999999999999999999999999999999),(99999999... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.