sql stringlengths 6 1.05M |
|---|
<gh_stars>0
DROP view if exists view_penyusutan_108_atl_2019_r2_e2 CASCADE;
create view view_penyusutan_108_atl_2019_r2_e2 as select
nama_skpd,
id_skpd,
nama_lokasi_bidang,
id_lokasi_bidang,
nama_kabupaten,
id_kabupaten,
nama_provinsi,
id_provinsi,
id_mutasi_berkurang,
mutasi_berkurang,
keadaan_barang,
nama_barang,
r... |
<filename>sql/core/src/test/resources/sql-tests/inputs/window.sql
-- Test data.
CREATE OR REPLACE TEMPORARY VIEW testData AS SELECT * FROM VALUES
(null, "a"), (1, "a"), (1, "a"), (2, "a"), (1, "b"), (2, "b"), (3, "b"), (null, null), (3, null)
AS testData(val, cate);
-- RowsBetween
SELECT val, cate, count(val) OVER(PAR... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.13-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 9.4.0.5125
-- ------------------------------------------------... |
<filename>api/Db Scripts/2016.08.31 Add_New_Colunm.sql
ALTER TABLE SubjectLecturers
ADD Owner int NULL, |
CREATE PROCEDURE [dbo].[spVendors_Get]
@Id int
AS
begin
set nocount on;
select [Id], [FirstName], [LastName], [CommissionRate], [PaymentDue]
from dbo.Vendors
where Id = @Id;
end |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 21, 2020 at 05:03 AM
-- Server version: 5.7.29
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 13-Dez-2020 às 00:14
-- Versão do servidor: 10.4.13-MariaDB
-- versão do PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
CREATE TABLE TravelObligations
(
TravelObligationId INTEGER NOT NULL UNIQUE CONSTRAINT PrimaryKeyTravelObligations PRIMARY KEY,
RpioCode TEXT(255) NULL,
BFY TEXT(255) NULL,
AhCode TEXT(255) NULL,
AhName TEXT(255) NULL,
FundCode TEXT(255) NULL,
FundName TEXT(255) NULL,
AccountCode TEXT(255) NULL,
ProgramProject... |
<filename>DB/SQL Intro/10. AllSalesRepresentatives.sql
/*Write a SQL query to find all information about the employees whose job
title is “Sales Representative“*/
USE TelerikAcademy
SELECT *
FROM dbo.Employees
WHERE JobTitle = 'Sales Representative' |
INSERT INTO tournament_player (id, name, team_id, tournament_id, added_by)
SELECT id, name, team_id, tournament_id, added_by FROM
(
SELECT
unnest(cast($1 AS varchar[])) AS id,
unnest(cast($2 AS varchar[])) AS name,
unnest(cast($3 as varchar[])) as team_id,
un... |
SET DEFINE OFF;
CREATE INDEX AFW_13_PREFR_FK3 ON AFW_13_PREFR
(REF_DV_TYPE_INSTA)
LOGGING
/
|
<reponame>seattleflu/id3c-customizations<gh_stars>1-10
-- Revert seattleflu/id3c-customizations:roles/scan-dashboard-exporter/create from pg
begin;
drop role "scan-dashboard-exporter";
commit;
|
{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }}
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
select
cast(ID as {{ dbt_utils.type_string() }}) as ID,
cast(CONFLICT_STREAM_SCALAR as {{ dbt_utils.type_bigint() }}) as CONFLICT_STRE... |
<reponame>raphaelrpl/bdc-collectors
INSERT INTO bdc.providers (name, description, uri, credentials)
VALUES ('ONDA', 'ONDA DIAS provides free and open access to geospatial data and information, including full availability of Copernicus data.',
'https://catalogue.onda-dias.eu/catalogue/',
'... |
-- file:rangefuncs.sql ln:531 expect:true
insert into users values ('id',1,'email',true,11,true)
|
UPDATE creature_template SET ScriptName='boss_heigan' WHERE entry=15936;
|
<filename>table.sql
--
-- Table structure for table `comments`
--
CREATE TABLE `comments` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(128) collate utf8_unicode_ci NOT NULL default '',
`url` varchar(255) collate utf8_unicode_ci NOT NULL default '',
`email` varchar(255) collate utf8_unicode_c... |
<filename>data.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 11.5
-- Dumped by pg_dump version 11.5
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.se... |
<filename>libs/sdc_etl_libs/sql/DBT_Role/Raw_Database/Create_Stripe_views.sql<gh_stars>0
-- UPDATE PLAN
-- 6 TABLES ARE BEING USED BY DBT
-- 4 NO_PII TABLES - CREATE THE INDIVIDUAL READ ROLES FOR THESE
-- 2 PII TABLE-- 2 VIEWS NEEDED
-- ADD THE read ROLES TO THE NO_PII GROUP ROLE
-- ADD THE NO_PII GROUP ROLE TO BOTH D... |
-- скрипт для запуска из командной строки
create DATABASE items_storage;
\c items_storage
CREATE TABLE Roles (
id serial PRIMARY KEY,
title varchar (255) NOT NULL
);
CREATE TABLE Rules (
id serial PRIMARY KEY,
type varchar (255) NOT NULL
);
CREATE TABLE RoleRules (
id serial PRIMARY KEY,
role_id integer REFERENC... |
ALTER TABLE message DROP COLUMN read_at;
|
<filename>coreservices/membershipcompany/Resources/ddl/create-tables.sql
CREATE TABLE IF NOT EXISTS business_partners (
bpn VARCHAR(200) PRIMARY KEY,
parent VARCHAR(200),
accountGroup VARCHAR(200),
name1 VARCHAR(200) NOT NULL,
name2 VARCHAR(200),
name3 VARCHAR(200),
name4 VARCHAR(200),
a... |
<gh_stars>100-1000
DROP TABLE IF EXISTS `adhoc_run_configurations`;
CREATE TABLE `adhoc_run_configurations`
(
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`config_name` VARCHAR(255) NOT NULL,
`workspace_type` VARCHAR(255) DEFAULT NULL,
`page_timeout` ... |
<gh_stars>1-10
-- This can't quite use Diesel's query builder yet, because diesel doesn't
-- support custom ON clauses yet. We need the attnum comparison in the join
-- to make sure that we get NULL if no constraint is present
SELECT relname, conname, pg_get_constraintdef(pg_constraint.oid, true)
FROM pg_attribute
... |
ALTER TABLE `socks_event` ADD INDEX ( `event_type` , `hour` , `day` , `month` , `year` ) ; |
ALTER TABLE characters DROP intro_sent;
|
<filename>database/postgresql/src/main/resources/com/intel/mtwilson/database/postgresql/20140612163000_mtwilson20_tls_policy.sql
ALTER TABLE mw_hosts ALTER COLUMN TlsPolicy DROP NOT NULL;
ALTER TABLE mw_hosts ALTER COLUMN TlsPolicy SET DEFAULT NULL;
ALTER TABLE mw_hosts ADD COLUMN tls_policy_id char(36);
CREATE TABLE... |
<reponame>ideacodex/webTecunApp
INSERT INTO `countries` (`id`, `name`, `url_image`, `created_at`) VALUES ('1', 'Guatemala', 'http://aux.iconspalace.com/uploads/1857486532.png', '2019-09-05 00:21:37');
INSERT INTO `states` (`id`, `name`, `url_image`, `country_id`) VALUES ('1', 'Alta Verapaz', 'http://aux.iconspalace.co... |
<filename>insert into.sql
USE challenge;
INSERT INTO customer_type(ID_customer_type,customer_type)
VALUES (1,'cecommerce');
INSERT INTO subcategory(ID_subcategory,descripcion)
VALUES (1,'cha');
INSERT INTO category(ID_category, descripcion,ID_subcategory)
VALUES (1,'cha2',1);
INSERT INTO orders(ID_order,fecha_order... |
<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 ('wordpress'))
AND (t.name in ('categories','custom-po... |
<filename>beautytalk.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 21, 2018 at 05:12 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_... |
DROP PROCEDURE IF EXISTS GetWhiteBallCounts;
DELIMITER $$
CREATE PROCEDURE GetWhiteBallCounts()
BEGIN
SELECT Number, COUNT(Number) as Count
FROM PowerballDrawingInfo
WHERE NumberType = 1
GROUP BY Number
ORDER BY Count DESC;
END$$
DELIMITER ;
|
<gh_stars>0
/*------------------------------------------------------------------------------------
Project/Ticket#: GRS
<Description> Create GRS tables - GRS_Attribute, GRS_Entity_Attribute and GRS_Sport_Attribute </Description>
<Version> 1.0.0 </version>
-------------... |
#!/bin/bash
echo "This shows recent order numbers, customer info, and product info"
echo "Use this information to create your order using the script called placerorder.sql"
dbname="ajarrett3"
psql $dbname $username << EOF
select * from recentorders_vew;
select * from customers_vew;
select * from products_vew;
E... |
<filename>skripte/db_schema_definition_pub/migriert/avt_oeffentlicher_verkehr_pub-migriert210331/v1/postscript.sql
COMMENT ON SCHEMA
avt_oeffentlicher_verkehr_pub
IS
'Oeffentllicher Verkehr Kt. Solothurn: Haltestellen und Streckennetz. Fragen: <EMAIL>'
;
GRANT USAGE ON SCHEMA avt_oeffentlicher_verkehr_pub TO pub... |
<gh_stars>0
INSERT INTO scoreboard_car(`name`, `category`) VALUES \
('Adeon', 'semi-pro'), \
('AMW', 'pro'), \
('Aquasonic', 'amateur'), \
('<NAME>', 'advanced'), \
('BigVolt', 'rookie'), \
('BossVolt', 'advanced'), \
('<NAME>', 'amateur'), \
('Clockwork', 'pro'), \
('Clockwork Too', 'pro'), \
('Clockwork Tree', 'pro')... |
INSERT INTO drinks (drink_name, pick_up) VALUES ('Vodka Stinger', false);
INSERT INTO drinks (drink_name, pick_up) VALUES ('Cape Cod', false);
INSERT INTO drinks (drink_name, pick_up) VALUES ('Tequila Sunrise', false); |
<filename>migrations/2021-07-25-140540_add_some_boards/up.sql<gh_stars>1-10
INSERT INTO boards (display_name, name) VALUES ('자유게시판', 'freeboard');
INSERT INTO boards (display_name, name) VALUES ('익명게시판', 'anon');
INSERT INTO boards (display_name, name) VALUES ('조합게시판', 'coop');
INSERT INTO boards (display_name, name) V... |
<filename>packages/Others/GameOfTransferAccount/sqlcontent.sql
SELECT DISTINCT ACCOUNTID, TOACCOUNTID
FROM CHECKINGACCOUNT_V1
WHERE TRANSCODE = 'Transfer';
|
-- +migrate Up
create table product (
id bigint not null primary key,
body_html text,
title varchar(255),
handle varchar(255) not null,
product_type varchar(255),
vendor varchar(255),
created_at datetime,
updated_at datetime,
published_at datetime,
published_scope varchar(50) not... |
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `oyo_cases`;
CREATE TABLE `oyo_cases` (
`id` int(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`title` varchar(16) NOT NULL DEFAULT '' COMMENT '标题',
`customer` varchar(20) NOT NULL DEFAULT '' COMMENT '植入品牌',
`product` varchar(20) NOT NULL DEFAULT '' COMMENT ... |
<reponame>af-silva/VVEAM
-- Copyright (c) 2002, 2008, Oracle. All rights reserved.
-- Create the common tables
DECLARE n NUMBER;
BEGIN
SELECT count(*) INTO n FROM tab WHERE tname='ORA_ASPNET_APPLICATIONS';
IF n <= 0 THEN
EXECUTE IMMEDIATE
'CREATE TABLE ora_aspnet_Applications
(
ApplicationName ... |
create function TableValuedFunctionWithUnusedParameter(@UnusedParameter int) -- @UnusedParameter is unused. This should be flagged as a problem
returns @X table ( a int )
as
begin
insert into @x values(1)
return
end |
CREATE INDEX usgs_nat_struct_name_idx ON usgs_nat_struct USING gin (name gin_trgm_ops);
CREATE INDEX usgs_nat_struct_the_geom_idx ON usgs_nat_struct USING gist (the_geom);
--Add UUID
ALTER TABLE usgs_nat_struct add column uid uuid DEFAULT uuid_generate_v4();
CREATE INDEX usgs_nat_struct_uid_idx ON usgs_nat_struct US... |
SELECT extractURLParameter('?_', '\0_________________________________');
SELECT extractURLParameter('?abc=def', 'abc\0def');
SELECT extractURLParameter('?abc\0def=Hello', 'abc\0def');
SELECT extractURLParameter('?_', '\0');
SELECT extractURLParameter('ZiqSZeh?', '\0');
SELECT 'Xx|sfF', match('', '\0'), [], ( SELECT cut... |
alter table "room"."RoomChimeMeeting" add column "chimeMeetingData" jsonb
not null;
|
category
id increments
title string
description
isactive boolean
isdelete boolean
product
id increments
title string
description
price integer
weight integer unsigned
productpictures
productid integer
caption string
filepath string
order integer
inquiry
productid integer
name string
phone string
email string
desc... |
/* PowerShell Command */
$sizeThreshold_In_MB = 5;
$pingResultPath = $PSScriptRoot;
$pingResultFile = "$pingResultPath\pingResult";
$names = @('MyDbServer01');
# Delete files older than 15 days
$limit = (Get-Date).AddDays(-15);
Get-ChildItem -Path $pingResultPath -Recurse -Force | Where-Object {$_.Name -like 'pingResu... |
<filename>src/scripts/SoftRestore.sql
-- =================================================
-- Soft restore
-- Performs a database restore given the provided restore file and explicit metadata.
-- =================================================
-- [MyDatabase] The name of the database.
-- @BakPath The absolute path to... |
-- phpMyAdmin SQL Dump
-- version 4.0.10.15
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 21, 2017 at 05:26 PM
-- Server version: 5.1.73-log
-- PHP Version: 5.5.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
<filename>database/src/code/packageservicedeleted.sql
--
-- TABLE: PackageServiceDeleted
--
--
CREATE TABLE PackageServiceDeleted (
packageId bigint NOT NULL ,
serviceId bigint NOT NULL ,
source character varying (1792) NOT NULL ,
deliveryMethod character varying (20) NOT NULL ,
deletedOn timestamp with ... |
--Oracle
SELECT CAST('2009-12-14' AS DATE) AS date_col FROM DUAL; |
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 16, 2019 at 11:49 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
SELECT title FROM movies INNER JOIN ratings ON movies.id=ratings.movie_id WHERE movies.id IN (SELECT movie_id FROM ratings WHERE movie_id in (SELECT movie_id FROM stars WHERE person_id = (SELECT id FROM people WHERE name = "<NAME>"))) ORDER BY ratings.rating DESC LIMIT 5; |
<filename>bd/db_gestcourrier.sql
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Lun 16 Juillet 2018 à 17:09
-- Version du serveur : 5.7.9
-- Version de PHP : 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
USE SoftUni
--01. Employee Address
SELECT TOP (5) e.EmployeeID,
e.JobTitle,
e.AddressID,
a.AddressText
FROM Employees AS e
INNER JOIN Addresses AS a
ON e.AddressID = a.AddressID
ORDER BY e.AddressID ASC
--02. Addresses with Towns
SELECT TOP (50) e.FirstName,
e.LastName,
t... |
-- file:insert.sql ln:325 expect:true
insert into mcrparted values (9, 1000, 1)
|
CREATE OR REPLACE PACKAGE "ODMRSYS"."ODMR_ENGINE_OUTPUT_SEC"
AS
PROCEDURE delete(p_workflowId IN NUMBER, p_nodeId IN VARCHAR2, p_db_objects IN OUT NOCOPY ODMR_INTERNAL_UTIL.DB_OBJECTS);
END ODMR_ENGINE_OUTPUT_SEC;
/
|
<reponame>Happy-sc/Doris-api<gh_stars>0
/*
* 下面的SQL完成下面的操作:
* 1) 新建数据库
* 2) 新建用户,并把新建的数据库的所有权限赋给该用户
*
* 要用MySQL的root用户来执行这些操作。
*/
CREATE DATABASE doris_config CHARACTER SET UTF8;
GRANT ALL PRIVILEGES ON doris_config.* TO doris@"%" identified by "doris"; |
-- permissions on MAIN database
grant all on UserTypes to desinventar;
grant all on DbTypes to desinventar;
grant all on country to desinventar;
grant all on users to desinventar;
grant all on user_permissions to desinventar;
-- permissions on COUNTRY database
grant all on database mozambique to desinventar;
gran... |
create table user_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence';
insert into user_seq(id, next_id, cache) values(0, 1, 3);
create table music_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence';
insert into music_seq(id, next_id, cache) values(0, 1... |
<reponame>MCZbase/DDL
CREATE OR REPLACE PROCEDURE "CHECK_AND_LOAD_THAANUM_SCANS" AS
CURSOR c1 IS
SELECT ID FROM X_THAANUM_LEDGERS where moved is null or moved = 'X';
err_num NUMBER(5);
err_msg VARCHAR2(513);
varIDSURN VARCHAR2(255);
numIDSObjectId NUMBER(22);
varPDSURN VARCHAR2(255);
numPDSObjectId NUMBE... |
ALTER TABLE identities DROP COLUMN nid; |
-- @testpoint:opengauss关键字show(非保留),作为外部数据源名
--关键字不带引号-成功
drop data source if exists show;
create data source show;
drop data source show;
--关键字带双引号-成功
drop data source if exists "show";
create data source "show";
drop data source "show";
--关键字带单引号-合理报错
drop data source if exists 'show';
create data source 'show';
... |
<reponame>kmlcburce/PizzaCentral
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 16, 2018 at 03:33 AM
-- 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_zo... |
-- phpMyAdmin SQL Dump
-- version 4.4.10
-- http://www.phpmyadmin.net
--
-- 主機: localhost
-- 產生時間: 2015 年 10 月 07 日 11:14
-- 伺服器版本: 5.5.44-MariaDB-1ubuntu0.14.04.1
-- PHP 版本: 5.5.9-1ubuntu4.13
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
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.33 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 11.2.0.6213
-- -----------------------------------------------... |
SELECT order_date
FROM customers
INNER JOIN addresses on customers.cid = addresses.cid
INNER JOIN orders ON customers.cid = orders.cid
WHERE customers.name = 'Jones' AND addresses.state = 'MA'
|
<reponame>me-box-archive/databox_directory
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.15)
# Database: databox_directory
# Generation Time: 2016-09-25 18:01:04 +0... |
---------------------------
-- Language groups
---------------------------
INSERT INTO sv."languageGroup"(id, code, name, "sortingOrder")
OVERRIDING SYSTEM VALUE VALUES (1, 'UNIVERSAL', 'General-purpose languages', 1)
ON CONFLICT (id) DO UPDATE SET code='UNIVERSAL', name='General-purpose languages', "sortingOrder" = ... |
-- 390-459 Diseases Of The Circulatory System
-- 393-398 Chronic Rheumatic Heart Disease
-- 410-414 Ischemic Heart Disease
-- 420-429 Other Forms Of Heart Disease
-- 746 Other congenital anomalies of heart: BETWEEN '7461 ' AND '7469 '
-- 785 Symptoms involving cardiovascular system: '7850', '7851', '7... |
<filename>prisma/migrations/20211016144510_picture/migration.sql<gh_stars>0
-- AlterTable
ALTER TABLE `Bucket` ADD COLUMN `picture` VARCHAR(191);
|
CREATE TABLE dbo.ClaimType
(
ClaimTypeId tinyint IDENTITY(1,1) NOT NULL,
CONSTRAINT UQ_ClaimType_ClaimTypeId UNIQUE (ClaimTypeId),
Name varchar(128) COLLATE Latin1_General_100_CS_AS NOT NULL,
CONSTRAINT PKC_ClaimType PRIMARY KEY CLUSTERED (Na... |
select name,lat,lon from report where time >= ? and time <? and lat>=-6 and lat<=-5 and lon>=136 and lon<=138
create table report(report_id bigint primary key auto_increment not null, time bigint not null, lat double not null, lon double not null, name varchar2(255) not null, geohash1 char(1) not null, geohash2 char(2... |
<reponame>potionk/lafuta-translate
-- MySQL dump 10.13 Distrib 8.0.18, for macos10.14 (x86_64)
--
-- Host: localhost Database: lafuta_translate
-- ------------------------------------------------------
-- Server version 8.0.18
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHAR... |
INSERT INTO datasett VALUES ('FYL', 'Fylke');
DELETE FROM public.kart WHERE datasettkode='FYL';
INSERT INTO public.kart (datasettkode, id, navn, bbox, geom)
SELECT 'FYL' as kortkode, autorkode, (navn::json)->>'nob' AS navn, ST_Extent(wkb_geometry) AS bbox, wkb_geometry AS geom
FROM import.fylke
GROUP BY fylke.autork... |
<reponame>JumpStartGeorgia/Election-Map
use election_data-elections;
# first truncate staging and raw tables
truncate table `2013 election pres - raw`;
# load data from the csv file
LOAD DATA LOCAL INFILE '/var/www/data/2013_official_pres.csv'
INTO TABLE `2013 election pres - raw`
FIELDS TERMINATED BY ','
ENCLOSED BY... |
ALTER TABLE vetd.forms
ADD PRIMARY KEY (id) |
-- file:alter_table.sql ln:848 expect:true
select atacc1.* from atacc1
|
<gh_stars>10-100
SET NOCOUNT ON
DROP TABLE IF EXISTS BlobTable
CREATE TABLE BlobTable (Filename nvarchar(255), Data varbinary(max))
Truncate Table BlobTable
GO
DECLARE @blob varbinary(max)
SELECT @blob = (SELECT * FROM OPENROWSET(BULK N'C:\Scripts\Target.png', SINGLE_BLOB) as tmp)
INSERT INTO BlobTable VALUES('Ta... |
<gh_stars>0
CREATE TABLE [dbo].[UserDetails] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[FirstName] NVARCHAR (50) NULL,
[ProfilePicture] VARBINARY (MAX) NULL,
[UserId] INT NOT NULL,
CONSTRAINT [PK_dbo.UserDetails] PRIMARY KEY CLUSTERED ([Id] ASC),
CO... |
drop table if exists goods;
create table goods
(
id bigint unsigned primary key auto_increment comment '主键',
cover_image VARCHAR(500) NOT NULL COMMENT '封面图片. 多个之间使用,分割',
cover_video VARCHAR(255) NOT NULL COMMENT '封面视频. 多个之间使用,分割',
name VARCHAR(255) ... |
<reponame>test-fullautomation/testresultwebapp<filename>TestResultWebApp/mysql_server/TMLdb_sproc/experiments/cockpitchart.sql<gh_stars>1-10
# Copyright 2010-2020 <NAME> Multimedia GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licen... |
--[er]test trim,ltrim,rtrim with date type
select trim(to_date('3/3/2003')) from db_root;
select ltrim(to_date('3/3/2003')) from db_root;
select rtrim(to_date('3/3/2003')) from db_root order by 1; |
-- CREATE INDEX
USE sii;
-- KREIRA INDEKS NAD KOLONOM LastName
CREATE INDEX students_LastName ON Students (LastName);
-- KREIRA UNIQUE INDEX NAD KOLONOM FirstName
CREATE UNIQUE INDEX students_FirstName ON Students(FirstName);
-- brise unique index, jer nema smisla
ALTER TABLE students DROP INDEX students_FirstName;
|
CREATE TABLE [dbo].[DocumentTypes] (
[DocumentType] VARCHAR (4) NOT NULL,
[DocumentTypeName] VARCHAR (40) NULL,
[DocumentGroupCode] VARCHAR (2) NULL,
[DocumentGroupName] VARCHAR (40) NULL,
[DocumentSubsystemCode] VA... |
/* Drop foreign keys and rename existing auditing columns */
ALTER TABLE auditing DROP CONSTRAINT fk_auditing_user;
ALTER TABLE auditing DROP CONSTRAINT fk_auditing_message;
ALTER TABLE auditing CHANGE COLUMN user_email username VARCHAR(100);
ALTER TABLE auditing CHANGE COLUMN message_key_id filename VARCHAR(100);
ALTE... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 04, 2020 at 01:00 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
-- Adminer 4.7.1 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
CREATE TABLE `ci_sessions` (
`id` varchar(128) NOT NULL,
`ip_address` varchar(45) NOT NULL,
`timestamp` int(10) unsigned NOT NULL DEFAULT '0',
`data` blob NOT NULL,
PRIMA... |
<filename>src/main/resources/database/changes/release-10.43.0/update_seeddata_actionexporter.sql<gh_stars>1-10
set schema 'actionexporter';
UPDATE actionexporter.templatemapping
SET actiontypenamePK = 'BSNOT'
, file = 'BSNOT'
WHERE actiontypenamePK = 'BRESEL';
UPDATE actionexporter.templa... |
<filename>Database Basics/Database Programmability and Transactions/Database Programmability and Transactions/14. Create Table Logs.sql
CREATE TABLE Logs(
LogId INT PRIMARY KEY IDENTITY,
AccountId INT,
OldSum DECIMAL(15, 2),
NewSum DECIMAL(15, 2)
)
GO
CREATE TRIGGER tr_SumUpdate ON Accounts FOR UPDATE
AS
INSERT INTO L... |
<filename>MP_MODSPACK/Mods/DLL - Various Mod Components (v 95)/DB/GLOBAL/GreatworkYieldtypes.sql
ALTER TABLE Buildings
ADD GreatWorkYieldType TEXT DEFAULT 'YIELD_CULTURE';
-- FOREIGN KEY (GreatWorkYieldType) references Yields(Type);
INSERT INTO CustomModDbUpdates(Name, Value) VALUES('GLOBAL_GREATWORK_YIELDTYPE... |
select 'sysdate with TWO binds' myval
from dual
where 1 = ?
and 2 = ?
|
<reponame>Jamscare/polycash<filename>src/sql/143.sql<gh_stars>10-100
CREATE TABLE `currency_invoice_ios` (
`invoice_io_id` int(11) NOT NULL,
`invoice_id` int(11) DEFAULT NULL,
`tx_hash` varchar(64) DEFAULT NULL,
`out_index` int(11) DEFAULT NULL,
`game_out_index` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CH... |
CREATE TABLE table_a
(
id bigint PRIMARY KEY,
version SMALLINT NOT NULL
);
CREATE TABLE table_b
(
id bigint PRIMARY KEY,
version SMALLINT NOT NULL,
a_id bigint NOT NULL
);
|
SELECT * FROM USER_INFO t for update;
SELECT count(*) FROM USER_INFO t;
SELECT sys_guid() from dual;
delete from user_info t where t.instance_rrn != 'SYSTEM';
SELECT * FROM i18n_message;
SELECT * FROM user_info;
|
{% snapshot schema_tables_snapshot %}
{{
config (
target_database= target.database,
target_schema= target.schema,
unique_key='full_schema_name',
strategy='check',
check_cols=['tables_in_schema'],
invalidate_hard_deletes=True
)
}}
{% set configured_schemas = get_configured_schemas() %}
w... |
CREATE TABLE customers (
id SERIAL,
first_name varchar(20),
last_name varchar(20),
middle_name varchar(20),
suffix varchar(5));
INSERT INTO customers (first_name, last_name, middle_name, suffix) VALUES (4, 'John', 'Doe', 'Middle', '');
INSERT INTO customers (first_name, last_name, middle_name, suffix) VALUES (5, 'Ja... |
<reponame>blinkops/blink-aws-query
select name, arn, partition, region
from aws.aws_sagemaker_notebook_instance
where name = '{{ resourceName }}'; |
<gh_stars>0
INSERT INTO `departamentos` VALUES (1, 'Infomatica', 'Departamento de informatica', NULL, NULL, NULL);
INSERT INTO `departamentos` VALUES (2, 'Sistemas', 'Departamento de Sistemas', NULL, NULL, NULL);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.