text stringlengths 6 9.38M |
|---|
insert into ss.countries (id_ods, name, code_2, code_3, continent)
select *
from ods.countries; |
CREATE TABLE IF NOT EXISTS topic_versions(
topic_title varchar(512) REFERENCES topics,
version int DEFAULT 1,
description text,
PRIMARY KEY(topic_title, version)
);
INSERT into topic_versions(topic_title) (SELECT title from topics);
UPDATE topic_versions SET description = (SELECT topics.description FRO... |
DELIMITER //
CREATE FUNCTION mask_ssn(ssn VARCHAR(11))
RETURNS VARCHAR(11) CHARSET utf8
NO SQL
DETERMINISTIC
BEGIN
DECLARE ssn_len INTEGER DEFAULT LENGTH(ssn);
DECLARE res_str VARCHAR(11) DEFAULT '';
IF ssn_len = 9 AND ssn RLIKE '^[0-9]+$' THEN /* if passed as number */
SET res_str :=... |
CREATE TABLE `users` (
`id` int(20) PRIMARY KEY NOT NULL,
`userType` varchar(191) NOT NULL,
`image` varchar(191),
`class_id` int(11),
`group_id` int(11),
`section_id` int(11),
`createdBy` int(11) NOT NULL,
`updatedBy` int(11) NOT NULL,
`created_at` timestamp DEFAULT NULL,
`updated_at` timestamp DEFA... |
Create Procedure mERP_Sp_GetCategoriesForGST(@Level int)
As
Begin
select CategoryID,Category_name from ItemCategories where Active=1 and Level=@Level order by Category_name
End
|
SET lines 256
set tab off
set trimout on
|
-- phpMyAdmin SQL Dump
-- version 4.0.10.5
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2014-11-27 10:54:58
-- 服务器版本: 5.5.40-cll
-- PHP 版本: 5.4.23
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_CHARACT... |
DROP TABLE IF EXISTS `hl_site_domain`;
CREATE TABLE `hl_site_domain` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`domain` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`siteid` int(11) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORM... |
--@Autor(es): Ramos Sanchez Samuel y Riviera Nagano Alejandro
--@Fecha creación: 07/12/2019
--@Descripción: Creacion de sinonimos
prompt Creando sinonimos publicos
create or replace public synonym aeronave_comercial for comercial;
create or replace public synonym aeronave_carga for carga;
create or replace public syno... |
Select Distinct Name, ProjectName from Everything
Where TaskStatus Not In (1,2,3)
Order By ProjectName
|
CREATE FULLTEXT INDEX ON [HumanResources].[JobCandidate]
([Resume] LANGUAGE 1033)
KEY INDEX [PK_JobCandidate_JobCandidateID]
ON [AW2008FullTextCatalog];
|
-- --------------------------------------------------------
-- Hôte : 172.17.0.2
-- Version du serveur: 5.5.49-0+deb8u1 - (Debian)
-- SE du serveur: debian-linux-gnu
-- HeidiSQL Version: 9.4.0.5125
-- --------------------------------------------------------
/... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 26, 2019 at 11:28 AM
-- Server version: 10.1.40-MariaDB
-- PHP Version: 7.1.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
CREATE DEFINER=`dba`@`%` PROCEDURE `REGERAR_SENHA_USUARIO`(IN P_ID_USUARIO INT,
OUT P_SENHA VARCHAR(255),
IN P_COMMIT VARCHAR(1),
OUT P_OK VARCHAR(1),
... |
DROP TABLE IF EXISTS `bookmark`;
CREATE TABLE `bookmark` (
`tid` bigint NOT NULL AUTO_INCREMENT,
`id` varchar(10),
`parentId` varchar(10),
`title` varchar(200),
`url` varchar(500),
`index` int,
`dateAdded` bigint,
PRIMARY KEY (`tid`)
); |
CREATE DATABASE IF NOT EXISTS `mydb` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `mydb`;
-- MySQL dump 10.13 Distrib 8.0.18, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: mydb
-- ------------------------------------------------------
-- Server version 8.0.18
/*!40101 SET @O... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.7
-- Dumped by pg_dump version 9.5.7
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;
SET row_security = off;
... |
/*
SQLyog Ultimate v8.61
MySQL - 5.5.16 : Database - control
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIG... |
-- MySQL dump 10.11
--
-- Host: localhost Database: craigr
-- ------------------------------------------------------
-- Server version 5.0.83
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@... |
USE zoo_lab;
-- Which species has the longest scientific_name?
-- scientific name is in the species table
-- HINT: use length() on a string column to get length of the string
SELECT length(scientific_name), common_name, scientific_name
FROM zoo_lab.species
ORDER BY scientific_name desc;
-- Rabbbit had the longest sc... |
DROP PROCEDURE IF EXISTS SP_INSEGLOG;
DELIMITER $$
CREATE PROCEDURE SP_INSEGLOG(IN pcUsuario VARCHAR(20),
IN pcDetalle mediumtext,
IN pnLlave int,
IN pcTabla varchar(60),
IN pcAccion mediumtext,
In pcComando mediumtext,
IN pcLogIp varchar(20)
)
SP:BEGIN
INSERT... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Creato il: Ott 04, 2020 alle 16:49
-- Versione del server: 10.4.14-MariaDB
-- Versione PHP: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
SELECT matchid,player FROM goal
WHERE teamid = 'GER' |
-- INSERT INTO products (
-- category,
-- price,
-- description,
-- name,
-- count_in_stock
-- ) VALUES (
-- 'Limited',
-- 24.99,
-- 'Trophy Wife album on cassette tape',
-- 'Trophy Wife Cassette',
-- 10
-- ) RETURNING *;
-- INSERT INTO product_images (
-- product_id,
-- url
-- ) VALUES (
-- ... |
2018-10-17 02:00:49
controller: AlarmController action: getAlarmData
select * from `alarms` where `id` > 0 and `is_closed` = '0' order by `sequence` asc
3.420ms
select count(*) as aggregate from `risk_projects` where `id` > 0 and `status` = 0
2.680ms
select `lottery_id` from `issues` where `id` > 0 and `status` = 1 and... |
CREATE OR REPLACE VIEW RV_DD_ORDERDETAIL AS
SELECT l.AD_Client_ID, l.AD_Org_ID,
l.IsActive, l.Created, l.CreatedBy, l.Updated, l.UpdatedBy,o.DD_Order_ID,
o.C_Order_ID, o.DocStatus, o.DocAction, o.C_DocType_ID, o.IsApproved, --o.IsCreditApproved,
o.SalesRep_ID,
o.IsDropShip,
o.C_BPartner_ID,
bp.C_B... |
UPDATE Foto SET Url = 'http://cdn.plantasdecasas.com/wp-content/uploads/2013/03/Plantas-de-casas-T%C3%A9rrea-c%C3%B3d.307.jpg' WHERE Id_Foto = 1;
commit; |
■問題
書籍情報テーブル(books)で、出版社ごとの書籍価格の最大値を求めてみましょう。
■実行文
# 出版社ごとの書籍価格の最大値を取得
SELECT
publish,
MAX(price)
# 書籍情報テーブルから取得
FROM
books
# 出版社ごとに取得
GROUP by
publish
;
■返却値
mysql> SELECT
-> publish,
-> MAX(price)
-> FROM
-> books
-> GROUP by
-> publish
-> ;
+--------------+------------+
| publish ... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 20, 2019 at 12:13 AM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 04, 2018 at 12:37 PM
-- Server version: 10.1.25-MariaDB
-- 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... |
SELECT *
FROM Customers;
SELECT CustomerID
FROM Customers;
SELECT CustomerID, CustomerName
FROM Customers;
SELECT ContactName, Address, City
FROM Customers;
SELECT Country
FROM Customers;
SELECT CustomerID, CustomerName, Country
FROM Customers;
SELECT OrderID
FROM Customers;
SELECT CustomerID
FROM Orders;
S... |
-- Insira um novo funcionário na tabela sakila.staff .
INSERT INTO sakila.staff
(first_name, last_name, address_id, email, store_id, active, username, password)
VALUES ('Jean', 'Franco', 3, 'jnpefo@gmail.com', 2, 1, 'jnpefo', NULL);
-- Feito o exercício anterior, vamos agora para o nível 2. Insira dois
-- funcionários... |
INSERT INTO dc_ui.category_mapping(category_id, correspondence_id, opt_out, retention_period)
VALUES ($1, $2, $3, $4)
RETURNING category_mapping_id;
|
CREATE TABLE reme_main (
reme_id INT(6) UNSIGNED ZEROFILL NOT NULL,
creation_date DATETIME DEFAULT CURRENT_TIMESTAMP,
creator_user varchar(20) DEFAULT 'admingod',
last_modif_date DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (reme_id)
);
CREATE TABLE reme_synonyms (
reme_id INT(6) ... |
select * from am_contato;
select * from am_investidor;
select * from am_noticia;
select * from am_status;
select * from am_usuario;
delete from am_contato;
delete from am_investidor;
delete from am_noticia;
delete from am_status;
delete from am_usuario where id != 21; |
type
TMessages = (
strLang,
strTitle,
strError,
strWarning,
strOk,
strCancel,
strYes,
strNo,
strOn,
strOff,
strFinish,
strSec,
strSec1,
strMS,
strMM,
strDPI,
strBPP,
strSave,
strRotate,
strSlideShow,
strSlideShowDelay,
strMOptions,
strMSlideShow,
strMThumbnails,
strMDecoders,
strMColors,
st... |
SELECT `first_name`, `last_name` FROM `employees`
WHERE SUBSTRING(`first_name`, 1, 2) = 'Sa';
SELECT `first_name`, `last_name` FROM `employees`
WHERE `last_name` LIKE '%ei%' ORDER BY `employee_id`;
SELECT `first_name` FROM `employees` WHERE `department_id` IN (3, 10)
AND YEAR(`hire_date`) BETWEEN 1995 AND 2005 ORDE... |
-- 1. isbn 테이블(부모테이블)
create table book_isbn
(
bookisbn varchar2(30) not null -- 도서ISBN
,bookctg varchar2(20) not null -- 도서카테고리
,booktitle varchar2(100) not null -- 도서명
,authorname varchar2(20) not null -- 작가명
,publishcom varchar2(20) not null -- 출판사
,price number(20) ... |
LOCK TABLES `template` WRITE;
/*!40000 ALTER TABLE `template` DISABLE KEYS */;
INSERT IGNORE INTO `template` VALUES (null,'Liver carboxylesterase 1','CES1','P23141',NULL),(null,'Cocaine esterase','CES2','O00748',NULL);
/*!40000 ALTER TABLE `template` ENABLE KEYS */;
UNLOCK TABLES;
CREATE TABLE `protocol_links` (
`id... |
SELECT SalesOrderID, SubTotal FROM SalesOrderHeader;
SELECT SalesOrderID, OrderQty * UnitPrice FROM SalesOrderDetail;
SELECT SalesOrderID, OrderQty * ProductAW.ListPrice FROM SalesOrderDetail JOIN ProductAW ON (SalesOrderDetail.ProductID = ProductAW.ProductID); |
DROP PROCEDURE IF EXISTS functions_by_size;
#then_execute
CREATE PROCEDURE `functions_by_size`()
LANGUAGE SQL
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
select name, size from functions natural join symbols order by size desc limit 1000 ;
END |
-- sql工具 -- -
-- - mysql-- -
-- 测试
create table test_student (
id int(11) not null auto_increment,
name varchar(255) default null,
age int(11) default null,
primary key (id)
) engine=innodb auto_increment=14 default charset=utf8;
-- -- -- -- -- -- -- -- -- -
-- -- -- -权限表- -- -- --
-- -- -- -- -... |
----------------------------------------------------------------------------
-- Zadanie 1
--
-- Jak wygląda rozkład odpowiedzi od operatora w kontekście różnych zmiennych?
--
-- Dla poszczególnych grup dla zmiennych:
-- Opóźnienia (tabela wnioski, kolumna opoznienie)
--
-- Policz Weight Of Evidence (WOE)
with zliczone... |
-- Filename,Count
SELECT filename, COUNT(*) as n
FROM (
SELECT LAST(SPLIT(path, '/')) as filename
FROM [puppet.puppet_files]
)
GROUP BY filename
ORDER BY n DESC
LIMIT 10
|
alter table student_degree add column previous_diploma_issued_by character varying(180);
|
/* Создание процедуры получения третьего раунда */
CREATE PROCEDURE /*PREFIX*/GET_THIRD_ROUND
(
TIRAGE_ID VARCHAR(32),
PRIZE_ID VARCHAR(32)
)
RETURNS
(
TICKET_COUNT INTEGER
)
AS
BEGIN
TICKET_COUNT=0;
SELECT COUNT(*)
FROM /*PREFIX*/GET_TICKET_SERIES(:TIRAGE_ID,:PRIZE_ID,3)
INTO :TICKET_COUNT;
-- SU... |
SELECT
l.line_item_date,
SUM(line_item_gross) AS total_gross
FROM
{{ ref('orders_line_items') }} o
CROSS JOIN
o.line_items l
GROUP BY
1
ORDER BY
1
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 10, 2020 at 08:02 AM
-- 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... |
-- phpMyAdmin SQL Dump
-- version 3.4.11.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 05, 2013 at 10:02 PM
-- Server version: 5.5.31
-- PHP Version: 5.4.6-1ubuntu1.2
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_... |
DROP TABLE IF EXISTS Files;
DROP TABLE IF EXISTS Serviceflavors;
DROP TABLE IF EXISTS Services;
CREATE TABLE Services (
ID INT(11) NOT NULL auto_increment,
NAME CHAR(255) NOT NULL,
TENANTID CHAR(255) NOT NULL,
DESCRIPTION TEXT,
CREATIONTIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT SERVICES_PK PRIMAR... |
CREATE TABLE RVACSCONV (
CodConv INTEGER,
Tramo INTEGER,
Dias INTEGER,
TipoDias INTEGER ,
IniVigncia DATETIME,
FinVigncia DATETIME,
Jdd INTEGER NOT NULL,
CONSTRAINT PK_VacsConv PRIMARY KEY (CodConv, Tramo, IniVigncia, FinVigncia)
)
|
CREATE table categories(
id serial primary key ,
name text unique not null
); |
drop table DUTY_TEMPLATE;
--==============================================================
-- Table: DUTY_TEMPLATE
--==============================================================
create table DUTY_TEMPLATE
(
ID VARCHAR(32) not null,
"NAME" VARCHAR(50),
"DES... |
insert into EXTENSION (VersionDate,Description,AppliesTo,Documentation,NSSchema,Label,DefiningSchema,LongName,NS,Type,NSPrefix,Extension_ID) values ('2002-11-21','Provides a controlled vocabulary for identifying approximately ten discourse types. It is used with Type to identify the genre of a language resource (partic... |
/*
Define a a sales history table partitioned by month of sale:
- Months are numbers from 1 to 12
- Attributes should include:
- product ID
- product name
- product type
- total units sold
- month of sale
- Create a primary key using month of sale and product ID
*/
-- Create table with partitioned... |
-- Vraag 1
select planten.art_code, plantennaam, lev_naam, off_prijs, lev_tijd
from planten
join offertes on planten.art_code=offertes.art_code
join leveranciers on offertes.lev_code=leveranciers.lev_code
order by plantennaam
-- Vraag 2
select categorie, plantennaam, prijs
from plantschema
join planten on hoogte... |
DROP TABLE IF EXISTS genre;
DROP TABLE IF EXISTS author;
DROP TABLE IF EXISTS book;
DROP TABLE IF EXISTS comment;
CREATE TABLE genre (
genre_id IDENTITY NOT NULL,
name VARCHAR(255) NOT NULL,
CONSTRAINT genre_id PRIMARY KEY (genre_id)
);
CREATE... |
insert into car (make, model, production_start_date, production_end_date)
values
('Honda', 'Prelude III', 1987, 1991),
('Citreon', 'Xantia', 1993, 2001),
('Ferrari', 'F430', 2004, 2009),
('Honda', 'Civic II', 1979, 1983),
('Audi', 'A4 B6', 2000, 2006);
insert into service_ticket (description, start... |
CREATE DATABASE db_hotel;
USE db_hotel;
CREATE TABLE tipo_usuario(
tipo_id INT NOT NULL AUTO_INCREMENT,
nombre VARCHAR(45) NOT NULL,
PRIMARY KEY(tipo_id)
);
CREATE TABLE usuario(
usuario_id INT NOT NULL AUTO_INCREMENT,
usuario_tipo INT NOT NULL,
nombre VARCHAR(45) NOT NULL,
apellido_patern VARCHAR(45) ... |
{{
config({
"materialized" : "table",
"unique_key" : "order_number"
})
}}
select split_part(order_number, '-',1) as order_number,
sum(shipping_cost) as total_cost,
count(order_number) as shipments
from file_uploads.shipstation_orders
group by 1 |
CREATE EXTERNAL TABLE IF NOT EXISTS rubygems.access_logs (
`timestamp` timestamp,
`time_elapsed` int,
`client_ip` string,
`client_continent` string,
`client_country` string,
`client_region` string,
`client_city` string,
`client_latitude` string,
`client_longitude` string,
`client_timezone` string,
... |
update tid_interface_status set flag = 'g' where tid_id = 1 and interface_id = 1;
EXECUTE status_to_tids_rollup(1);
select * from tid_interface_status;
select * from tids;
|
/*
The Database tables:
a. site_category_source – Holds a list of top 1000 websites WorldWide
b. site_monthly_visits – Holds visits values for the list of top 1000 provided in the site_category_source table from 5 countries (US, UK, Canada, Germany and Russia) in months: June through December 2016.
c. is... |
-- Tablas EMPLE y DEPART
-- 01
SELECT APELLIDO, OFICIO
FROM EMPLE
WHERE APELLIDO LIKE 'A%'
AND OFICIO LIKE '%E%';
-- 02
SELECT apellido, oficio, loc
FROM EMPLE E, DEPART D
WHERE E.dept_no = D.dept_no
AND oficio = 'ANALISTA';
-- 03
SELECT apellido, oficio, salario, fecha_alt
FROM emple
WHERE OFICIO = (S... |
drop table if exists project_user_role_join;
create table project_user_role_join
(
projectId integer NOT NULL,
userId integer NOT NULL,
constraint foreign_key_project foreign key (projectId) references project (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION,
constraint foreign_key_user foreign key (userI... |
-- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tempo de Geração: 12/02/2014 às 17:47
-- Versão do servidor: 5.5.35-0ubuntu0.13.10.2
-- Versão do PHP: 5.5.3-1ubuntu2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
INSERT INTO modes VALUES (1,0,'2021-08-04 01:47:49','2021-08-04 02:34:12'); |
-- http://www.sqlservercentral.com/articles/CROSS+APPLY+VALUES+UNPIVOT/91234/
-- referenced:
-- http://bradsruminations.blogspot.co.il/2010/02/spotlight-on-unpivot-part-1.html
-- http://bradsruminations.blogspot.co.il/2010/02/spotlight-on-unpivot-part-2.html
-- SAMPLE DATA
IF OBJECT_ID('tempdb..#Orders','U') IS NOT N... |
DROP TABLE if exists category_list;
DROP TABLE if exists categories;
CREATE TABLE if not exists categories (
id int AUTO_INCREMENT,
image_path varchar(255),
product_category varchar(255),
PRIMARY KEY (id)
);
INSERT INTO categories (image_path, product_category)
VALUES ("view/img/bg-img/50.jpg","fighting"),... |
-------涉及到RMI的数据库变动部分,需要在此处提交数据库提交脚本-----------
-------ORACLE脚本 2014-01-23 ---------------------------
-----【注:仅供参考,请勿直接使用,升级时,请逐一比对】--------------
-----------------------------V1.3.6版本开始2014-01-23 add by qfxu------------------------
--1、设备软件信息表(DEV_SOFTWARE_INFO)新增两个字段:SERIAL_NO_INFO_STATUS INTEGER,
alter table DEV... |
DROP TABLE IF EXISTS smss; |
SELECT url.url
FROM url
-- This doesn't seem to work with a full join?
JOIN artist ON TRUE
JOIN l_artist_url ON l_artist_url.entity0 = artist.id AND l_artist_url.entity1 = url.id
WHERE artist.gid = $1
|
CREATE TABLE IF NOT EXISTS items (name text, qtty counter, PRIMARY KEY(name)); |
DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE products (
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(256) NOT NULL,
department_name VARCHAR(256) NOT NULL,
price DECIMAL(10,2) NOT NULL,
stock_quantity INT(10) NOT NULL,
product_sales DECIMAL(10,2) NOT NUL... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 18, 2018 at 12:55 PM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- UPDATE snps SET gene_symbol=NULL WHERE gene_symbol='\N';
SELECT measure, gene_symbol, effect_allele_frequency
FROM assocs NATURAL JOIN snps
WHERE effect_allele_frequency > 0.7
ORDER BY measure ASC, effect_allele_frequency DESC
LIMIT 25;
|
insert into parking_lot values (1,'A',10,10);
insert into parking_lot values (2,'B',10,10);
insert into parking_lot values (3,'C',10,10); |
CREATE DATABASE reimbursement_portal;
CREATE SCHEMA reimbursements;
CREATE TABLE reimbursements.employees(
id SERIAL NOT NULL,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
manager_id INTEGER NOT NULL,
email VARCHAR(50) NOT NULL,
password VARCHAR(50) NOT NULL,
CONSTRAINT pk_employee_id PRIMAR... |
-- Complaints_on_Products(complaint_id, product_name)
INSERT INTO Complaints_on_Products VALUES(1, 'KAVAL Hoodie');
INSERT INTO Complaints_on_Products VALUES(2, 'Galaxy S6');
INSERT INTO Complaints_on_Products VALUES(3, 'Pureboost RBL Shoes');
INSERT INTO Complaints_on_Products VALUES(8, 'KAVAL Cap');
INSERT INTO Comp... |
SET TIMING ON ; --显示SQL语句的运行时间。默认值为OFF。
SET HEADING OFF ; --输出域标题,缺省为on
SET PAGESIZE 0; --输出每页行数,避免分页设置为0
SET PAGESIZE OFF ;
SET FEEDBACK OFF ; --禁止最后的输出,缺省为24 ,如 n row selected
SET LINESIZE 80 ; --输出一行字符数,缺省为80
SET VERIFY OFF; --可以打开和关闭提示确认信息 如old 1 new 1 的显示
SET ECHO OFF; --显示文件中的每条命令及执行结果
SET TERM ... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 13, 2021 at 03:03 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
select idstudentinfo,name,surname,age from telemedicine.studentinfo; |
-- SQLite doesn't let you define foreign keys in-place (e.g., with alter). This is a workaround.
--
-- The strategy is:
--
-- * Create a temporary table that's a duplicate of the one to which you want to add foreign keys
-- * Insert all the rows from the original table into that table
-- * Drop the original
--... |
#订单状态字典表
CREATE TABLE dict_order_type(
id BIGINT AUTO_INCREMENT,
order_type VARCHAR(200),
PRIMARY KEY(id)
); |
-- phpMyAdmin SQL Dump
-- version 3.3.8.1
-- http://www.phpmyadmin.net
--
-- 主机: w.rdc.sae.sina.com.cn:3307
-- 生成日期: 2013 年 02 月 23 日 15:52
-- 服务器版本: 5.5.23
-- PHP 版本: 5.2.9
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS... |
-- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 26, 2018 at 11:41 AM
-- Server version: 5.1.36
-- PHP Version: 5.3.0
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... |
CREATE OR REPLACE VIEW RLARP.VVDH AS
SELECT
SYSTEM_VIEW_SCHEMA PLIB,
SYSTEM_VIEW_NAME PVW,
SYSTEM_TABLE_SCHEMA CLIB,
SYSTEM_TABLE_NAME CVW
FROM
RLARP.SYSVIEWDEP
WHERE
SUBSTR(SYSTEM_VIEW_NAME,1,3) <> 'SYS' |
<select id="tableChooseSE">
<if test=" '@timeType'=='min' ">ipmsdm.DM_VOLTE_RE_NE_EMSC_15M</if>
<if test=" '@timeType'=='hour' ">ipmsdm.DM_VOLTE_RE_NE_EMSC_H</if>
<if test=" '@timeType'=='day' ">ipmsdm.DM_VOLTE_RE_NE_EMSC_D</if>
<if test=" '@timeType'=='week' ">ipmsdm.DM_VOLTE_RE_NE_EMSC_W</if>
<i... |
create table if not exists checked
(
userid integer,
checked integer
);
alter table checked owner to cpwtvtnlbkxxbn; |
create database Clinica;
use Clinica;
create table Ambulatorios (
NroA int(3) primary key unique auto_increment,
Andar int(2) not null,
Capacidade int(3) not null
);
create table Medicos (
CodMed int(3) primary key unique auto_increment,
NomeMed varchar(40) not null,
Idade integer(2) not null,
CPF... |
SELECT
*
FROM
titles
ORDER BY emp_no DESC
LIMIT 10;
INSERT INTO employees
VALUES
(
999903,
'1977-09-14',
'Johnathan',
'Creek',
'M',
'1999-01-01'
);
Insert into titles(emp_no,title,from_date)
values(999903,'Senior Engineer','1997-10-1'); |
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Mer 26 Novembre 2014 à 16:47
-- Version du serveur : 5.6.20
-- Version de PHP : 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Lun 30 Mai 2016 à 22:26
-- Version du serveur : 5.6.17
-- Version de PHP : 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_... |
-- MYSQL CREATE TABLE
CREATE TABLE `king_kpi_count_daily` (
`teacher_id` bigint(20) DEFAULT NULL,
`teacher_name` varchar(20) DEFAULT NULL,
`class_id` bigint(20) DEFAULT NULL,
`class_name` varchar(20) DEFAULT NULL,
`student_num` int(11) DEFAULT NULL,
`school_id` bigint(20) DEFAULT NULL,
`school_name` varch... |
-- 20110427 修改区域表,支持银行卡余额查询
update t_area set remark='请填写正确的银行方提供的学校代码,如果不同校区有不同代码也在此处填写';
-- 小钱包未开户或转账,造成无法退卡或补办卡的修复,如果有多个小钱包,请分多次执行
insert into t_cardbalance (accno,pursetype,cardno,oldcardno,transdate,transtime,dpscnt,paycnt,balance,cardbal,accumdpsamt)
select accno,小钱包类型,cardno,0,'20110101','000000',0,0,0,0,0 fro... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 29, 2021 at 12:16 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.3.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
SELECT MAX(adet) AS 'SIPARIS ADET',urunkod,sehir,tblSiparisDetay.toplam FROM tblSiparisDetay
INNER JOIN tblSiparis ON tblSiparisDetay.faturaKod=tblSiparis.faturaKod
LEFT OUTER JOIN tblKullanici ON tblSiparis.kullaniciKod=tblKullanici.kullaniciKod
WHERE urunKod=3466 GROUP BY adet,urunkod,sehir,tblSiparisDetay.top... |
CREATE USER 'Admin-sys'@'%' IDENTIFIED BY 'root';
GRANT ALL PRIVILEGES ON * . * TO 'Admin-sys'@'%';
CREATE DATABASE IF NOT EXISTS wordpress;
CREATE USER 'utilisateur'@'localhost' IDENTIFIED BY 'mot de passe';
GRANT ALL PRIVILEGES ON wordpress . * TO 'utilisateur'@'localhost';
FLUSH PRIVILEGES;
quit
|
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Dim 18 Mars 2012 à 22:19
-- Version du serveur: 5.5.8
-- Version de PHP: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACT... |
Create Procedure sp_get_CustQuotations
@CustCode as nVarchar(50)
As
-- Multiple Quotation not handled
Select QAbs.QuotationId
From QuotationAbstract QAbs, QuotationCustomers QCust
Where QCust.CustomerID = @CustCode
And Active = 1
And Getdate() Between ValidFromDate and ValidToDate
And QAbs.QuotationId = Q... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.