sql stringlengths 6 1.05M |
|---|
ALTER TABLE network_device_lease ADD COLUMN last_seen TIMESTAMP WITH TIME ZONE;
UPDATE network_device_lease SET last_seen = lease_start WHERE lease_end IS NULL;
UPDATE network_device_lease SET last_seen = lease_end WHERE lease_end IS NOT NULL;
ALTER TABLE network_device_lease ALTER COLUMN last_seen SET NOT NULL;
CREATE... |
<reponame>crazy1235/About-Android-DB
ALTER TABLE students ADD COLUMN height INTEGER;
UPDATE students SET height = 175; |
<reponame>AnthonyZero/springboot-api-project-seed
CREATE DATABASE `seed` DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
USE `seed`;
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for sm_file
-- ----------------------------
DROP TABLE IF EXISTS `sm_file`;
CREATE TABLE `sm_file` (
`file_... |
-- pg_dump -a -h localhost -d test -U test -t fe_supported_licenses -f licenses.sql
SET client_encoding = 'UTF8';
COPY supported_licenses (id, display_name, info_url, preference, hidden, full_text) FROM stdin;
OSL-3.0 Open Software License 3.0 https://choosealicense.com/licenses/osl-3.0 2147483647 f Open Software Lice... |
-- (1)创建ods层表表 ods_user_order 表,分区表
create external table if not exists ods_mall.ods_user_order(
order_id bigint,
order_date string,
user_id bigint,
order_money double,
order_type int,
order_status int,
pay_id bigint,
up... |
<reponame>coconut2015/jaqy
--------------------------------------------------------------------------
-- autocommit setting test
--------------------------------------------------------------------------
.set autocommit on
.set autocommit off
.set autocommit
.run ../common/mysql_setup.sql
USE vagrant;
.set autocommit... |
INSERT INTO `datasource` (`id`,`created_by`,`created_time`,`modified_by`,`modified_time`,`version`,`ds_conn_type`,`datasource_contexts`,`ds_desc`,`ds_type`,`ds_engine_name`,`ds_granularity`,`ds_linked_workspaces`,`ds_name`,`ds_owner_id`,`ds_seg_granularity`,`ds_src_type`,`ds_status`) VALUES
('test_ds_id','admin', now()... |
-- Helper function, to call either __gp_aoseg_name, or gp_aocsseg_name,
-- dependingwhether the table is row- or column-oriented. This allows us to
-- run the same test queries on both.
--
-- The Python utility that runs this doesn't know about dollar-quoting,
-- and thinks that a ';' at end of line ends the command. T... |
-- @testpoint:opengauss关键字rename(非保留),作为表空间名
--关键字不带引号,创建成功
drop tablespace if exists rename;
CREATE TABLESPACE rename RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
drop tablespace rename;
--关键字带双引号,创建成功
drop tablespace if exists "rename";
CREATE TABLESPACE "rename" RELATIVE LOCATION 'hdfs_tablespace/hdfs... |
<filename>katon_bd.sql
-- --------------------------------------------------------
-- Servidor: 172.16.31.10
-- Versão do servidor: 8.0.22-0ubuntu0.20.04.3 - (Ubuntu)
-- OS do Servidor: Linux
-- HeidiSQL Versão: 11.1.0.6116
-- ------------------------------------... |
<filename>sfss/schema.sql
DROP table if exists users;
CREATE TABLE IF NOT EXISTS users (
id SMALLINT unsigned primary key AUTO_INCREMENT,
username VARCHAR(50) NOT NULL,
password VARCHAR(41) NOT NULL,
firstName VARCHAR(50),
lastName VARCHAR(50),
email VARCHAR(75) NOT NULL,
groups TEXT,
enabled boolean NOT NULL d... |
DROP DATABASE IF EXISTS employee_db;
CREATE DATABASE employee_db;
USE employee_db;
CREATE TABLE departments(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30),
PRIMARY KEY (id)
);
CREATE TABLE roles(
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(30),
salary DECIMAL(10, 2),
department_id INT NOT NULL,
... |
<reponame>fesabelilla/Park-Kori
create or replace package SearchArea as
function searchPlace(loc in location.area@site_link%TYPE)
return number;
procedure ShowParkingSloat(locid in location.lid@site_link%TYPE);
end SearchArea;
/ |
<filename>scripts_DB/users _data.sql
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 06-07-2021 a las 19:22:29
-- Versión del servidor: 10.4.18-MariaDB
-- Versión de PHP: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_... |
Create TABLE IF NOT EXISTS projects(
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
name text NOT NULL CHECK (name <> '') ,
priority integer NOT NULL,
description text,
deliverydate date NOT NULL
);
Create TABLE IF NOT EXISTS tasks (
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDEN... |
<filename>storage/database/geonames/countries/ax.sql
-- MySQL dump 10.13 Distrib 5.7.26, for osx10.10 (x86_64)
--
-- Host: 127.0.0.1 Database: laraclassified
-- ------------------------------------------------------
-- Server version 5.7.26
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101... |
CREATE TABLE Student {
enrollmentNumber VARCHAR(12) DEFAULT "NOT-ALLOTED" PRIMARY KEY UNIQUE,
firstName VARCHAR(60), DEFAULT NULL,
lastName VARCHAR(60), DEFAULT NULL,
fatherName VARCHAR(60), DEFAULT NULL,
motherNam... |
<reponame>Barbarius/DB
USE AdventureWorks2012;
GO
/*Создайте хранимую процедуру, которая будет возвращать сводную таблицу (оператор PIVOT),
отображающую данные о количестве работников, нанятых в каждый отдел (HumanResources.Department)
за определённый год (HumanResources.EmployeeDepartmentHistory.StartDate).
Сп... |
USE [master]
GO
-- under SQLCMD Mode
:SETVAR BackupPath "C:\SQLSaturday\DBFiles\Backup"
:SETVAR RestorePath "C:\SQLSaturday\DBFiles"
RESTORE HEADERONLY FROM DISK = '$(BackupPath)\broken.bak'
RESTORE FILELISTONLY FROM DISK = '$(BackupPath)\broken.bak'
IF EXISTS(SELECT name
FROM sys.databases
WHERE... |
CREATE TABLE sleep.summary
(
date date NOT NULL,
duration character varying,
efficiency character varying,
end_time character varying,
minutes_asleep character varying,
minutes_awake character varying,
start_time character varying,
time_in_bed character varying,
log_id character vary... |
DROP TABLE IF EXISTS ignored;
CREATE TABLE ignored (
user_id INTEGER UNIQUE,
quiet INTEGER NOT NULL,
reason TEXT
);
|
<gh_stars>10-100
-- file:jsonb.sql ln:302 expect:true
SELECT jsonb_typeof('1') AS number
|
# Write your MySQL query statement below
SELECT a.product_id,ROUND(SUM(b.units*a.price)/SUM(b.units),2) as average_price
FROM Prices as a
JOIN UnitsSold as b
ON a.product_id=b.product_id AND (b.purchase_date BETWEEN a.start_date AND a.end_date)
GROUP BY product_id;
|
<gh_stars>1-10
-- 2021-11-25T14:39:07.878Z
-- URL zum Konzept
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,580311,0,'DHL_PostId',TO_TIMESTAMP('2021-11-25 16:39:07','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','DHL Post ... |
<reponame>uk-gov-mirror/defra.prsd-weee<filename>src/EA.Weee.Database/scripts/Update/Release 1/Sprint07/20150612-164414-NullableOrganisationName.sql
GO
PRINT N'Altering [Organisation].[Organisation]...';
GO
ALTER TABLE [Organisation].[Organisation] ALTER COLUMN [Name] NVARCHAR (2048) NULL;
GO
PRINT N'Update compl... |
<filename>jcms/sql/20120328.sql
--
-- New setting cp_enable_wysiwyg (default true)
--
\connect - jcms
DELETE FROM settings WHERE setting_id=50;
INSERT INTO settings VALUES (50, 'cp_enable_wysiwyg', 'true', 'Enable WYSIWYG content editor (true/false).', false, true);
INSERT INTO updatelog (name,value) VALUES ('db_ver... |
<reponame>hacfins/spring-boot-2-api
use test_edu;
/*
Navicat MariaDB Data Transfer
Source Server : 192.168.123.2
Source Server Version : 100131
Source Host : 192.168.123.2:3306
Source Database : hc_opens
Target Server Type : MariaDB
Target Server Version : 100131
File Encoding : 65... |
<reponame>Jim999999/project-1
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50553
Source Host : localhost:3306
Source Database : tp5
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-10-14 16:42:48
*/
SET F... |
<filename>database_update.sql<gh_stars>1-10
USE anychart_db;
UPDATE fruits SET value = FLOOR(1 + RAND() * 20); |
<reponame>kucera-jan-cz/kickshare<filename>kickshare-rest/kickshare-rest/src/main/resources/db/sql/update_leader_rating.sql
UPDATE backer b
SET leader_rating = lr.rating
FROM (
SELECT r.leader_id, AVG(r.rating) AS rating
FROM leader_rating AS r
GROUP BY r.leader_id
) AS lr
WHERE b.id = lr.lead... |
<reponame>ljsvn/noveltysearch<filename>sql/sqlserver/view/system/create.view.menu.sql
-- =============================================
-- 使用刚创建的数据库
-- =============================================
use noveltysearch
go
-- =============================================
--用途:用户的一级菜单
-- 表名:v_user_menu_modual
-- ====... |
/*
* Copyright 2017 <NAME> <<EMAIL>>
*
* 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 law or agree... |
<filename>Tellma.Database.Admin/dbo/User Defined Types/dbo.AdminUserList.sql
CREATE TYPE [dbo].[AdminUserList] AS TABLE
(
[Index] INT PRIMARY KEY DEFAULT 0,
[Id] INT NOT NULL DEFAULT 0,
[Name] NVARCHAR (255),
[Email] NVARCHAR (255),
[ClientId] NVARCHAR (255),
[IsService] BIT
)
|
<reponame>ngalaiko/sturdy
ALTER TABLE ci_configurations
ADD COLUMN id TEXT NOT NULL PRIMARY KEY;
|
/*L
Copyright SAIC
Copyright SAIC-Frederick
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/camod/LICENSE.txt for details.
L*/
-- I had an old DATOP file to match the following metastasis records
-- JIRA #CAMOD-974 Metastases are gone from earlier models
--... |
ALTER TABLE reports
add column create_date timestamptz,
add column update_date timestamptz;
ALTER TABLE assets
add column create_date timestamptz,
add column update_date timestamptz;
ALTER TABLE user_courses
add column create_date timestamptz,
add column update_date timestamptz;
|
<gh_stars>0
INSERT INTO `login` (`id`, `usernim`, `password`, `lvl`) VALUES
(1,'admin',' admin','1'),
(2,'mahasiswa','mahasiswa','2'),
(3,'finance','finance','3');
|
<gh_stars>0
IF NOT EXISTS (SELECT 1 from sys.types WHERE is_table_type = 1 AND name = 'DateValues')
BEGIN
PRINT 'Creating Type "DateValues"...'
CREATE TYPE [dbo].[DateValues] AS TABLE(
[Id] [int] UNIQUE NOT NULL,
[Date] [date] UNIQUE NULL,
[Value] [decimal](9, 3) NULL
)
END
ELSE
PRINT 'Type "DateValues" alrea... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 23, 2019 at 10:50 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
<reponame>NGimhana/BioMetricAuthentification
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: Gimhana
* Created: Jan 24, 2018
*/
CREATE DATABASE BioMetic;
USE BioM... |
<gh_stars>0
version https://git-lfs.github.com/spec/v1
oid sha256:b0667ec14f02619612a7e5cbcffbeba64c4d1c193adba709e1430f70eeb28546
size 116779
|
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
--
-- Host: localhost Database: testing
-- ------------------------------------------------------
-- Server version 5.7.21-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE... |
<gh_stars>1-10
CREATE TABLE IF NOT EXISTS TEST_TABLE (
id INT64 NOT NULL,
name STRING(MAX) NOT NULL
) PRIMARY KEY (id);
CREATE TABLE IF NOT EXISTS TEST_ITEMS (
id INT64 NOT NULL,
uid INT64 NOT NULL,
iid INT64 NOT NULL,
count INT64 NOT NULL
) PRIMARY KEY (id);
CREATE INDEX IF NOT EXISTS UID_INDEX ON TEST_I... |
CREATE OR REPLACE FUNCTION ti.getisosampleintrosystemtypes()
RETURNS TABLE(isosampleintrosystemtypeid integer, isosampleintrosystemtype character varying)
LANGUAGE sql
AS $function$
SELECT
isosampleintrosystemtypeid,
isosampleintrosystemtype
FROM ndb.isosampleintrosystemtypes;
$function$
|
--
-- CzechIdM 10 Flyway script
-- BCV solutions s.r.o.
--
-- Add profile setting properties.
ALTER TABLE idm_profile ADD COLUMN system_information boolean NOT NULL DEFAULT false;
ALTER TABLE idm_profile_a ADD COLUMN system_information boolean;
ALTER TABLE idm_profile_a ADD COLUMN system_information_m bool;
ALTER TA... |
-- file:privileges.sql ln:744 expect:true
SELECT has_table_privilege('regress_user1', 'atest4', 'SELECT WITH GRANT OPTION')
|
-- Role table
CREATE TABLE IF NOT EXISTS public.roles (
id bigserial NOT NULL,
name varchar(255) NOT NULL,
description text,
created_at timestamptz,
updated_at timestamptz,
CONSTRAINT roles_pkey PRIMARY KEY (id)
);
-- Environment types
CREATE TABLE IF NOT EXISTS public.environment_types (
id bigserial NOT NULL... |
<filename>samples/features/ssms-templates/Sql/Service Broker/Route/Create Route.sql
-- =============================================
-- Basic Create Route Template
-- =============================================
CREATE ROUTE <route_name, sysname, test_route>
WITH
SERVICE_NAME = N'<service-name, nvarchar, test_... |
insert into beat (id, uri, Source_id, BeatType_id, DataStream_id) values (1, 'http://walmart.com', 1, 1, 1);
insert into beat (id, uri, Source_id, BeatType_id, DataStream_id) values (2, 'http://zdnet.com', 2, 2, 2);
insert into beat (id, uri, Source_id, BeatType_id, DataStream_id) values (3, 'http://census.gov', 3, 3, ... |
CREATE SEQUENCE SEQ_IACUC_ORG_CRRSPNDNT_ID INCREMENT BY 1 START WITH 1 NOCACHE
/
|
<reponame>tridentcodesolution/jpankleshwaria.github.io
BEGIN;
DROP TYPE IF EXISTS trial_balance_line CASCADE;
CREATE TYPE trial_balance_line AS (
chart_id int,
accno text,
description text,
beginning_balance numeric,
credits numeric,
debits numeric,
ending_balance numeric
);
CREATE OR REPLACE FUNCTION report_t... |
INSERT INTO record (id, data)
VALUES (1, '<NAME>');
INSERT INTO record (id, data)
VALUES (2, '<NAME>');
INSERT INTO record (id, data)
VALUES (3, '<NAME>');
INSERT INTO record (id, data)
VALUES (4, '<NAME>');
INSERT INTO record (id, data)
VALUES (5, 'Testing');
INSERT INTO record (id, data)
VALUES (6, '<NAME>');
INSERT ... |
/****** Object: View [dbo].[V_Analysis_Job_Completed_Count_by_month] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW dbo.V_Analysis_Job_Completed_Count_by_month
AS
SELECT CONVERT(datetime, CONVERT(varchar(24), m)
+ '/1/' + CONVERT(varchar(24), y)) AS date, COUNT(*)
AS [Number of A... |
<gh_stars>10-100
USE [OrleansESL]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- No clustered PK, all reads are by specific CustomerId ordered by ETag
CREATE TABLE [dbo].[CustomerEventStream] (
[CustomerId] VARCHAR (20) NOT NULL, -- arbitrary size, indexes don't allow MAX
[ETag] INT NO... |
<reponame>loujine/musicbrainz-server
BEGIN;
UPDATE release_coverart SET cover_art_url = NULL
WHERE cover_art_url LIKE '%amazon%'
AND id NOT IN (
SELECT entity0
FROM l_release_url
JOIN link ON link.id=l_release_url.link
JOIN link_type ON (link_type.id = link.link_type)
WHERE link_type.name = 'amaz... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 21, 2019 at 03:22 AM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.1.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
CREATE SCHEMA [Subspace] |
DROP TABLE IF EXISTS cabinet;
CREATE TABLE cabinet (
id INTEGER PRIMARY KEY AUTOINCREMENT,
temperature REAL(3) NOT NULL,
humidity REAL(3) NOT NULL,
created_at TEXT DEFAULT CURRENT_TIMESTAMP
);
|
select p.*
from shipment_input si
join product p
on p.id = si.product
where si.shipment = $1;
|
select distinct p.position_name, avg(p.salary) over (partition by p.id_position) over
from stuff s, position p
where s.id_position = p.id_position;
select p_t.product_type_name, u.unit_name, avg (p.price) over (partition by p.id_product_type, p.id_unit ) avg
from product p, product_type p_t, unit u
wher... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 27, 2017 at 03:20 PM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
SELECT TOP 10
c.Id,
c.Name,
SUM(h.BaseRate + r.Price) AS TotalRevenue,
COUNT(t.Id) AS Trips
FROM Trips AS t
JOIN Rooms AS r ON r.Id = t.RoomId
JOIN Hotels AS h ON h.Id = r.HotelId
JOIN Cities AS c ON c.Id = h.CityId
WHERE YEAR(t.BookDate) = 2016
GROUP BY c.Id, c.Name
ORDER BY TotalRevenue DESC, Trips DESC |
create function gender_by_name(first_name character varying, last_name character varying, middle_name character varying) returns gender
language plpgsql
as
$$
DECLARE
weight int;
is_male bool;
valid_name_regex varchar;
BEGIN
valid_name_regex := '[а-яё ]{2,}';
weight := 0;
first_name := lowe... |
<gh_stars>100-1000
create or replace package body logger_test
as
-- CONTANTS
gc_line_feed constant varchar2(1) := chr(10);
gc_unknown_err constant varchar2(50) := 'Unknown error';
gc_client_id constant varchar2(30) := 'test_client_id'; -- Consistent client id to use
-- GLOBAL VARIABLES
g_proc_name varcha... |
<filename>Dump20170417-1.sql
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: login
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.19-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHAR... |
create or replace function graphql.rebuild_schema()
returns void
language plpgsql
as $$
begin
truncate table graphql._field;
delete from graphql._type;
refresh materialized view graphql.entity with data;
perform graphql.rebuild_types();
perform graphql.rebuild_fields();
end;
$$;
create or r... |
<filename>data/scripts/mysql/db.sql
-- database
CREATE SCHEMA IF NOT EXISTS `drupaldb` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;
USE `drupaldb`;
-----------************* table declarations START ****************--------------
-- demo table
CREATE TABLE IF NOT EXISTS demo (
id BIGINT NOT NULL AUTO_I... |
<filename>ceshi/wbe/robot/install/install.sql
DROP TABLE IF EXISTS `web_role`;
DROP TABLE IF EXISTS `web_user`;
DROP TABLE IF EXISTS `web_robot`;
DROP TABLE IF EXISTS `web_robot_dat`;
DROP TABLE IF EXISTS `web_verification`;
DROP TABLE IF EXISTS `web_cookie`;
DROP TABLE IF EXISTS `web_plugin`;
DROP TABLE IF EXISTS `web... |
<reponame>daehyeonhong/Hello-Spring
CREATE TABLE MEMBER(
ID NUMBER PRIMARY KEY,
NAME VARCHAR2(255)
);
INSERT INTO MEMBER(ID,NAME)VALUES(1,'QWERTY'); |
<reponame>shahnish009/SQLqueries_SQL
SET PAGESIZE 20
SET LINESIZE 200
COLUMN c1 HEADING 'product name'
COLUMN ptime FORMAT a40
SELECT pur#, name c1, to_char(ptime, 'Month DD, YYYY Day HH:MI:SS') AS
ptime, total_price, (original_price * qty - total_price) AS "saving"
FROM purchases pu, products pr WHERE pu.pid = pr... |
<reponame>RishDaKid/address-book
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Gegenereerd op: 04 aug 2018 om 22:27
-- Serverversie: 10.1.32-MariaDB
-- PHP-versie: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "... |
<filename>EMR/usr/share/nginx/html/contrib/forms/specialist_notes/table.sql
CREATE TABLE IF NOT EXISTS form_specialist_notes (
id bigint(20) NOT NULL auto_increment,
activity tinyint(1) NOT NULL DEFAULT 1, -- 0 if deleted
notes text NOT NULL DEFAULT '',
followup_re... |
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[sp_External_Community_d]
@SystemCode varchar(30),
@EXT_ID [int],
@ErrMsg [nvarchar](500) OUTPUT
WITH EXECUTE AS CALLER
AS
SET NOCOUNT ON
DECLARE @Error int
SET @Error = 0
DECLARE @ExternalCommunityObjectName nvarchar(60)
SET @ExternalComm... |
CREATE TABLE IF NOT EXISTS UNIVERSAL_SKELETAL_LINK (
SOURCE_ID INT NOT NULL,
DEST_ID INT NOT NULL,
ALGORITHM_ID INT NOT NULL,
LANGS BYTEA NOT NULL
)
|
{% macro sqlite__get_catalog(information_schema, schemas) -%}
{# no-op #}
{# see SQLiteAdapter._get_one_catalog() #}
{% endmacro %}
|
INSERT INTO TILE (ID, TILE_TYPE, COLOUR, FETCH_URL, TITLE, ICON) VALUES
('tile', 'count', 1, 'http://provider', 'Printer Credit', 'print'),
('other-tile', 'count', 2, 'http://provider', 'Mail', 'envelope-o'),
('heron-tile', 'count', 3, 'http://herons-eat-ducklings', 'Mail', 'envelope-o');
-- comment
INSERT INTO ... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 12 Jul 2021 pada 13.51
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 8.0.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
CREATE TABLE [Warehouse].[StockItemHoldings]
(
[StockItemID] [int] NOT NULL,
[QuantityOnHand] [int] NOT NULL,
[BinLocation] [nvarchar] (20) NOT NULL,
[LastStocktakeQuantity] [int] NOT NULL,
[LastCostPrice] [decimal] (18, 2) NOT NULL,
[ReorderLevel] [int] NOT NULL,
[TargetStockLevel] [int] NOT NULL,
[LastEditedBy] [int]... |
/*
* automaticInvalidation.sql
* Chapter 9, Oracle10g PL/SQL Programming
* by <NAME>, <NAME> and <NAME>
*
* This script demonstrates the automatic invalidation of a subprogram.
*/
COLUMN object_name FORMAT a20
-- Both procedures should be valid when we start.
SELECT object_name, status
FROM user_objects
WHE... |
<reponame>HerilalaAntsa/plane<gh_stars>0
CREATE OR REPLACE VIEW listappel AS
SELECT a.idappel, a.idclient, a.dateappel, a.appelentrant, a.dureeappel,
a.action, a.dateaction, a.commentaireaction,
concat(concat(c.nomclient, ' '),c.prenomclient) as fullname, ag.*,
FROM appel a
JOIN CLIENT c ON a.IDCLIENT = c... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: May 17, 2018 at 06:59 PM
-- Server version: 5.7.19
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
<filename>db/eapi_2018-01-22.sql
/*
SQLyog Community v11.28 (64 bit)
MySQL - 10.1.34-MariaDB : Database - eapi
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 *... |
<reponame>RosenBobchev/CSharp-DB-Fundamentals
SELECT DISTINCT u.Username
FROM Reports AS r
JOIN Users AS u
ON u.Id = r.UserId
WHERE LEFT(u.Username, 1) LIKE '[0-9]' AND CONVERT(VARCHAR(10), r.CategoryId) = LEFT(u.Username, 1)
OR
RIGHT(u.Username, 1) LIKE '[0-9]' AND CONVERT(VARCHAR(10), r.CategoryId) = R... |
\copy (SELECT id FROM casesvc.case WHERE statefk = 'ACTIONABLE' and casegroupfk in (SELECT casegrouppk FROM casesvc.casegroup WHERE status = 'COMPLETEDBYPHONE' or status = 'NOLONGERREQUIRED' or status = 'COMPLETE')) TO STDOUT WITH CSV |
TRUNCATE TABLE fm_ccy_holiday;
INSERT INTO fm_ccy_holiday (CCY, HOLIDAY_DATE, HOLIDAY_DESC, HOLIDAY_TYPE, APPLY_IND, COMPANY, TRAN_TIMESTAMP, TRAN_TIME) VALUES ('AUD', '20191001', '国庆节', 'S', 'B', 'DCITS', NULL, NULL);
INSERT INTO fm_ccy_holiday (CCY, HOLIDAY_DATE, HOLIDAY_DESC, HOLIDAY_TYPE, APPLY_IND, COMPANY, TRAN_T... |
-- danql test tables
PRAGMA foreign_keys = ON; -- Turn on foreign key constraints
-- BREED
CREATE TABLE IF NOT EXISTS breed (
breed_id INTEGER PRIMARY KEY,
name TEXT NOT NULL
);
CREATE UNIQUE INDEX IF NOT EXISTS breed_name_index
ON breed (name);
-- OWNER
CREATE TABLE IF NOT EXISTS owner (
owner_id IN... |
CREATE OR REPLACE FUNCTION speaker_deleted()
RETURNS trigger AS $$
BEGIN
INSERT INTO confreg_deleteditems (itemid, type, deltime) VALUES (OLD.id, 'spk', CURRENT_TIMESTAMP);
RETURN NULL;
END;
$$ LANGUAGE 'plpgsql';
DROP TRIGGER IF EXISTS trg_speaker_deleted ON confreg_speaker;
CREATE TRIGGER trg_speaker_deleted
A... |
<reponame>Shuttl-Tech/antlr_psql
-- file:collate.icu.utf8.sql ln:254 expect:true
SELECT a, CAST(b AS varchar) FROM collate_test2 ORDER BY 2
|
-- file:oidjoins.sql ln:40 expect:true
SELECT ctid, aggsortop
FROM pg_catalog.pg_aggregate fk
WHERE aggsortop != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_operator pk WHERE pk.oid = fk.aggsortop)
|
<reponame>jacebenson/news.jace.pro
-- AlterTable
ALTER TABLE "Feed" ADD COLUMN "feedIcon" TEXT NOT NULL DEFAULT E'';
-- AlterTable
ALTER TABLE "Participant" ADD COLUMN "role" TEXT NOT NULL DEFAULT E'participant';
-- CreateTable
CREATE TABLE "_FeedToParticipant" (
"A" INTEGER NOT NULL,
"B" INTEGER NOT ... |
<filename>evo-X-Scriptdev2/sql/Updates/0.0.2/r170.sql
-- special taxi path netherstorm
UPDATE `creature_template` SET `ScriptName` = 'npc_protectorate_nether_drake' WHERE `entry` = 20903;
|
use NERD_BUDGET;
if OBJECT_ID('dbo.ACCOUNT') IS NOT NULL DROP TABLE dbo.ACCOUNT
create table dbo.ACCOUNT
(
account_id char(2) not null,
account_name varchar(30) not null,
account_type char(1) not null,
started_at datetime not null,
created_at datetime not null,
updated_at datetime null,
p... |
<reponame>dulibrarytech/living-library
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.26)
# Database: livinglibrary
# Generation Time: 2020-10-16 23:27:04 +0000
# **... |
SELECT id, postid, name, email, body
FROM public.comments
where postid = v0
order by id
|
<gh_stars>0
CREATE TABLE [MyVote].[ActiveUsers] (
[id] BIGINT IDENTITY (1, 1) NOT NULL,
[AuthnToken] NVARCHAR (MAX) NULL,
[containerName] NVARCHAR (MAX) NULL,
[resourceName] NVARCHAR (MAX) NULL,
[sas] NVARCHAR (MAX) NULL,
PRIMARY KEY CLUSTERED ([id] ASC)
);
|
<filename>roles/all_roles.sql
/*
=============================================================================================================================
role: developper
=============================================================================================================================
*/
CREATE ROLE de... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 5.7.24 - MySQL Community Server (GPL)
-- SO del servidor: Win64
-- HeidiSQL Versión: 10.2.0.5599
-- --------------------------------------------------------
/... |
ALTER TABLE `user` ADD COLUMN `create_date` TIMESTAMP NOT NULL AFTER `id`;
ALTER TABLE `user` ADD COLUMN `modify_date` TIMESTAMP NOT NULL AFTER `create_date`;
ALTER TABLE `user` ADD COLUMN `version` INT NOT NULL AFTER `modify_date`;
ALTER TABLE `user_profile` ADD COLUMN `create_date` TIMESTAMP NOT NULL AFTER `id`;
ALTE... |
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 06, 2016 at 08:09 AM
-- Server version: 5.6.26
-- PHP Version: 5.5.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
<gh_stars>0
CREATE DATABASE stock_and_exchange;
create table stock_prices(
code integer NOT NULL,
date date NOT NULL,
closing_price integer NOT NULL
);
alter table stock_prices add constraint stock_prices_uq unique(code, date);
create table exchange_rates(
date date NOT NULL UNIQUE,
closing_price real NOT ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.