sql stringlengths 6 1.05M |
|---|
<reponame>piovezan/SOpt
INSERT INTO contatos (cod, nome)
SELECT (SELECT MAX(cod) FROM contatos) + cod, nome FROM fornecedores;
--https://pt.stackoverflow.com/q/257055/101
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 08-12-2017 a las 11:17:01
-- Versión del servidor: 10.1.26-MariaDB
-- Versión de PHP: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
INSERT INTO [Notification].[NotificationAssessment]
(
[Id],
[NotificationApplicationId],
[Status]
)
SELECT
(select CAST(CAST(NEWID() AS BINARY(10)) + CAST(GETDATE() AS BINARY(6)) AS UNIQUEIDENTIFIER)) as [Id],
[Id] as [NotificationApplicationId],
1 as [Status]
FROM
[Notification].[Notificat... |
ALTER TABLE `employees`
ADD COLUMN `phone_number` VARCHAR(20) NULL AFTER `title_id`; |
select
l.id, m.name, m.id
from
language as l, languoid as ll, languoidmacroarea as lm, macroarea as m
where
l.pk = ll.pk and ll.pk = lm.languoid_pk and lm.macroarea_pk = m.pk and l.active and ll.level = 'language'
order by
l.id
|
<reponame>noelclm/mvc
/**
* Copyright 2017 <NAME>
*
* 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... |
--------------------------------------------------------------------------------
-- IDERA DB Change Manager Synchronization Script
-- FILE : Sync.192.168.229.128 Feb 7, 2021, 11_16_20 PM.sql
-- DATE : Feb 7, 2021, 11:16:20 PM
--
-- SOURCE DATA SOURCE : localhost
-- TARGET DATA SOURCE : ... |
<reponame>skatova/cuba-petclinic-data-model-entity-inheritance
alter table PETCLINIC_PET add column DTYPE varchar(31) ;
|
CREATE UNIQUE INDEX "SYS_IL0001434416C00010$$" ON "GIS_SHAPES" (
|
<filename>6-tietokannat/scripts/initdb.sql
CREATE DATABASE pydb;
CREATE USER pydb WITH PASSWORD '<PASSWORD>';
GRANT ALL PRIVILEGES ON DATABASE pydb to pydb;
|
<reponame>dunarel/dunphd-thesis<filename>Chapter4/Supplementary/proc_hom/sessions/hgt_par_75.sql<gh_stars>0
checkpoint defrag
backup database to '/root/devel/backup/db_srv/' blocking
select gn.NAME,
hcif.GENE_ID,
hcif.ID,
max(hcit.id),
max(hctt_beast.AGE_HPD5_WG),
max(hct... |
<filename>modules/recurringinvoices/install/menu.sql<gh_stars>1-10
INSERT INTO `menu` (`uuid`, `name`, `link`, `parentid`, `displayorder`, `createdby`, `modifiedby`, `creationdate`, `modifieddate`, `roleid`) VALUES ('menu:1f7541a0-7bbe-6b9f-e7c5-2db926557e53', 'Recurring Invoices', 'search.php?id=tbld%3A3434bf2d-1337-5... |
<filename>tests/database/postgresql/create_database.sql
CREATE DATABASE agatereports;
\connect agatereports;
|
CREATE SEQUENCE dbo.cs_groups_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER SEQUENCE dbo.cs_groups_id_seq OWNER TO gcheb;
ALTER SEQUENCE dbo.cs_groups_id_seq
OWNED BY dbo.cs_groups.id;
|
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 22, 2016 at 02:27
-- Server version: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... |
-- create database test;
use test;
-- Create table
create table USER_ACCOUNT
(
USER_NAME VARCHAR(30) not null,
GENDER VARCHAR(1) not null,
PASSWORD VARCHAR(30) not null,
primary key (USER_NAME),
ROLE VARCHAR(15) not null DEFAULT 'USER',
isblocked BOOL not null DEFAULT false
);
-- Create ... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 09, 2019 at 06:02 PM
-- Server version: 5.7.28-0ubuntu0.18.04.4
-- PHP Version: 7.2.24-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
<gh_stars>0
CREATE DATABASE laravel;
USE laravel;
CREATE TABLE usuarios(
id INT PRIMARY KEY AUTO_INCREMENT,
nome VARCHAR(100)
);
INSERT INTO usuarios VALUES (null, 'Maria');
INSERT INTO usuarios VALUES (null, 'Pedro');
INSERT INTO usuarios VALUES (null, 'Amanda'); |
<filename>src/test/resources/sql/select/8826a6af.sql
-- file:rangetypes.sql ln:95 expect:true
select numrange(1.1, 2.2,'[]') - numrange(2.0, 3.0)
|
<reponame>Shuttl-Tech/antlr_psql
-- file:gist.sql ln:57 expect:true
explain (costs off)
select p from gist_tbl where p <@ box(point(0,0), point(0.5, 0.5))
order by p <-> point(0.201, 0.201)
|
DROP TABLE array_attrs;
|
SET 'auto.offset.reset' = 'earliest';
CREATE OR REPLACE STREAM user_locations
WITH (KAFKA_TOPIC='user_locations', FORMAT='JSON_SR')
AS SELECT rowkey as userid,
CAST(latitude AS DECIMAL(10,7)) AS latitude,
CAST(longitude AS DECIMAL(10,7)) AS longitude,
CASE
WHEN CAST(latitude AS DECIMAL(10,7)) BETWEEN 14.5467... |
<reponame>arenadata/kafka-adb-os<gh_stars>0
-- Update tests. Check that the whole sequence of extension updates can be applied successfully.
-- These tests do not require a Kafka instance. They can be run as common tests.
-- start_ignore
DROP EXTENSION IF EXISTS kadb_fdw CASCADE;
-- Prevent WARNINGs that ALTER EXTENS... |
<reponame>bcgov/cas-ciip-portal<gh_stars>1-10
-- Verify ggircs-portal:tables/gas_001 on pg
begin;
select pg_catalog.has_table_privilege('ggircs_portal.gas', 'select');
rollback;
|
<reponame>betagouv/preuve-covoiturage
-- add new fields to aquisition error
ALTER TABLE acquisition.errors ADD COLUMN error_stage varchar(255) NOT NULL DEFAULT 'acquisition';
ALTER TABLE acquisition.errors ADD COLUMN error_attempt integer NOT NULL DEFAULT 1;
ALTER TABLE acquisition.errors ADD COLUMN error_resolved BOOL... |
select count(*) from nulls1 where not bool_0
44
|
<reponame>adrianmahjour/db2-samples
----------------------------------------------------------------------------
-- (c) Copyright IBM Corp. 2007 All rights reserved.
--
-- The following sample of source code ("Sample") is owned by International
-- Business Machines Corporation or one of its subsidiaries ("IBM") and i... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.18
-- Dumped by pg_dump version 12.3
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
-- The following line is auto generated by pg_dum... |
<reponame>nguyenppt/pubteller1<gh_stars>0
alter table [dbo].[BCOLLECTCHARGESFROMACCOUNT] add OldBalance numeric(18,2), NewBalance numeric(18,2) |
<reponame>krattai/AEBL<filename>blades/ejabberd/sql/mysql.sql<gh_stars>1-10
--
-- ejabberd, Copyright (C) 2002-2014 ProcessOne
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License as
-- published by the Free Software Foundation; either vers... |
<gh_stars>1-10
CREATE TABLE `exchange_orders` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
`order_no` CHAR(25) NOT NULL COMMENT '原订单号',
`admin_id` INT(10) NOT NULL COMMENT '操作人',
`created_time` INT(10) UNSIGNED NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 C... |
--test least function with int and other type as its operands
select least(10, 'aaa') from db_root;
select least(10, n'aaa') from db_root;
select least(10, date'2/2/2002') from db_root;
select least(10, time'3:3:3 am') from db_root;
select least(10, timestamp'2/2/2001 2:2:2 am') from db_root;
select least(10, b'0010101... |
<gh_stars>0
USE employee_appDB;
INSERT INTO department (name)
VALUES ("Sales");
INSERT INTO department (name)
VALUES ("Engineering");
INSERT INTO department (name)
VALUES ("Finance");
INSERT INTO department (name)
VALUES ("Legal");
INSERT INTO role (title, salary, department_id)
VALUES ("Sales Lead", 100000, 1);
INSE... |
-- 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 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL... |
<gh_stars>0
USE employee_db;
INSERT INTO department (name)
VALUES ('Manager'),
('Sales'),
('IT');
INSERT INTO role (title, salary, department_id)
VALUES ('General Manager', 100000, 1),
('Estimator', 85000, 2),
('Support', 75000, 3);
INSERT INTO employee (first_name, last_name, role_id, ... |
<reponame>best-coloc-ever/globibot<gh_stars>10-100
create type eval_behavior as enum (
'manual',
'auto',
'off'
);
create table eval_setting(
author_id bigint primary key,
behavior eval_behavior not null default 'manual'
);
create table eval_snippet(
id serial prima... |
-- MySQL dump 10.13 Distrib 5.6.24, for Win64 (x86_64)
--
-- Host: localhost Database: zoradb
-- ------------------------------------------------------
-- Server version 5.6.24-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... |
CREATE PROCEDURE [Queue_Schema_Name].[RestoreState]
WITH NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS OWNER
AS
BEGIN ATOMIC
WITH (TRANSACTION ISOLATION LEVEL = SNAPSHOT, LANGUAGE = N'us_english')
declare @MinID1 bigint
declare @MaxID1 bigint
declare @Num1 int
declare @LastWrite1 datetime2(7)
declare @Ne... |
<filename>prisma/migrations/20210718184017_reminder_mails/migration.sql
-- CreateEnum
CREATE TYPE "ReminderType" AS ENUM ('PENDING_BOOKING_CONFIRMATION');
-- CreateTable
CREATE TABLE "ReminderMail" (
"id" SERIAL NOT NULL,
"referenceId" INTEGER NOT NULL,
"reminderType" "ReminderType" NOT NULL,
"elapsedM... |
--
-- STORED PROCEDURE
-- Deletes a single resource's history, and optionally the resource itself
--
-- DESCRIPTION
-- Permanently deletes all history data related to a resource. Optionally removes all data, including the current resource version.
-- Data remains recoverable from the transaction log, howeve... |
DROP VIEW IF EXISTS vw_financial_accounts_by_program_activity_object_class_download;
CREATE VIEW vw_financial_accounts_by_program_activity_object_class_download AS
SELECT
FABPAOC.*,
CGAC_AID.agency_name AS agency_identifier_name,
CGAC_ATA.agency_name AS allocation_transfer_agency_identifier_name
FROM financial_ac... |
--:setvar PubServer N'GLENGATEST2'
--:setvar SubServer N'GLENGATEST2'
--------------------------------------------------------------------------
-- remove a merge pull subscription
--------------------------------------------------------------------------
--<snippetsp_dropmergepullsubscription>
-- This script u... |
# Time: O(n * l), n is the number of users, l is the number of listens
# Space: O(n * l)
SELECT DISTINCT a.user_id user1_id,
b.user_id user2_id
FROM friendship c
INNER JOIN listens a ON c.user1_id = a.user_id
INNER JOIN listens b ON c.user2_id = b.user_id AND a.day = b.day AND a.song_i... |
<filename>hedera-mirror-importer/src/main/resources/db/migration/v1/V1.58.6__ethereum_nonce.sql<gh_stars>0
alter table if exists entity
add column if not exists ethereum_nonce bigint null,
add column if not exists evm_address bytea null;
alter table if exists entity_history
add column if not exists ethereu... |
<reponame>taguz91/caso-2-grupo-2
-- Definitions
-- Types:
-- 1: impacto
-- 2: nivelprioridad
-- 3: estados
-- 4: tipoServicios
-- 5: mediosComunicacion
--
-- Insert data into parametros
--
-- Insert impactos
UPDATE
parametros
SET
type = 1,
nombre = 'Alto Impacto',
descripcion = 'Afecta a activos de informac... |
-- db_patches
INSERT INTO `db_patches` (issue, created) VALUES ('POCOR-3068', NOW());
-- code here
DELETE FROM `security_functions` WHERE `security_functions`.`id` = 5032;
DELETE FROM `security_functions` WHERE `security_functions`.`id` = 5033; |
<gh_stars>1-10
--TEST: Hint use_desc_idx doesn't work well in partition table. NOT A BUG
drop table if exists t1;
create table t1(a int)
PARTITION BY RANGE (a)
(PARTITION before_10 VALUES LESS THAN (10),
PARTITION before_20 VALUES LESS THAN (20));
create index i_a on t1(a);
insert into t1 values (null);
insert into... |
CREATE TABLE works_on (
essn char(9) not null,
pno integer(4),
hours decimal(5,1),
primary key (essn, pno)
);
CREATE TABLE project (
pname varchar(20) not null,
pnumber integer(4),
plocation varchar(20),
dnum integer(4),
primary key (pnumber)
); |
<reponame>leggettc18/devmarks
CREATE TABLE IF NOT EXISTS bookmark_folder(
bookmark_id int NOT NULL,
folder_id int NOT NULL,
CONSTRAINT bookmarks_id_fkey FOREIGN KEY (bookmark_id)
REFERENCES bookmarks(id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE CASCADE,
CONSTRAINT folders_id_fkey FOREIGN KEY... |
<reponame>rochaandre/scripts-oracle-named
-- Index leaf block fragmentation
-- if the pct_del is more than 30% you should rebuild the indexes
set echo off feedback off linesize 100
clear breaks
clear computes
spool ./log/idx_health.log
col owner format a10
col index_name format a15
select a.owner,a.index... |
<reponame>DuaDeoLA/SQLSERVER
USE SELL_MANAGE
--A
CREATE VIEW cus_order_vw AS
SELECT T1.OrderID,T1.CustomerID,T2.CustomerName,T1.OrderDate,T1.deliveryDate
FROM Orders T1 JOIN Customer T2 ON T1.CustomerID = T2.CustomerID
--B
SELECT TOP 3 *
FROM cus_order_vw
ORDER BY CustomerName
--C
ALTER VIEW cus_order_vw AS
SELECT ... |
<gh_stars>0
ALTER TABLE chat_groups
RENAME token TO chat_group_code;
ALTER TABLE chat_groups
DROP CONSTRAINT chat_groups_member_itin_id_fkey;
ALTER TABLE chat_groups
DROP CONSTRAINT chat_groups_tc_id_fkey; |
<reponame>aifa-gov-it/spending-pha-database-initialization<filename>SPENDING_PHA/20170829/01 - Anagrafiche_MdS/create_anag_MdS.sql
/* ------------------------------------------------------------------------------------------------ */
/* -- TABELLE DI ANAGRAFICA DEL MINISTERO DELLA SALUTE (IMPORT CON PERMALINK DA WEB S... |
CREATE TABLE `FilePrefixes` (
`Prefix` VARCHAR(128) NOT NULL COLLATE 'utf8_general_ci',
`PrimarySchema` VARCHAR(128) NOT NULL COLLATE 'utf8_general_ci',
`EventType` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
`MinDate` DATE NOT NULL,
`MaxDate` DATE NOT NULL
)
COLLATE='utf8_general_ci'
ENGINE=Inn... |
-- product_category(category_type) -> product_info(product_id) -> order_detail(order_id) -> order_master(buyer_openid) -> seller_info
create table `migrate_log` (
`id` int not null auto_increment,
`migrate_type` tinyint not null comment 'MIGRATE(1)/BACK(2)',
`migrate_status` tinyint not null comment 'SELECT... |
<filename>springboot-shiro-demo/db/db.sql
CREATE DATABASE shiro_demo;
USE shiro_demo;
-- 用户表
CREATE TABLE t_user (
id BIGINT(16) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(128) NOT NULL,
`password` VARCHAR(128) NOT NULL,
PRIMARY KEY(id)
);
-- 用户token表
CREATE TABLE t_user_token (
id BIGINT(16) NOT NULL AUTO_INCR... |
<reponame>kironezhengyu/Corkboard
CREATE VIEW `corkboard`.`post_view` AS
SELECT post.postId, post.topic, message.messageId as messageId, message.userName AS user_commenting, post.userName AS user_op, nickname, message.ts, content, num_likes-1 as num_likes, link
FROM post, message, user, post_likes, attachment
WHERE pos... |
------------------START------------------
CREATE TABLE egadtax_agency (
id bigint NOT NULL,
code character varying(50) NOT NULL,
name character varying(250) NOT NULL,
ssid character varying(50),
emailid character varying(100),
mobilenumber character varying(10) NOT NULL,
address character v... |
CREATE OR REPLACE FUNCTION page_is_modal(
p_app_id NUMBER,
p_page_id NUMBER)
RETURN boolean
AS
l_page_is_modal NUMBER;
BEGIN
SELECT 1
INTO l_page_is_modal
FROM apex_application_pages
WHERE application_id = p_app_id
AND page_id = p_page_id
AND page_mode = ... |
-- IFS-4662
-- reference data should be identical in all environments
SET @none_sector_id = 66;
SET @none_area_id = 67;
INSERT INTO category (id, name, type, parent_id, description, priority)
VALUES (@none_sector_id, 'None', 'INNOVATION_SECTOR', NULL, NULL, -1),
(@none_area_id, 'None', 'INN... |
SELECT *
FROM schedule_2018
WHERE GameNum = 2
INTO OUTFILE '/Users/briangoodwin/Documents/nfl_fantasyFootball_statHuzzah/data/games.csv';
-- FIELDS TERMINATED BY ','
-- ENCLOSED BY '"'
-- LINES TERMINATED BY '\n'; |
insert into bdot_buildings_all_new (
powiat,
lokalnyid,
status_bdot,
kategoria_bdot,
funkcja_ogolna_budynku,
funkcja_szczegolowa_budynku,
aktualnosc_geometrii,
aktualnosc_atrybutow,
building,
amenity,
man_made,
leisure,
historic,
tourism,
building_levels,
... |
<reponame>ministryofjustice/prison-api
INSERT INTO OFFENDER_VSC_SENT_CALCULATIONS (OFFENDER_SENT_CALCULATION_ID,OFFENDER_BOOK_ID,CALCULATION_DATE,CALC_REASON_CODE,COMMENT_TEXT)
VALUES (-1,-1,TIMESTAMP '2001-01-01 00:00:00.000000','ADJUST','Some Comment Text');
|
-- file:rules.sql ln:450 expect:true
insert into rtest_view2 values (5)
|
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table affiliated (
affiliated_id bigint auto_increment not null,
bruker_username varchar(255),
event_event_id bigint,
alarm_time time... |
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-- See the LICENSE and NOTICES files in the project root for more information.
PRINT N'Creating primary key [StudentIdentificatio... |
-- MySQL Script generated by MySQL Workbench
-- Mon May 28 14:58:32 2018
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR... |
<filename>src/main/java/jkami/demo/dao/sql/IUserOrderDao/insertOrders.sql
<#list orders as os>
insert into tb_user_order(name,user_id,create_date) values('${os.name}',${os.user.id!os.userId},'${os.createDate?string("yyyy-MM-dd HH:mm:ss")}');
</#list> |
<reponame>viswaratha12/dbwarden<filename>DMS5/V_Experiment_Plex_Members_TSV_Entry.sql
/****** Object: View [dbo].[V_Experiment_Plex_Members_TSV_Entry] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[V_Experiment_Plex_Members_TSV_Entry]
As
SELECT ExpIDPivotQ.Plex_Exp_ID As Exp_ID,
... |
<filename>Arch(.NetCore)/Bhbk.Mssql.Identity/svc/Views/uvw_Refresh.sql
CREATE VIEW [svc].[uvw_Refresh]
AS
SELECT
Id
,IssuerId
,AudienceId
,UserId
,RefreshValue
,RefreshType
,ValidFromUtc
,ValidToUtc
,IssuedUtc
FROM
[dbo].[tbl_Refresh] |
<filename>sql/_06_manipulation/_01_select/_018_range_compare/cases/1002.sql
--[er]test comparison operator using two different types
create class DML_0001
( int_col integer,
var_col varchar(20),
set_col set (int, varchar(10)) );
insert into DML_0001 values (1,'test1', {1,'test1'});
insert into DML_0001 values (2,'tes... |
alter table FloatResultHarnessed modify column value float after name;
alter table FloatResultManual modify column value float after name;
alter table Hardware drop remarks;
alter table Process add hardwareTypeId int DEFAULT NULL COMMENT 'deprecated field';
alter table Process add key fk40 (hardwareTypeId);
alter tab... |
-- For now make all items resell able which are trade able
-- See Include/AB/Entities/Item.h for ItemFlag's
UPDATE public.game_items SET item_flags = item_flags | 16 WHERE item_flags & 4 = 4;
UPDATE public.versions SET value = value + 1 WHERE name = 'game_items';
UPDATE public.versions SET value = 19 WHERE name = 's... |
use master;
set quoted_identifier off;
IF OBJECT_ID('tempdb..#database_files_temp') IS NOT NULL
DROP TABLE #database_files_temp;
CREATE TABLE #database_files_temp
(
[ComputerName] [sql_variant] NULL,
[db_name] [nvarchar](128) NULL,
[type_desc] [nvarchar](60) NULL,
[file_group] [sysname] NULL,
[name]... |
<reponame>taherm/ideasowners
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 18, 2018 at 08:24 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
<reponame>lewisblackburn/tweetah
/*
Warnings:
- You are about to drop the column `image` on the `Tweet` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "Tweet" DROP COLUMN "image",
ADD COLUMN "images" TEXT[];
-- CreateTable
CREATE TABLE "Retweet" (
"tweetId" INTEGER NOT NULL,... |
INSERT INTO DivisionPersonnel ( RcCode, DivisionName, EmployeeId, LastName, FirstName, JobTitle, Grade, Step, HireDate, LastIncrease, GradeEntry, StepEntry, WigiDueDate, Tenure, HrOrgName, Email, MailCode, PhoneNumber, Office, SupervisorId, SupervisorLastName, SupervisorFirstName, Supervisor )
SELECT DISTINCT Employees... |
<filename>jet/1_sql_growth_calculation.sql<gh_stars>0
-- https://sqliteonline.com/
/*
Given a posts table that contains a created_at timestamp column write a query that returns a first date of the month, a number of posts created in a given month and a month-over-month growth rate.
The resulting set should be ordered ... |
<gh_stars>0
drop function if exists sa_id();
create function sa_id() returns uuid as $$
begin
return '6c6cc02e-cca6-451d-9928-1f4d898c838e';
end;
$$ language plpgsql;
drop type if exists user_status cascade;
create type user_status as enum(
'new',
'active',
'inactive',
'deleted'
);
drop table if e... |
<gh_stars>1-10
// @author <NAME> (minor modifications)
// This Cypher Query Language (CQL) Script is for
// loading the definitions for UMLS Predicates,
// based on Predicate name matching
//
// See http://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-12-486
//
// The script uses the CSV loader func... |
<filename>db_book_reviewer.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 04, 2020 at 05:06 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!401... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 13, 2021 at 07:50 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
CREATE TABLE [dbo].[GeneralLedgerSetting] (
[Id] [int] NOT NULL
IDENTITY (1,1),
[CompanyId] [int] NULL,
[PayableAccountId] [int] NULL,
[PurchaseDiscountAccountId] [int] NULL,
[GoodsReceiptNoteClearingAccountId] [int] NULL,
[SalesDiscountAccountId] [int] NULL,
[ShippingChargeAccountId] [int] N... |
<gh_stars>0
CREATE SCHEMA [alert]
|
<filename>server/migrations/default/1649411170772_alter_table_public_post_alter_column_content/up.sql<gh_stars>0
alter table "public"."post" rename column "content" to "url";
|
<reponame>shakilakhtar/pro-apache-phoenix
CREATE TABLE IF NOT EXISTS CUSTOMER (
CUST_ID BIGINT NOT NULL,
FNAME VARCHAR(50),
LNAME VARCHAR(50),
DOB DATE,
CITY VARCHAR(30),
STATE VARCHAR(50) CONSTRAINT PK PRIMARY KEY (CUST_ID)
)
|
CREATE TABLE [dbo].[Community_ParentList]
(
[CM_ID] [int] NOT NULL,
[Parent_CM_ID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Community_ParentList] ADD CONSTRAINT [PK_Community_ParentList] PRIMARY KEY CLUSTERED ([CM_ID], [Parent_CM_ID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_Community_ParentList_CMIDIn... |
CREATE TABLE properties (
name VARCHAR(64) NOT NULL,
type INT NOT NULL,
modified_time BIGINT NOT NULL,
value VARCHAR(256),
PRIMARY KEY (name, type)
); |
select vpc_endpoint_id, title, akas, tags, tags_src
from aws.aws_vpc_endpoint
where vpc_endpoint_id = '{{ output.resource_id.value }}'
|
-- phpMyAdmin SQL Dump
-- version 3.4.10.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Erstellungszeit: 22. Mrz 2013 um 13:42
-- Server Version: 5.5.29
-- PHP-Version: 5.3.10-1ubuntu3.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
DROP TRIGGER trigger_name ON table_name;
|
<reponame>Zhaojia2019/cubrid-testcases
-- create class and add superclass and adding attribute having same sttribute name and same type and then drop superclass
create class employee
(emp_id integer,
emp_name string);
create class manager
(emp_id1 integer
);
alter class employee
add SUPERCLASS manager;
ALTER cla... |
create or replace package body df_qbe_roof
is
function new (
object_id in df_qbe_roofs.object_id%TYPE default null,
object_type in acs_objects.object_type%TYPE default 'df_qbe_roof',
creation_date in acs_objects.creation_date%TYPE default sysdate,
... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 09, 2018 at 05:15 PM
-- Server version: 5.6.34-log
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
create table ls_trail_class_channel(
id int auto_increment primary key comment "ID",
channel_name varchar(255) comment '渠道名称',
create_time int default 0 comment '添加时间',
update_time int default 0 comment '修改时间',
delete_flag tinyint default 2 comment '删除标识1删除2未删除'
)engine=innodb,charset=utf8,comment '... |
<filename>rsrcs/sql/public_iso_3166_countries.sql
-- Activisu a plus d'info. Necessaire? C'est pas très toolkit way of life. A changer un jour
ALTER TABLE "public"."iso_3166_countries"
ADD COLUMN "country_code_old" VARCHAR(10);
ALTER TABLE "public"."iso_3166_countries"
ADD COLUMN "en-us" VARCHAR(50);
/... |
<filename>docs/examples/chat-storage-mysql/schemas/mysql/chat_messages.sql
CREATE TABLE messages (
id INT AUTO_INCREMENT PRIMARY KEY,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
username TEXT NOT NULL,
text TEXT NOT NULL
);
|
drop table if exists tt;
create table tt (
id int not null primary key
);
/* {{ down }}
drop table if exists tt;
/**/
|
<reponame>srph/e-dental-re<gh_stars>0
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users`(
id INT(9) PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
first_name VARCHAR(255),
middle_name VARCHAR(255),
last_name VARCHAR(255),
address VARCHAR(255),
birthdate TIMESTAMP,
i... |
<reponame>saldanhayg/SQL_SERVER-PERSISTINDO_RECUPERANDO_DOCUMENTOS_JSON
SELECT CustomFields FROM Application.People
WHERE Fullname = '<NAME>';
SELECT CustomFields,
JSON_MODIFY(CustomFields, '$.OtherLanguages', 'Greek') as NEW_JSON FROM Application.People
WHERE Fullname = '<NAME>';
SELECT CustomFields,
JSON_MODIFY(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.