text stringlengths 6 9.38M |
|---|
CREATE DATABASE chat;
USE chat;
CREATE TABLE messages (
/* Describe your table here.*/
id INT(15) AUTO_INCREMENT PRIMARY KEY,
text VARCHAR(255),
room VARCHAR(20),
user_id INT(15)
);
/* Create other tables and define schemas for them here! */
CREATE TABLE users (
id INT(15) AUTO_INCREMENT PRIMARY KEY,
u... |
prompt start of the script
set serveroutput on
prompt Inform which tablespace you want AUD$ table to reside in
accept tbs_name char prompt 'Enter tablespace name in uppercase > '
update dam_config_param$ set string_value='&tbs_name' where audit_trail_type#=1 and param_id=22;
commit;
prompt First Step: init cl... |
create database rede_social;
use rede_social;
create table usuario(
id_usuario int(20) not null auto_increment,
nome varchar(50) not null,
email varchar(50) not null,
senha varchar(30) not null,
img varchar(200) default 'src/profile_pic.png',
descricao varchar(500),
nome_escola varchar(50),
local_escola varchar(50),
lo... |
DROP DATABASE IF EXISTS helper_db;
CREATE DATABASE helper_db CHAR SET UTF8; |
-- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 27, 2016 at 11:34 AM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
SELECT name, id FROM Posts
WHERE notified = 'approved' AND seller_id = $1;
|
/*
Navicat Premium Data Transfer
Source Server : local
Source Server Type : MySQL
Source Server Version : 50725
Source Host : localhost:3306
Source Schema : elbf_prod
Target Server Type : MySQL
Target Server Version : 50725
File Encoding : 65001
Date: 25/11/2020 19:3... |
-- Adds price column
ALTER TABLE tastespuds.review ADD price FLOAT NOT NULL DEFAULT 0;
INSERT INTO tastespuds.db_version (version) VALUES ('{1,2,0}');
|
EXEC procLoadServiceTicketHistory '20180601' |
INSERT INTO field_operator_hst VALUES ('ALBUSKJELL',
'Phillips Petroleum Company Norway',
'1975-04-25',
'2002-10-22',
43437,
694,
'9999-12-31',
'2013-05-08');
INSERT INTO field_operator_hst VALUES
('ALBUSKJELL',
'Phillips Petroleum Norsk AS',
'2003-03-05',
'2003-05-05',
43437,
705,
'9999-12-31',
'2013-05... |
DROP TABLE IF EXISTS `XXX_plugin_skriptor`; ##b_dump##
|
SELECT
TOP 1
C.*,
B.CONTACT_KEY
FROM
PROCESS_NODE_STATUS B,
PROCESS_TYPE_MST C
WHERE
B.PROCESS_NO = CAST(/*processNo*/ AS CHAR(10))
AND B.PROCESS_TYPE = C.PROCESS_TYPE |
CREATE TABLE Pessoa ( CPF varchar2(17),
Nome varchar2(30) NOT NULL,
DataNasc date NOT NULL,
Endereco varchar2(30) NOT NULL,
Numero number(7) NOT NULL,
Bairro varchar2(30) NOT NULL,
Cidade varchar2(30) NOT NULL,
Es... |
-- Creates a table force_name table in the current database,
-- do nothing if the force_name table already exists.
CREATE TABLE IF NOT EXISTS `force_name` (
`id` INT,
`name` VARCHAR(256) NOT NULL
);
|
-- This script is the core DDL for mifos platform
-- Its includes tables related to lookup/reference data, user administration, organisation modeling, client and loans
-- and infrastructure tables needed for 'additional data' and 'screen based reporting' functionality.
-- It does not include DDL customisations needed ... |
-- Creating seed data for the burgers_db database --
INSERT INTO burgers (burger_name, devoured) VALUES ('Mushroom swiss burger', false);
INSERT INTO burgers (burger_name, devoured) VALUES ('Bacon Avocado Burger', false);
INSERT INTO burgers (burger_name, devoured) VALUES ('Chicken Burger', false);
INSERT INTO burgers... |
update anbar
set anbar.national_id=str(namefamily.NationalCode) , anbar.address='951106'
from anbar left join namefamily on
( Anbar.fname=namefamily.Name
and Anbar.family=namefamily.Family)
or
(CONCAT(namefamily.Name,namefamily.Family)=Anbar.fname)
or
(CONCAT(namefamily.Name,' ',namefamily.Family)=Anbar.fname)
or
... |
-- 테이블 생성
-- grade 생성
CREATE TABLE grade (
num int(5) PRIMARY KEY, -- ; // 학번, PK
kor int(3), -- ; // 국어점수
eng int(3), -- ; // 영어점수
math int(3), -- ; // 수학점수
total int(5),-- ; // 총점
avg int(3) -- ; // 평균
)
-- 테이블 확인
DESC grade
-- 테스트 데이터를 입력
-- 칼럼의 일부만 데이터로 채울경우
-- table(칼럼리스트) 형식으로 표현해야 한다.
INSERT INTO gr... |
-- -----------------------------------------------------
-- Table `dbo`.`Inventory`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `dbo`.`Inventory` ;
CREATE TABLE IF NOT EXISTS `dbo`.`Inventory` (
`playerId` INT(11) NOT NULL ,
`itemId` INT(11) NOT NULL ,
`quantity` INT(11) NULL... |
IF NOT EXISTS(SELECT 1 FROM sys.tables WHERE name = 'Expense')
begin
CREATE TABLE Expense(
[ExpenseId] [uniqueidentifier] NOT NULL,
[ExpenseType] [tinyint] NOT NULL,
[Value] [decimal](9, 2) NOT NULL,
[ExpenseDate] [datetime] NOT NULL,
[ExpenseRecipientId] [uniqueidentifier] NULL,
[ExpenseCategoryId] [int]... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 07, 2021 at 01:24 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";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
-- Created by Vertabelo (http://vertabelo.com)
-- Last modification date: 2019-04-05 09:04:30.462
-- tables
-- Table: _ACCOUNT
CREATE TABLE _ACCOUNT (
id integer NOT NULL CONSTRAINT _ACCOUNT_pk PRIMARY KEY,
login text NOT NULL,
password text NOT NULL,
is_admin boolean NOT NULL
);
-- Table: _BROKER
CRE... |
INSERT INTO burgers (burger_name) VALUES ("New Bacon-ings Burger");
INSERT INTO burgers (burger_name) VALUES ("Olive and Let Die Burger");
INSERT INTO burgers (burger_name, devoured) VALUES ("Girls Just Want to Have Fennel Burger", true);
INSERT INTO burgers (burger_name) VALUES ("Bruschetta Bout It Burger");
INSERT IN... |
/* Formatted on 21/07/2014 18:31:23 (QP5 v5.227.12220.39754) */
CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_CL_CONTROLLI_PUNTO8_
(
STATO,
CONTEGGIO
)
AS
SELECT a.stato, a.conteggio
FROM t_mcre0_cl_controlli a
WHERE a.id_controllo =
(SELECT MAX (id_controllo) FROM t_mcre0_cl_controlli)... |
#
# Table structure for table 'tx_adgooglemaps_domain_model_layer'
#
CREATE TABLE tx_adgooglemaps_domain_model_layer (
tx_adgooglemapspluginfeuser_feusers int(11) unsigned DEFAULT '0' NOT NULL,
tx_adgooglemapspluginfeuser_fegroups int(11) unsigned DEFAULT '0' NOT NULL,
);
#
# Table structure for table 'tx_adgooglem... |
DROP TABLE IF EXISTS `XXX_papoo_flexint_flexinttabelle`; ##b_dump##
CREATE TABLE `XXX_papoo_flexint_flexinttabelle` (
`flexint_id` int(11) NOT NULL auto_increment ,
`flexint_zahl` int(11) NULL ,
`flexint_name` text NULL ,
`flexint_unterverzeichnis` text NULL ,
`flexint_url` text NULL ,
`flexint_url_sans` te... |
#sql("getUserRecord")
select * from user where userId = #para(userId);
#end
#sql("updateUserPortrait")
update user
set portraitFileName = #para(portraitFileName)
where userId = #para(userId)
#end
|
select regexp_replace('flgjlf4444dgdfgfgf','\d' , '-') from dual;
select regexp_substr('Hellow My Name is sql', ' [^ ]+ ') from dual;
select regexp_substr(' Hello 10 Name is sql', '\s([a-zA-Z]+)\s') from dual;
select regexp_count('flgjlf4444dgdfgfgf','\D') from dual; -- \D for non numeric characters
|
UPDATE exercise_goals
SET progress = progress + $3,
logged_today = true,
log_value = $2,
last_log = $4
WHERE goalid = $1; |
CREATE PROCEDURE [ERP].[Usp_Sel_TransformacionDestinoDetalle_By_IdTransformacion] --121
@IdTransformacion INT
AS
BEGIN
SELECT
TDD.ID,
TDD.IdTransformacion,
TDD.IdProducto,
TDD.Fecha,
CONVERT(VARCHAR(10), TDD.Fecha, 103) AS FechaStr,
ISNULL(TDD.Lote, VD.NumeroLote) AS Lote,
TDD.FlagAfecto,
TDD.Cantidad... |
INSERT INTO Organisation (ORGANISATION_ID,RES_DELETED,RES_CREATED,RES_MESSAGE_REF,RES_UPDATED,active,ENT_NAME,partOf,TYPE_CONCEPT_ID)
VALUES (200000,NULL,NULL,NULL,NULL,NULL,'Malton GP Practice',null,87);
INSERT INTO Organisation (ORGANISATION_ID,RES_DELETED,RES_CREATED,RES_MESSAGE_REF,RES_UPDATED,active,ENT_NAME,partO... |
CREATE TABLE IF NOT EXISTS `users_special_privs` (
`iSpecialID` INT NOT NULL AUTO_INCREMENT,
`cAllowed` VARCHAR(50) NOT NULL,
`iUserID` INT NOT NULL,
PRIMARY KEY (`iSpecialID`),
INDEX (`iUserID`)
); |
SELECT A.ReciboHonorarioID,
A.ProveedorID,
A.Serie,
A.Numero
FROM TB_ReciboHonorario AS A;
|
CREATE TABLE `ijerts`.`queries` (
`QueryId` int(11) NOT NULL AUTO_INCREMENT,
`FirstName` varchar(255) DEFAULT NULL,
`LastName` varchar(255) DEFAULT NULL,
`Email` varchar(255) DEFAULT NULL,
`QueryText` varchar(1000) DEFAULT NULL,
`QueryAnswer` varchar(1000) DEFAULT NULL,
`QueryStatus` varchar(500) DEFAULT... |
-- Update the name for the ClosureType property
UPDATE "DisplayProperties"
SET "Value" = 'Closure status'
WHERE "PropertyName" = 'ClosureType' AND "Attribute" = 'Name';
COMMIT;
|
CREATE TABLE IF NOT EXISTS TB_PROVIDER (
ID BIGSERIAL PRIMARY KEY NOT NULL,
NAME CHARACTER VARYING(255) NOT NULL,
CNPJ CHARACTER VARYING(18) NOT NULL,
PHONE CHARACTER VARYING(14) NOT NULL,
CELL_PHONE CHARACTER VARYING(15),
PUBLIC_PLACE CHARACTER VARYING(255) NOT NULL,
NUMBER BIGINT NOT NULL,... |
ALTER TABLE Item_produto ADD (pco_unit NUMBER(6, 2));
/*
Exercicio 5
*/
UPDATE Cliente
SET cep = '18035-400'
WHERE cidade = 'Sorocaba';
/*
Exercicio 6
*/
UPDATE Pedido
SET prazo_entrega = prazo_entrega + 10
WHERE cod_cliente = 1;
/*
Exercicio 7
*/
UPDATE Produto
SET valor_unitario = valor_unitario * 1.1
WHERE ... |
.headers on
.nullvalue '-null-'
.mode csv
-- -- 01
SELECT * FROM Person WHERE id = 'dyer'
UNION
SELECT * FROM Person WHERE id = 'roe';
|
CREATE PROC SelectProperty
@ID int
AS
BEGIN
SELECT *
FROM Properties
WHERE ID = @ID
END; |
.ifndef INCLUDED_CYFITTERGNU_INC
.set INCLUDED_CYFITTERGNU_INC, 1
.include "cydevicegnu.inc"
.include "cydevicegnu_trm.inc"
/* LCD_LCDPort */
.set LCD_LCDPort__0__INTTYPE, CYREG_PICU2_INTTYPE0
.set LCD_LCDPort__0__MASK, 0x01
.set LCD_LCDPort__0__PC, CYREG_PRT2_PC0
.set LCD_LCDPort__0__PORT, 2
.set LCD_LCDPort__0__SHIF... |
/*
* SmoothPHP
* This file is part of the SmoothPHP project.
* **********
* Copyright © 2015-2020
* License: https://github.com/Ikkerens/SmoothPHP/blob/master/License.md
* **********
* permissions.pg.query.sql
*/
SELECT "permission" FROM "permissions" WHERE "userId" = %d AND "permission" IS NOT NULL
UNION DIST... |
SELECT Content, CreatedOn FROM Answers
WHERE CreatedOn >= '2012-06-15 00:00:00' AND CreatedOn <= '2013-05-22'
ORDER BY CreatedOn |
sel
'CODA_ACCS_VIEWS.v_event_party' as table_name_in_full_long_xxxx, count (*) as count_N from
EDW_SCVER_CODA_ACCS_VIEWS.v_event_party where event_actual_dt > date '2015-01-01' and data_source_type_id in (1, 2, 11) and Event_Party_Role_Id = 1
union select
'BO_VIEWS.v_bo_base_track_data' as table_name_in_full_lo... |
-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.0.22-community-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CO... |
alter table PLAN
modify column ID INTEGER NOT NULL AUTO_INCREMENT;
alter table CUOTA
modify column ID INTEGER NOT NULL AUTO_INCREMENT;
alter table CUOTA_COBRO
modify column ID INTEGER NOT NULL AUTO_INCREMENT;
|
CREATE TABLE CARS (
id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
speed INTEGER NOT NULL
);
INSERT INTO CARS (speed) VALUES (100);
INSERT INTO CARS (speed) VALUES (150);
|
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mer. 04 sep. 2019 à 22:40
-- Version du serveur : 5.7.23
-- Version de PHP : 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
insert into produto (nome, descricao, valor) values ('Notebook Sansung', 'i3', '5000.00');
insert into produto (nome, descricao, valor) values ('Notebook Sansung', 'i5', '5000.00');
|
# Create Databases and Users for Laravel Instance
CREATE DATABASE IF NOT EXISTS `laravel` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER IF NOT EXISTS 'laravel'@'%' IDENTIFIED BY 'laravel';
CREATE USER IF NOT EXISTS 'laravel'@'localhost' IDENTIFIED BY 'laravel';
GRANT ALL PRIVILEGES ON `laravel`.* TO 'l... |
INSERT INTO CATEGORY(id) values (10)
|
/**
* SQL for update view shisetsu history
* @author BaoNQ4
* @version $Id: AddViewShisetsuHistoryService_updateViewShisetsuHistory_Upd_01.sql 7338 2014-06-23 07:57:40Z p_guen_bao01 $
*/
UPDATE
FR_CUSTOMER_VIEW_HISTORY
SET
VIEW_DATE =
/*viewDate*/'14-06-21'
,UPDATE_DATE =
/*u... |
/*
LIMIT schränkt die Anzahl der Datensätze in einem Result ein.
Wir nur eine Zahl angegeben, werden so viele Datensätze ab dem ersten
gefundenen zurück gegeben. Die Sortierung geschieht immer vor LIMIT
Werden zwei Zahlen angegeben, bestimmt die erste Zahl den offset, die zweite
die Anzhal der zu... |
insert into usr(username, email, password, firstName, lastName) values('DiogoViana', 'diogo.g.viana@gmail.com', '$2b$10$6Hv2yAbIART2X5wim8SuWO.xWkIR75ZYUmYwBZl5shXOcB1LykEqu','Diogo', 'Viana' )
insert into usr(username, email, password, firstName, lastName) values('CatarinaVaz', '40621@alunos.isel.ipl.pt', '$2b$10$6Hv2... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 31, 2020 at 06:18 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
-- Report run for Joanne Lauten. Data requested by NYSDOH for all code orange patients
-- for the time frame of January 1, 2012 - December 31, 2012
--************************************************************************************
-- Column Selection
SELECT
S_PATIENT_FULL_NAME AS 'PATIENT NAME', S_VISIT_IDE... |
drop table if exists users;
drop table if exists users_musictypes;
drop table if exists musictypes;
drop table if exists addresses;
drop table if exists roles;
create table roles (
id smallserial primary key,
name varchar(16) not null unique
);
insert into roles (name) values ('administrator'), ('moderator'), ... |
CREATE TABLE `link_place_mealtype` (
`IdMealTypes` int NOT NULL,
`IdPlace` int NOT NULL,
PRIMARY KEY (`IdMealTypes`,`IdPlace`),
KEY `IDX_caae41d660884467bf540d5ff1` (`IdMealTypes`),
KEY `IDX_ae7cd38d587d1b70e850a91057` (`IdPlace`),
CONSTRAINT `FK_ae7cd38d587d1b70e850a910574` FOREIGN KEY (`IdPlace`) REFERENC... |
USE [Corona-Ventilator-Database]
WHILE (1=1)
BEGIN
DELETE FROM Patient
END |
UPDATE Src.Products
SET ProductName = 'Product 2A', ListPrice = 0.25
WHERE ProductKey = 2
SELECT * FROM Src.Products
SELECT * FROM Src.ProductsHistory |
alter table REPORT_TEMPLATE add column OUTPUT_NAME_PATTERN varchar(255);
|
CREATE DATABASE scielo;
USE DATABASE scielo;
CREATE TABLE revistas (
rev_id INT(11) NOT NULL AUTO_INCREMENT,
rev_nome VARCHAR(100) NOT NULL,
rev_url VARCHAR(100) NOT NULL,
PRIMARY KEY (rev_id)
);
INSERT INTO revistas (rev_nome, rev_url)
VALUES ('Revista Brasileira de Ciências Sociais', 'http://www.sciel... |
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 100110
Source Host : localhost
Source Database : mipzhanquan
Target Server Type : MySQL
Target Server Version : 100110
File Encoding : utf-8
Date: 12/19/2017 0... |
/*
* Insert users
*/
/*
INSERT INTO user (id, picture_url, first_name, last_name, email) VALUES ('google-oauth2|106727652867909729138', 'https://lh3.googleusercontent.com/-azctrbSb2GI/AAAAAAAAAAI/AAAAAAAAAAA/ACHi3rf_FYFjDNR_tOPeHRs0BLh0o5bYRw/photo.jpg', 'Oskari', 'Forsblom', 'oskari.forsblom@gmail.com');
*/
/*
* In... |
CREATE PROCEDURE [tSQLt].[Private_ResetNewTestClassList]
AS
BEGIN
SET NOCOUNT ON;
DELETE FROM tSQLt.Private_NewTestClassList;
END;
|
SELECT a.*
, d.drg_name
, b.pay_cd
--, b.svc_date
--, b.pay_entry_Date
, c.actv_name
, b.pyr_cd
, SUM(b.tot_pay_adj_amt) as 'Recovr_Amt'
FROM smsdss.c_clin_appeals_v as a
LEFT OUTER JOIN smsmir.mir_pay as b
ON a.PtNumber = b.Pt_Id
AND a.reviewdtime <= b.pay_dtime
AND a.InsurancePlan = b.pyr_cd
LE... |
/*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 5.7.25-0ubuntu0.16.04.2 : Database - socNetwork
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OL... |
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgs... |
DROP TABLE IF EXISTS lessons;
DROP TABLE IF EXISTS categories;
CREATE TABLE categories (
category_id BIGINT PRIMARY KEY NOT NULL,
name_ VARCHAR(255) NOT NULL
);
CREATE TABLE lessons (
lesson_id BIGINT PRIMARY KEY NOT NULL,
title VARCHAR(255) NOT NULL,
description VARCHAR(4096) NOT NULL,
publi... |
load-file-type egg pandaegg
egg-object-type-portal <Scalar> portal { 1 }
egg-object-type-polylight <Scalar> polylight { 1 }
egg-object-type-seq24 <Switch> { 1 } <Scalar> fps { 24 }
egg-object-type-seq12 <Switch> { 1 } <Scalar> fps { 12 }
egg-object-type-indexed <Scalar> index... |
SELECT
--ファイル
RANK() OVER (ORDER BY HISTORY.SEQ_NO DESC) AS FILELINE,
--連番
HISTORY.SEQ_NO,
--zlw add 2013/12/17 start
BRANCH_MST.BRANCH_NAME,
--zlw add 2013/12/17 end
--案件情報コード
HISTORY.CASE_NO,
--案件情報
CASE_MST.CASES_NAME,
--請求処理区分コード
HISTORY.REQUEST_KBN,
--請求処理区分
CODE3.CODE_NAME AS REQUEST_KBN_NAME,
--一... |
UPDATE Payments
SET TaxRate -=0.03*TaxRate
SELECT TaxRate FROM Payments
TRUNCATE TABLE Occupancies |
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Feb 25, 2018 at 08:38 PM
-- Server version: 5.6.38
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `firstdatabase`
--
-- ----------------------... |
CREATE TYPE MedianGroup AS (
group_nr smallint,
row_count integer,
start_time int,
end_time int,
min_x double precision,
max_x double precision,
min_y double precision,
max_y double precision,
median double precision
); |
CREATE TABLE Users (
Id BIGINT PRIMARY KEY IDENTITY,
Username VARCHAR(30) UNIQUE NOT NULL,
[Password] VARCHAR(26) NOT NULL,
ProfilePicture VARBINARY(MAX),
CHECK(DATALENGTH(ProfilePicture) <= 921600),
LastLoginTime DATETIME2,
IsDeleted BIT
)
INSERT INTO Users
(Username, [Password], ProfilePicture, LastLoginTim... |
CREATE TABLE MCRE_OWN.TE_MCREI_POSMCI_DT
( PERIODO_RIF VARCHAR2(8 BYTE)
)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY "D_MCRE0_ITT"
ACCESS PARAMETERS
( RECORDS DELIMITED BY NEWLINE
STRING SIZES ARE IN BYTES
BADFILE 'D_MCRE0_BAD':'TE_MCREI_POSMCI_DT.bad'... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 23, 2021 at 03:32 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
INSERT INTO pgsodium.key (status, key_id, key_context, comment)
VALUES ('default', 1, 'pgsodium', 'This is the default key used for vault.secrets');
|
INSERT INTO oauth2_client ( id
, secret
, authorized_grant_types
, redirect_uri
, access_token_validity
, refresh_token_validity
, allowed_scope
... |
/**
* GET_SUGGESTION_INFO
* Batch ID: BTSL02
* @author: NgocVQ
* @version: $Id: SuggestAddressSolrIndexCreateService_iterateRecords_Sel_01.sql 22324 2014-08-21 09:29:36Z p_bu_gokku $
*/
WITH MCMA AS
(
SELECT
MCMATPM.TODOFUKEN_CD
,MCMATPM.SHIKUGUN_CD
,MCMATPM.OOAZA_CD
,MCMATPM.AZA_CD
... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 19, 2021 at 03:38 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
-- --------------------------------------------------------
--
-- Table structure for table `tbl_brands`
--
CREATE TABLE `tbl_brands` (
`brandID` int(11) NOT NULL,
`name` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `tbl_brands`
--
INSERT INTO `tbl_brands` (`brandI... |
--------------------------------------------------------
-- INSERT INTO for Table SISTEMA_ORIGEN
--------------------------------------------------------
INSERT INTO SISTEMA_ORIGEN (CDG_SISTEMA_ORIGEN, DSC_SISTEMA_ORIGEN, FCH_REGISTRO) VALUES ('1', 'ITM', TO_TIMESTAMP('2019-01-01 00:00:00.000000000', 'YYYY-MM-DD HH2... |
-- ********************************
-- SCRIPT FOR THE CREPERIE DATABASE
-- ********************************
-- create the database
DROP DATABASE IF EXISTS creperie;
CREATE DATABASE creperie;
-- select the database
USE creperie;
-- creating tables:
CREATE TABLE customers
(
-- FD customer_id function... |
select /*%expand*/*
from Entry
where url = /* url */'http://example.com'
|
CREATE TABLE comentario(
id INT PRIMARY KEY,
ordem_servico_id INT not null,
descricao varchar(1000) not null,
data_envio Timestamp with Time Zone not null
);
ALTER TABLE comentario add constraint fk_comentario_ordem_servico
foreign key (ordem_servico_id) references ordem_servico (id); |
-- delete table if it exists
drop table if exists bookmarks;
-- create the bookmarks table
create table bookmarks (
id INTEGER primary key generated by default as identity,
title VARCHAR(80) NOT NULL,
url VARCHAR(80) NOT NULL,
rating INTEGER default 3,
description VARCHAR(80)
);
-- insert data i... |
CREATE DATABASE 'syslog' DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE TABLE IF NOT EXISTS 'netfilter_logs' (
'id' bigint(20) unsigned NOT NULL auto_increment,
'host' varchar(128) collate utf8_unicode_ci default NULL,
'facility' varchar(10) collate utf8_unicode_ci default NULL,
'priority' v... |
CREATE TABLE groups (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
code SMALLINT UNSIGNED NOT NULL
);
CREATE TABLE users (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50) NOT NULL,
group_id ... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 25-07-2019 a las 05:53:03
-- Versión del servidor: 10.3.16-MariaDB
-- Versión de PHP: 7.1.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... |
create table users (
id serial primary key,
name text,
password text,
email text,
homepage text,
key text,
created_at timestamp,
updated_at timestamp
);
create table issues (
id serial primary key,
user_id integer,
parent_id integer,
name text,
description text,
sort integer,
created_at t... |
CREATE DATABASE IF NOT EXISTS logs DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
CREATE DATABASE IF NOT EXISTS realmd DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
CREATE DATABASE IF NOT EXISTS characters DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
CREATE DATABASE IF NOT EXISTS mangos DEFAULT CHARSET utf8 COLLATE utf... |
SELECT * from demo.sales_reps |
-- confusing condition added to the HAVING clause
SELECT
CategoryName
, SubcategoryName
, COUNT(*) as RecordCount
FROM #src
GROUP BY CategoryName, SubcategoryName
HAVING COUNT(*) >= 5 AND CategoryName != 'Clothing'
-- clearly writen query filtering records on right places
SELECT
CategoryName
, SubcategoryNam... |
CREATE TABLE document
(
"id" uuid PRIMARY KEY DEFAULT uuid_generate_v1(),
"created_at" timestamptz NOT NULL DEFAULT now(),
"updated_at" timestamptz NOT NULL DEFAULT now(),
"name" text NOT NULL,
"type" text NOT NULL,
"date" timestamptz NOT NULL,
"url" text NOT NULL,
"project_id" uuid,
"event_id" uuid
)... |
CREATE DATABASE `employee_directory` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
SELECT * FROM employee_directory.employee;
CREATE TABLE `employee` (
`id` int NOT NULL AUTO_INCREMENT,
`first_name` varchar(45) DEFAULT NULL,
`last_name` varchar(45) DEFA... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 29-12-2020 a las 02:20:57
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
SELECT *
FROM user join user_favorites on user_id
WHERE user_id=:id and pokemon_id=:pokemon_id
|
CREATE OR REPLACE VIEW project AS
SELECT ri.id,
ri.kind,
ri.type,
rit.key,
ri.origin,
ri.draft_creator,
ripc.project_data ->> 'code' AS code,
ripc.project_data ->> 'acronym' AS acronym,
ripc.project_data ->> 'title' ... |
select count(*)
from employees
group by to_char(hire_date, 'D')
order by to_char(hire_date, 'D');
|
select * from AGV_SupplyDetail
where Block='D12'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.