text stringlengths 6 9.38M |
|---|
# Host: 127.0.0.1 (Version: 5.5.5-10.0.18-MariaDB)
# Date: 2015-06-29 10:35:53
# Generator: MySQL-Front 5.3 (Build 4.156)
/*!40101 SET NAMES utf8 */;
#
# Structure for table "y2bg_article"
#
DROP TABLE IF EXISTS `y2bg_article`;
CREATE TABLE `y2bg_article` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT ... |
CREATE TABLE AsData_PL.[Va_LegalEntity]
(
LegalEntityId BIGINT IDENTITY(1,1) PRIMARY KEY
,LegalEntityPublicHashedId Varchar(256)
,EmployerId INT
,[EmployerAccountId] varchar(100)
,LegalEntityName Varchar(256)
,SourceLegalEntityId INT
,SourceDb varchar(100)
,[AsDm_UpdatedDateTime] [datetime2](7) ... |
delete from HtmlLabelIndex where id=21140
/
delete from HtmlLabelInfo where indexid=21140
/
INSERT INTO HtmlLabelIndex values(21140,'内粗边框背景图')
/
delete from HtmlLabelIndex where id=21139
/
delete from HtmlLabelInfo where indexid=21139
/
INSERT INTO HtmlLabelIndex values(21139,'外边框背景图')
/
delete from HtmlLabelInde... |
connect casteel/tiger
SET ECHO ON
START C:\DBM\webDB\webDB.sql
SPOOL C:\DBM\webDB\webDBO.txt
SPOOL OUT
|
DECLARE
v_id NUMBER;
v_errorcode NUMBER;
v_errormessage NVARCHAR2(255);
BEGIN
v_id := :Id;
:affectedRows := 0;
v_errorcode := 0;
v_errormessage := '';
--Input params check
IF v_id IS NULL
THEN
v_errormessage := 'Id can not be empty';
v_errorcode := 101;
... |
insert into greeting (greeted_name, greet_counter) values ('', 4);
insert into greeting (greeted_name, greet_counter) values ('', 2);
insert into greeting (greeted_name, greet_counter) values ('Rocky', 6);
insert into greeting (greeted_name, greet_counter) values ('Sox', 8);
insert into greeting (greeted_name, greet_co... |
-- phpMyAdmin SQL Dump
-- version 4.2.7
-- http://www.phpmyadmin.net
--
-- Host: localhost:8891
-- Generation Time: Feb 05, 2016 at 05:51 AM
-- Server version: 5.5.41-log
-- PHP Version: 7.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
-- MYSQL
SELECT NAME FROM CITY WHERE COUNTRYCODE = 'JPN' |
--drop table dispositivo
--drop table dispositivo
--drop table nivel
--drop table tipo_dispositivo
--drop table dispositivos_encendidos
--drop table propiedad
create table parametros (
prmt_id integer GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY
, prmt_nombre varchar(60) UNIQUE not null
, prm... |
-- Your SQL goes here
-- DROP TABLE ruts, items, collects, tags, etcs, users, tagruts, tagitems, tagetcs, staritems, starruts, startags; |
#CREATE DATABASE IF NOT EXISTS moviesinfo;
USE moviesinfo;
CREATE TABLE IF NOT EXISTS movies (
id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30),
INDEX(name)
) engine=InnoDB;
CREATE TABLE IF NOT EXISTS synopsis (
id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(80)... |
/* Mysql Homework No. 3 (12-Homework)*/
/* Connect to JOURDATA in MySQL Workbench, Then open this file in MySQL Workbench. Rename it Firstname-Lastname-12-SQL-Assignment-12.sql. Work in this file to answer the questions. */
/* Underneath each question below, create a new comment with the correct answer. Underneath the... |
select name,ifnull(sd,0) as travelled_distance
from( select user_id, sum(distance) as sd from rides group by 1) a
right join users on a.user_id = users.id
order by 2 desc, 1 asc
|
/*
Navicat Premium Data Transfer
Source Server : 172.0.01
Source Server Type : MySQL
Source Server Version : 100137
Source Host : localhost:3306
Source Schema : estate
Target Server Type : MySQL
Target Server Version : 100137
File Encoding : 65001
Date: 24/12/2018 10... |
--// table: AppProxySetting
create table [AppProxySetting] (
[Generation] integer not null /* 世代 最大のものを使用する */,
[CreatedTimestamp] datetime not null /* 作成タイムスタンプ UTC */,
[CreatedAccount] text not null /* 作成ユーザー名 */,
[CreatedProgramName] text not null /* 作成プログラム名 */,
[CreatedProgramVersion] text not null /*... |
create table todos(
id int not null primary key auto_increment,
content varchar(50),
done tinyint(1),
order int
);
|
CREATE SEQUENCE repo_sequence
start with 1
increment by 1;
|
delete from SystemRightDetail where rightid =1431
/
delete from SystemRightsLanguage where id =1431
/
delete from SystemRights where id =1431
/
insert into SystemRights (id,rightdesc,righttype) values (1431,'集成管理','7')
/
insert into SystemRightsLanguage (id,languageid,rightname,rightdesc) values (1431,8,'Integrated ma... |
-- BLOCK insert_course
INSERT INTO courses
(short_name, title, path)
VALUES ($short_name, $title, $path)
ON CONFLICT (short_name) DO UPDATE
SET
title = EXCLUDED.title,
path = EXCLUDED.path
RETURNING id AS course_id;
|
CREATE TABLE [TextMining].[Token1Gram] (
[TokenID] INT IDENTITY (1, 1) NOT NULL,
[TweetID] INT NULL,
[Token] NVARCHAR (500) NULL,
[TokenRootWord] NVARCHAR (500) NULL,
[IsEnglishWord] ... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 09, 2017 at 04:14 PM
-- 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_CLI... |
create or replace view stripe_analysis_invoices_transformed as (
select
mailship_subscriptions_transformed.company_id as company_id,
stripe_analysis_invoices_filtered.customer as customer,
(
timestamp 'epoch' + stripe_analysis_invoices_filtered.date * interval ... |
CREATE TABLE tilkjent_ytelse (
id BIGSERIAL primary key,
personIdent VARCHAR (20) unique,
saksnummer VARCHAR(50) unique,
stonad_fom TIMESTAMP(3),
stonad_tom ... |
REM listdemo.sql
REM Version 1.0, last updated 7/15/97
REM This package illustrates different kinds of HTML lists, as described in
REM Chapter 19 of _Oracle8 PL/SQL Programming_ by Scott Urman.
CREATE OR REPLACE PACKAGE ListDemo AS
PROCEDURE Go;
PROCEDURE ShowList(p_ListType IN CHAR);
END ListDemo;
/
C... |
DROP DATABASE IF EXISTS fusion;
|
alter table ACT_RU_EVENT_SUBSCR add LOCK_TIME_ datetime;
alter table ACT_RU_EVENT_SUBSCR add LOCK_OWNER_ nvarchar(255);
update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'eventsubscription.schema.version';
|
-- DROP PROCEDURE IF EXISTS temp.DM_Respond_Report_TU8_10;
-- CREATE PROCEDURE temp.`DM_Respond_Report_TU8_10`()
BEGIN
################TU8
Drop temporary table if exists temp.HB_info8;
Create temporary table if not exists temp.HB_info8 ( INDEX(affid) )
as (
select a.lead_sequence_id,
a.affid,
a.state,
a.netmonthly ... |
# Write your MySQL query statement below
DELETE p1
FROM Person AS p1,
Person AS p2
WHERE p1.Email = p2.Email
AND p1.ID > p2.ID;
|
INSERT INTO `languages` (`id`, `name`) VALUES
('DA', 'Dansk');
INSERT INTO `currencies` (`id`, `name`, `abbreviation`, `abbreviation_position`, `decimals`, `decimal_separator`, `grouping_separator`) VALUES
('DKK', 'Kroner (Denmark)', 'DKK', 'after', 2, ',', '.');
INSERT INTO `countries` (`id`, `name`, `phone_countr... |
/*
Queries
*/
/*
1.
Create a query that displays all customer orders highest to lowest orders (remember to include the customer’s name and address in the query).
*/
select orders.orderID, customer.customerFirstName, customer.customerLastName, customer.customerAddress, orders.orderTotal
from orders, customer
order b... |
CREATE TABLE banner (
id INT(11) NOT NULL AUTO_INCREMENT,
medium VARCHAR(50) NOTNULL,
zone VARCHAR(2),
subzone VARCHAR(10) DEFAULT '',
file VARCHAR(255),
link VARCHAR(255) DEFAULT '',
link_mode int(11) DEFAULT 0,
created_at DATETIME,
clicks INT(11) DEFAULT 0,
views INT(11) DEFAUL... |
USE DB;
DROP TABLE IF EXISTS reviews;
CREATE TABLE reviews(
entityId int NOT NULL IDENTITY(0030000,2), -- PRIMARY KEY,
--creationDate DATETIME,
--event Varchar(20), --example 192/168/1/1
username Varchar(50),
message TEXT, --
star int,
imagebuffer VARBINARY(MAX),
filepath VARCHAR(50),
datetime VARCHAR(50),
-- prim... |
--用户授权访问token备份表
CREATE TABLE user_authorization_bak
(
id BIGINT(11) PRIMARY KEY COMMENT '自增id' AUTO_INCREMENT,
scope VARCHAR(20) COMMENT '授权范围(用于区分如经纪版登录,案场管理后台登录等)',
user_id BIGINT(11) COMMENT '用户Id',
client_id CHAR(36) COMMENT 'ubt产生的clientId,唯一标示客户端',
access_token VARCHAR(64) COMMENT '... |
select
uc.UserId
,fu.Lastname
,fu.Firstname
,fu.Fathername
,fu.mobilephone
,fu.emailaddress
,ush.Status
from dbo.FrontendUsers fu
inner join dbo.UserCards uc on uc.UserId = fu.id
outer apply
(
select top 1
usk.Description as Status
from dbo.UserStatusHistory ush
inner joi... |
CREATE OR REPLACE PACKAGE pachet AS
PROCEDURE AplicaReduceri (
v_comerciant Comercianti.nume%TYPE
);
PROCEDURE TopProduse (
v_nota recenzii.nota%TYPE DEFAULT 1
);
FUNCTION CelMaiDeIncredere (
v_categ IN Categorii.id_categorie%TYPE
) RETURN VARCHAR2;
PROCEDURE CelM... |
drop table if exists dim_okved;
CREATE TABLE dim_okved (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'pk',
`code` varchar(16) NOT NULL COMMENT 'Код',
`name` varchar(512) NOT NULL COMMENT 'Наименование',
`additional_info` text,
`parent_id` int(11) DEFAULT NULL COMMENT 'Вышестоящий раздел',
`parent_code` var... |
CREATE TABLE portraits (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
artist TEXT,
medium TEXT,
image TEXT
);
INSERT INTO portraits (title, artist, medium) VALUES ('Guardian', 'Santos', 'Oil on Linen');
INSERT INTO portraits (title, artist, medium) VALUES ('Glannina', 'Santos', 'Oil on Linen'... |
update
PluginLauncherItemSettings
set
DataType = @DataType,
DataValue = @DataValue,
UpdatedTimestamp = @UpdatedTimestamp,
UpdatedAccount = @UpdatedAccount,
UpdatedProgramName = @UpdatedProgramName,
UpdatedProgramVersion = @UpdatedProgramVersion,
UpdatedCount = UpdatedCount + ... |
CREATE TABLE [AsData_PL].[Va_CandidateInfo]
(
[CDId] BIGINT NOT NULL IDENTITY(1,1) PRIMARY KEY
,[SourceCandidateId_v1] Varchar(256)
,[SourceCandidateId_v2] Varchar(256)
,[Gender] nvarchar(50)
,[DisabilityStatus] nvarchar(255)
,[InstitutionName] nvarchar(max)
,[SourceDb] Varchar(256)
,[AsDm_Updated... |
-- 매입매출관리
-- 상품정보 제2정규화 작업
|
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS roles;
CREATE TABLE roles (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(100) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE users (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL,
role_i... |
update
LauncherGroups
set
Name = @Name,
ImageName = @ImageName,
ImageColor = @ImageColor,
Sequence = @Sequence,
UpdatedTimestamp = @UpdatedTimestamp,
UpdatedAccount = @UpdatedAccount,
UpdatedProgramName = @UpdatedProgramName,
UpdatedProgramVersion = @UpdatedProgramVersio... |
CREATE TABLE IF NOT EXISTS tNodeEquipment2Unit
(
vNECode VARCHAR(20) NOT NULL,
iUnitId BIGINT NOT NULL,
dtAssociateTime DATETIME NOT NULL,
PRIMARY KEY(vNECode, iUnitId),
FOREIGN KEY(vNECode) REFERENCES tNodeEquipmentList(vCode) ON DELETE CASCADE,
FOREIGN KEY(iUnitId) REFERENCES tUnitList(iId) ON DELETE ... |
drop table if exists tmp.subscriptions_tmp;
create table tmp.subscriptions_tmp as
select b.*,
-- first attempt at "un-overlapping". If two subscriptions just butt up against each
-- other (e.g. plan changes) this will be sufficient.
case when (start_date,cancel_date) overlaps (next_start, next_en... |
DROP VIEW creditMemoEditList;
CREATE VIEW creditMemoEditList AS
SELECT cmhead_id AS orderid, -2 AS itemid,
('C/M-' || formatCreditMemoNumber(cmhead_id)) AS documentnumber,
cust_number,
cmhead_billtoname AS billtoname,
cmhead_number::TEXT AS ordernumber, -1 AS linenumb... |
-- This fixes the badly nested geometry that's in the shapefiles
select substring(supplemental_id, 3, 3) as county , st_union(geom) into temp_county from redistricting_geounit where geolevel_id = 1 group by county;
update redistricting_geounit set geom = st_multi(st_union), simple = ST_MULTI(ST_SIMPLIFYPRESERVETOPOLO... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 27, 2021 at 08:05 PM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 7.3.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
delete from HtmlLabelIndex where id=27365
/
delete from HtmlLabelInfo where indexid=27365
/
INSERT INTO HtmlLabelIndex values(27365,'单选收(发)文单位')
/
INSERT INTO HtmlLabelInfo VALUES(27365,'单选收(发)文单位',7)
/
INSERT INTO HtmlLabelInfo VALUES(27365,'Radio receive (send) text units',8)
/
INSERT INTO HtmlLabelInfo VALUES(2... |
--物料凭证数据恢复
insert into sto_material_document
(id,
org_id,
property_transfer_id,
sap_no,
tf_order_id,
tf_order_no,
tf_order_detail_id,
tf_notice_order_id,
tf_notice_order_no,
tf_notice_order_detail_id,
job_id,
related_job_id,
tf_job_type,
inv_id,
batch_no,
stock_status,
... |
DROP DATABASE CHATINC;
CREATE DATABASE CHATINC;
CREATE TABLE CHATINC.HOME (
I_HOME INT NOT NULL AUTO_INCREMENT,
BUILDNUMBER VARCHAR(30) NOT NULL,
PRIMARY KEY(I_HOME)
);
CREATE TABLE CHATINC.COUNTRY (
I_COUNTRY INT NOT NULL,
NAME VARCHAR(256) NOT NULL,
TELCODE VARCHAR(10) NOT NULL,
PRIMARY KEY(I_... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Lun 30 Avril 2018 à 19:56
-- Version du serveur : 5.6.17
-- Version de PHP : 7.2.4
SET FOREIGN_KEY_CHECKS=0;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_... |
/* ------------------------------------------------------------------------- */
CREATE OR REPLACE FUNCTION epoch2timestamp(a_epoch INTEGER DEFAULT 0) RETURNS TIMESTAMP IMMUTABLE LANGUAGE 'sql' AS
$_$
-- a_epoch: количество секунд
SELECT CASE
WHEN $1 = 0 THEN NULL
ELSE timezone(
(SELECT setting FROM pg_setting... |
ALTER TABLE `usuarios` ADD `estado_usuario` ENUM( 'activo', 'inactivo' ) NOT NULL AFTER `apellido2`
|
create or replace procedure SMS_ARCHIVING is
i integer;
begin
-- Архивирование записей в таблице MESSAGES (по умолч старше 1 мес.)
INSERT INTO archive_message SELECT * FROM messages t WHERE t.created_at < sysdate-30;
DELETE FROM messages t WHERE t.created_at < sysdate-30;
-- Чистка архива (по умолч... |
CREATE USER zika_user WITH ENCRYPTED PASSWORD 'zikapass';
ALTER USER zika_user WITH SUPERUSER;
|
--join
create table client(
id varchar2(20) primary key,
password varchar2(30) not null,
email varchar2(100) not null,
name varchar2(30) not null,
phone varchar2(50) not null,
address varchar2(200) not null,
gender varchar2(10),
birth varchar2(20)
);
-----------------------------------------------------------... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLL... |
DELETE FROM Download;
INSERT INTO Download ([DownloadID], [ReleaseID], [Location]) VALUES (1, 4, '/downloads/a')
INSERT INTO Download ([DownloadID], [ReleaseID], [Location]) VALUES (2, 5, '/downloads/b') |
drop table if exists oauth_client_details;
create table oauth_client_details (
client_id VARCHAR(255) PRIMARY KEY,
resource_ids VARCHAR(255),
client_secret VARCHAR(255),
scope VARCHAR(255),
authorized_grant_types VARCHAR(255),
web_server_redirect_uri VARCHAR(255),
authorities VARCHAR(255),
access_token_... |
create database IF NOT EXISTS hairshop;
use hairshop;
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `cart_item`;
CREATE TABLE `cart_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_product` varchar(30) DEFAULT NULL,
`id_shoppi... |
--
-- Table, procedure and event definitions dumped from production db when last strata.server.db delta was 263.sql
--
--
-- The place holder $MAINDB$ must be replaced with the main database name before this script is executed.
-- The procedure testForMainDBReplacement, checks that this replacement has happen, if not ... |
use classicmodels;
CREATE VIEW product_view AS
SELECT productCode,productName,productDescription
FROM products;
SELECT * FROM product_view;
CREATE OR REPLACE VIEW product_view AS
SELECT productCode,productName,productVendor,buyPrice
FROM products
WHERE productScale ='1:10';
SELECT * FROM product_view; |
select count(IdTipo) from INCIDENCIA where IdTipo = 'Caldera FuelOil'
|
DROP TABLE IF EXISTS CLI;
DROP TABLE IF EXISTS COM;
DROP TABLE IF EXISTS DET;
DROP TABLE IF EXISTS PROD;
CREATE TABLE CLI(
CodeCli int(5) CONSTRAINT PK_Cli PRIMARY KEY,
NomCli char(20),
Pays char(20),
Tel char(15)
);
CREATE TABLE COM(
NumCom int(5) CONSTRAINT PK_Com PRIMARY KEY,
NumCli int(5) ... |
DROP TABLE [wwi].[SampleData];
CREATE TABLE [wwi].[SampleData]
(
[customerkey] REAL,
[stockitemkey] REAL
);
INSERT INTO [wwi].[SampleData] ([customerkey], [stockitemkey])
VALUES ( 11, 1 );
SELECT * FROM [wwi].[SampleData];
CREATE TABLE [wwi].[SampleData]
(
[features] REAL,
[features2] REAL
)... |
CREATE TYPE highlights_tt AS TABLE(
highlight_id INT NULL
,phighlight_id INT NULL
,seq_no INT NULL
,highlight_name NVARCHAR(510) NULL
,highlight_desc VARCHAR(0) NULL
,is_active VARCHAR(1) NULL) |
SELECT
ACCESSION,
MAX(ACCESSION) AS ACCESSION,
MAX(DNA_SEQUENCE) AS DNA_SEQUENCE
FROM
CHROM8
GROUP BY
ACCESSION;
|
-- number of sold items for each item
SELECT i.name, sum(oi.quantity)
FROM items i INNER JOIN
order_items oi ON i.id = oi.item_id
GROUP BY i.name;
-- total number of orders for each customer
SELECT c.name, count(o.id)
FROM customers c INNER JOIN
orders o ON c.id = o.customer_id
GROUP BY c.name;
-- total numb... |
-- EXECUTE AS poke_owner
drop table pokemon;
create table pokemon (
pokemon_id number primary key,
name varchar2(50) not null unique,
description varchar2(255)
);
-- poke_reader
grant read on poke_owner.pokemon to poke_reader;
-- poke_api
grant select, insert, update, delete on poke_owner.pokemon to p... |
create procedure Accelerator.InsertTestResult
(
@Id int
, @Date datetime2
, @NumParticles int
, @AverageX decimal(10, 2)
, @AverageY decimal(10, 2)
, @NumColours int
, @HiggsBoson bit
)
as
begin
insert Accelerator.TestResults
(
[Id]
, [Date]
, [NumParticles]
, [AverageX]
... |
CREATE TABLESPACE platform_base DATAFILE '/usr/oracle/platform_base.ora' SIZE 1000M; |
CREATE UNIQUE INDEX idx_behandlinger_i_arbeid ON behandling (fagsak_id) WHERE (status <> 'FERDIGSTILT' AND status <> 'SATT_PÅ_VENT');
DROP INDEX behandlinger_i_arbeid; |
INSERT INTO Delegacion VALUES (1 , 1 ,'Aguascalientes');
INSERT INTO Delegacion VALUES (2 , 1 ,'Asientos');
INSERT INTO Delegacion VALUES (3 , 1 ,'Calvillo');
INSERT INTO Delegacion VALUES (4 , 1 ,'Cosío');
INSERT INTO Delegacion VALUES (5 , 1 ,'Jesús María');
INSERT INTO Delegacion... |
## 已更新到服务器 |
CREATE TABLE IF NOT EXISTS utilisateurs (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
pseudo varchar(255) NOT NULL,
password varchar(50) NOT NULL,
template varchar(255) NOT NULL,
nom varchar(255) NOT NULL,
promotion int(10) unsigned NOT NULL,
flags int(10) unsigned NOT NULL,
PRIMARY KEY (id),
... |
insert into ACT_GE_PROPERTY values ('common.schema.version', '6.2.0.0', 1); |
{{ config(materialized='view', alias='interest') }}
select
a.reserve,
t.symbol,
date_trunc('hour',a.evt_block_time) as hour,
avg(a.liquidityRate) / 1e27 as deposit_apy,
avg(a.stableBorrowRate) / 1e27 as stable_borrow_apy,
avg(a.variableBorrowRate) / 1e27 as variable_borrow_apy
from {{ source(... |
ALTER TABLE `system_login_log` CHANGE `ip` `ip` VARCHAR(45); |
alter table subscriptions alter column user_id set not null;
|
select count(*) from information_schema.tables where table_schema='toDb' and table_name='table'
|
--PHARMACOLOGY IN STOCK
CREATE OR REPLACE VIEW PHARMACOLOGY_ON_HAND_V
AS
SELECT DRUGID, DRUG_NAME, DRUG_DOSAGE, DRUG_UNITS_INV, IS_CONTROLLED, DATE_STOCKED, DATE_EXPIRATION
FROM PHARMACOLOGY_STOCK ;
--REPORT ON BLOOD ON HAND
CREATE OR REPLACE VIEW BLOOD_REPORT_V
AS
SELECT COUNT(BLOODBAGID) AS TOTAL_BAGS, NVL(FUNC... |
<?php
/**
* @file AddExerciseType.sql
* inserts a possible type into %ExerciseType table
* @author Till Uhlig
* @param string $values the input data, e.g. 'a=1, b=2'
* @result -
*/
?>
INSERT INTO ExerciseType SET <?php echo $values; ?> |
alter table users
alter password
type text; |
create database IMS
use IMS
use master
create table Employee (
id int primary key,
empname varchar(50),
)
create table items (
id int primary key,
itemname varchar (100),
quantity int
)
create table requests (
requestid int,
itemid int foreign key references items (id),
itemname varchar (100),
empid... |
-- Provide a query that shows the most purchased Media Type
SELECT m.Name as MediaType,
SUM(il.Quantity) as Sales
FROM MediaType m
JOIN Track t
ON t.MediaTypeId = m.MediaTypeId
JOIN InvoiceLine il
ON il.TrackId = t.TrackId
GROUP BY MediaType
ORDER BY Sales DESC
LIMIT 1;
|
delete from HtmlLabelIndex where id=20960
/
delete from HtmlLabelInfo where indexid=20960
/
INSERT INTO HtmlLabelIndex values(20960,'集成登陆')
/
INSERT INTO HtmlLabelInfo VALUES(20960,'集成登陆',7)
/
INSERT INTO HtmlLabelInfo VALUES(20960,'Integrated Login',8)
/
delete from HtmlLabelIndex where id=20961
/
delete from HtmlLabe... |
CREATE INDEX arg_ballo_localizaciones_ix_agrupado ON arg_pv_localizaciones USING btree(id_agrupado);
CREATE INDEX arg_ballo_loc_diff_votos_ix_agrupado ON arg_pv_loc_diff_votos USING btree(id_agrupado);
CREATE INDEX arg_ballo_loc_diff_votos_ix_partido ON arg_pv_loc_diff_votos USING btree(id_partido);
CREATE INDEX arg_ba... |
alter table workflow_nodelink add ProcessorOpinion varchar(200)
/
alter table workflow_nodelink add wfrequestid int
/
alter table workflow_nodecustomrcmenu add newOverTimeName7 varchar(50)
/
alter table workflow_nodecustomrcmenu add newOverTimeName8 varchar(50)
/
alter table workflow_nodecustomrcmenu add hasovertime ch... |
-- 이전글(◀) 다음글(▶)이 등장하는 조회 페이지는 3번의 SQL 실행이 필요합니다.
DROP TABLE prenext;
CREATE TABLE prenext(
prenextno INT NOT NULL AUTO_INCREMENT,
grp INT NOT NULL,
title VARCHAR(100) NOT NULL,
PRIMARY KEY(prenextno)
);
INSERT INTO prenext(grp, title)
VALUES(1, '내일 눈 많이 옵니다.');
INSERT INTO prenext(grp,... |
insert into Stops values (1,'Ostrava,Svinov,mosty dolní zast.')
insert into Stops values (2,'Ostrava,Poruba,vozovna')
insert into Stops values (3,'Ostrava,Pustkovec,Pustkovecká')
insert into Stops values (4,'Velká Polom,aut.st.')
insert into Stops values (5,'Velká Polom,střed')
insert into Stops values (6,'Velká Polom... |
DROP PROCEDURE CPI.POST_SAVE_GROUPED_ITEMS;
CREATE OR REPLACE PROCEDURE CPI.POST_SAVE_GROUPED_ITEMS(
p_par_id GIPI_WPOLBAS.par_id%TYPE,
p_line_cd GIPI_WPOLBAS.line_cd%TYPE,
p_subline_cd GIPI_WPOLBAS.subline_cd%TYPE,
p_iss_cd GIPI_WPOLBAS.iss_cd%TYPE,
p_issue_y... |
-- задание 1
create function hello() returns text
begin
declare t time default current_time();
if t >= TIME'06:00:00' and t < TIME'12:00:00' then
return 'Доброе утро';
elseif t >= TIME'12:00:00' and t < TIME'18:00:00' then
return 'Добрый день';
elseif t >= TIME'00:00:00' and t < TIME'06:00:00' then
... |
/*
Enter your query here.
Please append a semicolon ";" at the end of the query and enter your query in a single line to avoid error.
*/
/*
Problem Description: https://www.hackerrank.com/challenges/salary-of-employees?h_r=next-challenge&h_v=zen
*/
SELECT NAME FROM EMPLOYEE WHERE SALARY>2000 AND MONTHS<10 ORDER BY EM... |
/*
Navicat MySQL Data Transfer
Source Server : localhostDB
Source Server Version : 50527
Source Host : 127.0.0.1:3306
Source Database : binf_cms_db
Target Server Type : MYSQL
Target Server Version : 50527
File Encoding : 65001
Date: 2015-02-15 00:01:17
*/
SET FOREIGN_KEY_CHECKS=0;... |
CREATE PROC dbo.usp_GetHoldersFullName
AS
SELECT
CONCAT(FirstName, ' ', LastName) AS [Full Name]
FROM AccountHolders |
DECLARE
v_caseid INTEGER;
v_casetitle NVARCHAR2(255);
v_casetypeid INTEGER;
v_casetypecode NVARCHAR2(255);
v_casetypename NVARCHAR2(255);
v_casetypeprocessorcode NVARCHAR2(255);
v_stateconfigid INTEGER;
v_errorcode NUMBE... |
UPDATE games_bck
SET YEAR_ID = SUBSTR(GAME_ID,4,4);
UPDATE events_bck
SET YEAR_ID = SUBSTR(GAME_ID,4,4);
INSERT INTO games
SELECT * from games_bck;
INSERT INTO events
SELECT * from events_bck;
|
-- script to find number of shows
SELECT name AS genre, count(*) AS number_shows FROM tv_genres
JOIN tv_show_genres ON tv_show_genres.genre_id = tv_genres.id
GROUP BY genre_id ORDER BY number_shows DESC;
|
--
-- Structure for table openagenda_agenda
--
DROP TABLE IF EXISTS openagenda_agenda;
CREATE TABLE openagenda_agenda (
id_agenda int NOT NULL,
uid int default '0' NOT NULL,
name varchar(50) default '' NOT NULL,
description varchar(255) default '' NOT NULL,
eventsembeddingcode long varchar NULL ,
mapembeddingcode lon... |
START COLLECTION FOR SECURED TARGET o10hm USING HOST dbix25hp.natura.com.br FROM TABLE 'SYS.AUD$';
select 'start collection for secured target "'||st.secured_target_name||'" using host "'||at.host_name||'" from '||at.audit_trail_type||' "'||at.location||'";'
from avsys.audit_trail at
, avsys.secured_ta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.