text stringlengths 6 9.38M |
|---|
Create Procedure sp_Update_PrintFormat (@TransactionName nvarchar(255),
@OldFileName nvarchar(255),
@PrintFileName nvarchar(255))
As
Update CustomPrinting Set PrintFileName = @PrintFileName
Where TransactionName = @TransactionName And PrintFileName = @OldFileName
|
alter table if exists shortened
add column if not exists created_at timestamp not null default now(),
add column if not exists last_visit timestamp not null default now(),
add column if not exists expires boolean not null default TRUE;
update shortened set expires = FALSE;
create table if not exists stats (
i... |
ALTER table boyo_app add supportUrl varchar(300) COLLATE utf8_unicode_ci NOT NULL;
ALTER table boyo_app add `cover` varchar(100) COLLATE utf8_unicode_ci NOT NULL;
ALTER table boyo_app add `poster` varchar(100) COLLATE utf8_unicode_ci NOT NULL;
ALTER table boyo_app add `icon` varchar(100) COLLATE utf8_unicode_ci NOT NUL... |
--找到 部门是10或30 且薪水大于1500
select e.* from emp e where (e.deptno=10 or e.deptno=30) and e.sal>1500;
-- not and or 优先级你可以使用()提高
select e.* from emp e where not(e.sal between 1500 and 3000) and e.deptno=10
/*
1、查询部门编号为10的员工信息
2、查询年薪大于3万的人员的姓名与部门编号
3、查询佣金为null的人员姓名与工资
4、查询工资大于1500 且 and 含有佣金的人员姓名
5、查询工资大于1500 或 or含有佣金的... |
CREATE INDEX idx_Etudiants_nomEtudiant ON Etudiants (nomEtudiant);
CREATE INDEX idx_Profs_nomProf ON Profs (nomProf);
CREATE INDEX idx_UV_nomUV ON UV (nomUV);
CREATE BITMAP INDEX idx_Profs_typeProf ON Profs (typeProf);
CREATE BITMAP INDEX idx_Profs_sexeProf ON Profs (sexeProf);
|
Create Procedure dbo.FSU_sp_GetRelStatReportParm
As
Begin
Select "ReportDataID" = ReportData.ID, "FromDate" =IsNull(A.FromDate,''), "ToDate" = IsNull(A.ToDate,'') ,ActionData,DetailCommand,ForwardParam,
"ParameterId"=B. ParameterId ,
"DetailProcName"=Case Detailcommand When 0 Then N''
Else (Select Rep.Actionda... |
-- Up
CREATE TABLE Category (id INTEGER PRIMARY KEY, name TEXT);
CREATE TABLE Post (id INTEGER PRIMARY KEY,
categoryId INTEGER,
title TEXT,
subtitle TEXT,
content TEXT,
CONSTRAINT Post_fk_categoryId FOREIGN KEY (categoryId)
REFERENCES... |
-- get_bind_values.sql
-- 10g+
@@get_date_range
col username format a15
col sid format 9999
col datatype_string format a15 head 'DATA TYPE'
col child_nume format 999999 head 'CHILD|NUMBER'
col position format 999 head 'POS'
col name format a20
col data_type format a15
col value_string format a40
col value_anydata fo... |
/*
MySQL Data Transfer
Source Host: localhost
Source Database: paypal
Target Host: localhost
Target Database: paypal
Date: 2010-10-25 13:41:02
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for business
-- ----------------------------
CREATE TABLE `business` (
`id` int(1... |
INSERT INTO A_ALMACENAMIENTO
(id, capacidadvolumen, capacidadpeso, producto, sucursal, nivelabastecimientobodega, existencias, capacidadproductos, tipo)
VALUES (1,200,120,5,2,10,52,80,'Estante');
INSERT INTO A_ALMACENAMIENTO
(id, capacidadvolumen, capacidadpeso, producto, sucursal, nivelabastecimientobodega, existenci... |
/* OPERADORES LOGICOS */
SET SERVEROUTPUT ON;
DECLARE
A CONSTANT number := 5;
B CONSTANT number := 10;
nombre1 CONSTANT nvarchar2(100) := 'alejandro';
nombre2 nvarchar2(100);
BEGIN
------------------------------------------------------------------------
-- OPERADOR LOGICO
IF( A <> B) T... |
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50018
Source Host : localhost:3306
Source Schema : data_downshift
Target Server Type : MySQL
Target Server Version : 50018
File Encoding : 65001
Date: 2... |
CREATE procedure Sp_Get_WeekId as
select DocumentId from DocumentNumbers where doctype=61
|
select * from books where released_year < 1980;
select * from books where author_lname in ("Eggers","Chabon");
select * from books where author_lname = "Lahiri" and released_year > 2000;
select * from books where pages between 100 and 200;
select * from books where author_lname like "c%" or author_lname lik... |
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 20-02-2017 a las 11:55:12
-- Versión del servidor: 5.5.24-log
-- Versión de PHP: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
CREATE TABLE chronicle_clients (
id INTEGER PRIMARY KEY ASC AUTOINCREMENT,
publicid TEXT NOT NULL,
publickey TEXT NOT NULL,
isAdmin INTEGER NOT NULL DEFAULT 0,
comment TEXT,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX chronicle_clients_clienti... |
CREATE DATABASE agenda;
USE agenda;
CREATE TABLE Contato (
cId int(11) NOT NULL AUTO_INCREMENT,
nome varchar(100) DEFAULT NULL,
email varchar(100) DEFAULT NULL,
PRIMARY KEY (cId)
); |
-------------------------------------------------------------------------------
-- Name: Shujing Yue
-- ID#: 122072167
-- Date: May 10, 2018
-------------------------------------------------------------------------------
-- Question 1: Start by entering in the SQL Developer worksheet:
SELECT * FROM EMPLOYEES;
... |
TIPO B
Nombre: <Pon aquí tu nombre>
************************************************************************
INSTRUCCIONES:
==============
-Salva este fichero con las iniciales de tu nombre y apellidos,
en el directorio "C:\ALUMNOS\ ":
Ejemplo: José María Rivera Calvete
JMRC.sql
-Pon tu nombre al ejercicio y... |
INSERT INTO atbladmin VALUES (401,"root","xyz@gmail.com",983728,"texas")
INSERT INTO atblcustomer VALUES (123,"Aneesh","Partha",7676576,"aneesh@gmail.com","3001 South king drive")
INSERT INTO a_login (username,PASSWORD,user_type,admin_id) VALUES ("root","root","admin",401)
INSERT INTO a_login (username,PASSWORD,user_... |
-- 1.
CREATE VIEW rock AS
SELECT * FROM track
WHERE genre_id IN(
SELECT genre_id FROM genre
WHERE name = 'Rock'
);
-- 2.
CREATE VIEW classical_count AS
SELECT COUNT(track) From track
WHERE track_id IN (
SELECT track_id FROM playlist_track
WHERE playlist_id IN (
SELECT playlist_id FROM playlist
WHERE name = 'Classic... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.2.6-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 9.4.0.5125
-- -------------------------------------------------... |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: May 05, 2019 at 09:14 AM
-- Server version: 5.7.21
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
CREATE PROCEDURE spc_conversion
AS
select ConversionUnit FROM ConversionTable
|
#delayed flights performance by airports
SELECT
ORIGIN
COUNT(IF(DEP_DELAY > 10, "", NULL)),
COUNT(*), COUNT(IF(DEP_DELAY > 10, "", null)) / COUNT PCENT
FROM airline
GROUP BY ORIGIN
ORDER BY PCENT DESC;
|
DROP TABLE IF EXISTS PURCHASE_POLISH;
CREATE TABLE PURCHASE_POLISH
(
POLISH_ID VARCHAR(5),
CUST_ID INT,
QTY INT,
BALANCE DECIMAL(5,2),
TRANS_ID INT
);
ALTER TABLE PURCHASE_POLISH ADD CONSTRAINT PK_PURCHASE PRIMARY KEY(POLISH_ID, CUST_ID);
ALTER TABLE PURCHASE_POLISH ADD CONSTRAINT FK_CUSTOMER_BUY_PO... |
DROP TABLE IF EXISTS inventory;
DROP TABLE IF EXISTS items;
DROP TABLE IF EXISTS schools;
DROP TABLE IF EXISTS suppliers;
CREATE TABLE suppliers(
id SERIAL4 PRIMARY KEY,
name VARCHAR(255) NOT NULL,
location VARCHAR(255) NOT NULL,
image_url VARCHAR(255) NOT NULL
);
CREATE TABLE schools(
id SERIAL4 PRIMARY KE... |
delimiter $$
drop procedure if exists demo.after_days;
create procedure demo.after_days (
in days int
)
begin
select date_add(current_date(), interval days day);
end
$$
-- Test
-- set @days=3;
-- call demo.after_days(@bbb);
drop procedure if exists demo.student_count_by_name;
create procedure demo.student_cou... |
select sqrt(`c1`)
from `empty` |
INSERT INTO CATALOGO (DESCRIPCION_CATALOGO) VALUES ('Roles');
INSERT INTO CATALOGO (DESCRIPCION_CATALOGO) VALUES ('Competencias Interpersonales');
INSERT INTO CATALOGO (DESCRIPCION_CATALOGO) VALUES ('Competencias Instrumentales');
INSERT INTO CATALOGO (DESCRIPCION_CATALOGO) VALUES ('Competencias Sistematicas');
... |
SELECT
name
FROM backers
UNION
SELECT
name
FROM acquired_backers
ORDER BY name;
SELECT
name
FROM backers
UNION ALL
SELECT
name
FROM acquired_backers
ORDER BY name;
|
SELECT
event_name as Event,
complete_event_number as Section,
CONCAT(num_registered,'/',max_registered) as 'Registrations/Max'
FROM
event,
section
WHERE
section.event_id = event.id |
-- MySQL dump 10.13 Distrib 8.0.24, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: learningspaces
-- ------------------------------------------------------
-- Server version 8.0.25
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R... |
CREATE TABLE question (id BIGINT AUTO_INCREMENT PRIMARY KEY,
quiz_id BIGINT,
num int,
name varchar(1000),
content text,
comment text,
choiceType text
) AUTO_INCREMENT = 20; |
/*
出运明细-产品资料
*/
delimiter $
drop trigger if exists Tgr_ShipmentsLine_AftereUpdate $
create trigger Tgr_ShipmentsLine_AftereUpdate after update
on ShipmentsLine
for each row
begin
/*定义变量*/
declare sNewShippingQty decimal(18,2);
declare sOldShippingQty decimal(18,2);
declare sSOL_RecordID varchar(255);
... |
/*
Sistema de Protocolo de Documentos - SPDO, 2015
Este script apaga todos os registros de todas as tabelas do banco spdo
OS REGISTROS APAGADOS NÃO PODERÃO SER RECUPERADOS! USE COM CAUTELA
Execute este script com o seguinte comando:
mysql -uroot -p spdo < clean_spdo.sql
*/
SET FOREIGN_KEY_CHECKS = 0;... |
-- none of these records should be inserted due to constraint voilations!
INSERT INTO images (id, i1_4, i5_8, i9, fav) VALUES
(1, 10000000000000000, 7777777777777777, 7777, 'f');
INSERT INTO images (id, i1_4, i5_8, i9, fav) VALUES
(2, -1, 7777777777777777, 7777, 'f');
INSERT INTO images (id, i1_4, i5_8, i9, fav) ... |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `gnf_noah`
--
--
-- Dumping data for table `agreement_types`
--
INSERT IGNORE INTO `agreement_types` (`agreement_type_id`, `agreement_type_name`, `agreement_type_description`) VALUES
(1, 'HW Support', 'Harware Support'),
(2, 'OS Suppor... |
select count(id), max(price) as price, refine, currency, insert_date from ro.lots
where item_id = (select id from ro.items where item_id=1230)
group by price, refine, insert_date, currency
order by insert_date desc;
|
alter table core_presentation add column `embedded_video` text null;
alter table core_presentation add column `embedded_pdf` text null;
alter table core_presentation add column `order` integer default 100;
|
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 07, 2017 at 04:36 PM
-- 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_CHARACTER_SET_CLIENT=@@CHARACTER_SET... |
CREATE TABLE hospital_quality_tmp
AS SELECT
Provider_ID,
AVG(Adj_Score) AS Procedure_Average,
STDDEV_POP(Adj_Score) AS Procedure_Variability
FROM procedures_transform
GROUP BY Provider_ID;
CREATE TABLE hospital_survey_join
AS SELECT
hospital_quality_tmp.Provider_ID,
hospital_quality_tmp.Procedure_A... |
DROP TABLE customer;
DROP TABLE district;
DROP TABLE history;
DROP TABLE item;
DROP TABLE new_order;
DROP TABLE order_line;
DROP TABLE orders;
DROP TABLE stock;
DROP TABLE warehouse;
|
UPDATE dc_ui.client_preference
SET
category_id = $1,
correspondence_id = $2,
selected_opt_out = $3,
selected_retention_period = $4,
developer = $5,
project = $6,
lender = $7
WHERE client_preference_id = $8
|
CREATE TABLE `keys` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`key` VARCHAR(40) NOT NULL,
`level` INT(2) NOT NULL,
`ignore_limits` TINYINT(1) NOT NULL DEFAULT '0',
`is_private_key` TINYINT(1) NOT NULL DEFAULT '0',
`ip_addresses` TEXT NULL DEFAULT NULL,
`date_created` INT(... |
--- drop view r_rules cascade
create or replace view r_rules as select
rule.id rule_id,
rule.id id,
rule.contents rule_contents,
rule.remark rule_remark,
rule.expiredate rule_expiredate,
rule.persons_id_upd rule_person_id_upd,
rule.update_ip rule_update_ip,
rule.created_at rule_created_at,
rule.updated_... |
-- phpMyAdmin SQL Dump
-- version 4.0.8
-- http://www.phpmyadmin.net
--
-- Client: mysql.imerir.com
-- Généré le: Ven 13 Novembre 2015 à 11:08
-- Version du serveur: 5.1.73
-- Version de PHP: 5.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
TRUNCATE TABLE lightstatus;
LOAD DATA LOCAL INFILE '/var/www/html/exec/import_status/lightstatus.txt' INTO TABLE lightstatus FIELDS TERMINATED BY ',';
select * from lightstatus;
|
-- cleanup first
delete from enrollments where uuid like 'origin:%';
delete from identities where uuid like 'origin:%';
delete from profiles where uuid like 'origin:%';
delete from uidentities where uuid like 'origin:%';
delete from domains_organizations where domain like 'origin.%';
delete from organizations where nam... |
select * from users where email=$1 and password=$2; |
INSERT INTO `food_hmenu` VALUES ('101', '东北大拉皮(大份)', 24, 1, '1', '1');
INSERT INTO `food_hmenu` VALUES ('102', '东北大拉皮(小份)', 18, 1, '1', '1');
INSERT INTO `food_hmenu` VALUES ('103', '什锦泡菜', 12, 1, '1', '1');
INSERT INTO `food_hmenu` VALUES ('104', '老醋花生米', 16, 1, '1', '1');
INSERT INTO `food_hmenu` VALUES ('105', '微波花生... |
-- create table users
CREATE TABLE users (
id UUID PRIMARY KEY
);
-- create mock user
INSERT INTO users (id)
VALUES ('c380d6cb-b66d-40ac-a2a0-fd11c53be7db');
-- create artist tables
CREATE TABLE artists (
id UUID PRIMARY KEY,
deezer_id INT UNIQUE,
name TEXT NOT NULL
);
CREATE TABLE user_arti... |
CREATE DATABASE db_motociclistas
WITH
OWNER = postgres
ENCODING = 'UTF8'
CONNECTION LIMIT = -1;
CREATE TABLE public.users(
id_user SERIAL PRIMARY KEY,
username VARCHAR(20) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE public.hours(
id_hour SERIAL PRIMARY... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.0
-- Dumped by pg_dump version 9.6.0
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min... |
--@Autor(es): Ramos Sanchez Samuel
--@Fecha creación: 08/12/2019
--@Descripción: Procedimiento para cargar foto a tabla empleado
create or replace procedure p_cargar_foto_empleado(p_empleado_id in number,
p_nombre_archivo in varchar2) is
v_bfile bfile;
v_src_offset number := 1;
v_dest_offset number:= 1... |
ALTER TABLE public.part_relationship
ADD COLUMN version bigint NOT NULL DEFAULT 0; |
CREATE TABLE public."LogError"
(
"Id" serial NOT NULL,
"MensajeExcepcion" character varying,
PRIMARY KEY ("Id")
); |
/*Inicio Procedures*/
/*Sequencia de Insert Padrão*/
INSERT INTO Generos(Genero)VALUES('Feminino');
INSERT INTO Generos(Genero)VALUES('Masculino');
INSERT INTO Generos(Genero)VALUES('Prefiro não dizer');
INSERT INTO Generos(Genero)VALUES('Outros');
EXEC CriaEstado 'São Paulo', 'SP';
|
-- tpch10 using 1395599672 as a seed to the RNG
select
c.c_custkey,
c.c_name,
sum(l.l_extendedprice * (1 - l.l_discount)) as revenue,
c.c_acctbal,
n.n_name,
c.c_address,
c.c_phone,
c.c_comment
from
cp.`tpch/customer.parquet` c,
cp.`tpch/orders.parquet` o,
cp.`tpch/lineitem.parquet` l,... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 06-07-2020 a las 20:20:37
-- Versión del servidor: 10.4.13-MariaDB
-- Versión de PHP: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
select
concat('iclosed_lsk,', sel1.sig, '-', sel2.kind) as sig_kind,
round(count(distinct sel1.id) / {{n}}, 2) as cnt
from (
select sub.id,
case sub.sig
when 'aws' then 'cloud-provider'
when 'azure' then 'cloud-provider'
when 'batchd' then 'cloud-provider'
when 'cloud-provider-aws' the... |
set global log_bin_trust_function_creators = 1;
----
DROP FUNCTION IF EXISTS zn_auction_convert_product_type;
CREATE FUNCTION zn_auction_convert_product_type($id int(11))
RETURNS VARCHAR(50)
BEGIN
DECLARE _temp varchar(50);
select zn_title INTO _temp from zn_auction_product_type where id=IFNULL($id, 0);
RETURN _temp;
E... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 14, 2020 at 02:31 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
window-title POTCO - Reborn
icon-filename resources/pirates.ico
win-size 1280 768
texture-quality-level best |
drop table budget;
create table budget
(
id INTEGER not null
primary key autoincrement,
month INTEGER not null,
description TEXT not null,
expense_category INTEGER not null,
value REAL not null,
date TEXT not null,
is_paid INTEGER default 0 not null,
FOREIGN KEY (expense_categor... |
insert into MembersInfo values('A100','SARMA77',ROW('A','RAGHAVA','SARMA'),'A1917@hotmail.com','Civil','10/26/1972','#234,Sant Savtamali Road,Mumbai,123583','','0.0','+91 3718007387','Male');
insert into MembersInfo values('A101','CHANDRA44',ROW('A','RAVI','CHANDRA'),'A832@iitb.ac.in','Metallurgy','7/10/2000','#235,Wa... |
CREATE TABLE `questions` (
`question_number` int(11) NOT NULL,
`question` text COLLATE utf16_bin NOT NULL,
PRIMARY KEY (`question_number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_bin;
|
insert into test values(1, 2, '12345'), (6, -1, '126asd21'), (91, 2, 'fsahj2t');
insert into test(b) values(6), (7), (-5), (3);
insert into test(b, c) values(5, 'dsia'), (23123, '8f9sad'), (201, '21490');
insert into test(a, b) values(5621, 231), (48912, -234810), (-241, 53156);
select * from test; |
delete from "cdp.dssz.data::JOB_INFO" ;
INSERT INTO "cdp.dssz.data::JOB_INFO" (MODULE,JOBNAME,PROCESS_NAME,GATETIME) values ('MXEBGVMI','JOB_X86_SCHEDULE_PULL_MEX','MTY Schedule Pull',30);
INSERT INTO "cdp.dssz.data::JOB_INFO" (MODULE,JOBNAME,PROCESS_NAME,GATETIME) values ('SZEBGVMI','JOB_X86_SCHEDULE_PULL_SZ','SZ Sc... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 30-Nov-2016 às 02:10
-- Versão do servidor: 5.7.15-log
-- PHP Version: 5.6.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... |
create table advice (
`id` int unsigned not null auto_increment,
`uid` int unsigned not null,
`msg` varchar(128) not null default '',
`time` timestamp not null default current_timestamp,
primary key (`id`),
key uid (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
create table survey_transform_table as
select
hospital_name,
cast(overall_rating_of_hospital_perf as float) overall_rating
from surveys_responses
where overall_rating_of_hospital_perf Not like 'Not%';
|
/*
数据查询语言DQL
数据查询语言DQL基本结构是由SELECT子句,FROM子句,WHERE子句组成的查询块:
SELECT <字段名表>
FROM <表或视图名>
WHERE <查询条件>
*/
select * from `oneself-study`.`category`;
|
-- ****************** SqlDBM: MySQL ******************;
-- ***************************************************;
DROP TABLE `Company`;
DROP TABLE `Category`;
-- ************************************** `Category`
CREATE TABLE `Category`
(
`CategoryID` INT NOT NULL ,
`CategoryParent` INT NOT NULL ,
`CategoryN... |
CREATE TABLE IF NOT EXISTS `train_schema`.`trains` (
`idtrains` INT(11) NOT NULL COMMENT '',
`destpoint` VARCHAR(45) NULL DEFAULT NULL COMMENT '',
`time` TIME NULL DEFAULT NULL COMMENT '',
`day` VARCHAR(45) NULL DEFAULT NULL COMMENT '',
PRIMARY KEY (`idtrains`) COMMENT '')
ENGINE = InnoDB
DEFAULT CHARACTER S... |
SELECT t.dio_name, t.dio_type, t.address,t.parameter, t.new_value, t.old_value,
date_format(t.event_time,'%Y-%m-%d %H:%i:%s.%f') AS event_time
FROM log_dio_event t
WHERE time_stamp BETWEEN @from_dt AND @to_dt
ORDER BY event_time, t.dio_name, t.dio_type, t.address
LIMIT @limit; |
-- **********************************************
-- IT2351 Assignment 4 Part 3 - Abimael Rivera
-- Creating a select statement that returns the discount amount of the listing price and discount percent from the products table
-- **********************************************
SELECT list_price, discount_percent,
ROUN... |
set lines 120
set pages 999
clear col
set termout off
set trimout on
set trimspool on
connect / as sysdba
alter session set nls_date_format='dd-Mon-yyyy hh24:mi';
spool undoparameters.out
prompt
prompt ############## RUNTIME ##############
prompt
col rdate head "Run Time"
select sysdate rdate from dual;
col in... |
CREATE DATABASE IF NOT EXISTS `university` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `university`;
-- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: localhost Database: university
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARAC... |
CREATE OR REPLACE PUBLIC SYNONYM home_policy_pkg FOR orient.home_policy_pkg; |
drop schema musicbrainz;
create schema musicbrainz;
set search_path to musicbrainz;
CREATE TABLE area_type ( -- replicate
id INTEGER not null, -- PK
name VARCHAR(500) NOT NULL
);
CREATE TABLE area ( -- replicate (verbose)
id INTEGER not null, -- PK
na... |
create or replace view vw_hubbiness
as
select
"user".id as user_id,
1.0 / (
1.0/(coalesce(in_d.in_degree, 0)+1) +
1.0/(coalesce(out_d.out_degree, 0)+1)
) as hubbiness
from "user"
left join vw_in_degree in_d
on "user".id = in_d.user_id
left join vw_out_degree out_d
on "user".id = out_d.user_id; |
create database ejc_db;
use ejc_db;
create table encontrista (
id int unsigned auto_increment primary key,
nome varchar(30) not null,
sobrenome varchar(60) not null,
telefone varchar(14),
celular varchar(14) not null,
data_nascimento date not null,
edicao int not null,
email varchar(100) not null,
senha varchar(80) no... |
SELECT REVERSE(SUBSTR(telephone, 2, 10)) AS enohpelet FROM `distrib` WHERE telephone LIKE '05%'
|
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: m_and_n_fantasy_sports
-- ------------------------------------------------------
-- Server version 5.7.16-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... |
update board1 set readcount= 50 where num=235;
select * from board1 order by num desc;
update board1 set ref=num where num=257;
create table replyBoard (
rno number primary key,
bno number not null references board1(num),
replytext varchar2(500) not null,
replyer varchar2(50) not null,
regdate date not null,
upda... |
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.5.42-log)
# Database: sportal-db
# Generation Time: 2016-10-20 18:57:42 +0000
# ****************************************... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 27, 2021 at 12:22 PM
-- Server version: 8.0.24
-- PHP Version: 8.0.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
CREATE TABLE Roles
(
role_id serial PRIMARY KEY,
role_name character varying,
role_description text
);
CREATE TABLE Rules
(
rule_id serial PRIMARY KEY,
rule_name character varying NOT NULL,
rule_description text
);
CREATE TABLE RolesRules
(
rolesrules_role_id serial references Roles,
rolesrules_rule_... |
Create Procedure mERP_sp_get_ReceivedSchemes
AS
Select CS_SchemeID From tbl_mERP_RecdSchAbstract Where IsNull(CS_Flag,0) & 96 = 0
Order by CS_RecSchID
|
Create or replace procedure cp01 is
v_sal number;
Begin
select sal into v_sal from emp where sal = 800;
Dbms_output.put_line(v_sal :||v_sal);
End;
/
Exec cp01
Create or replace procedure cp02 is
v_empno number;
v_ename varchar2(10);
v_sal number;
v_comm number;
begin
select empno,ename,sal,NVL(c... |
/* 관리자 */
CREATE TABLE MANAGER (
ADMIN_ID VARCHAR2(60) NOT NULL, /* 아이디 */
ADMIN_PWD VARCHAR2(60) NOT NULL, /* 비밀번호 */
NAME VARCHAR2(30), /* 이름 */
POSITION VARCHAR2(10) DEFAULT 'STEP' NOT NULL, /* 관리자구분 */
EMAIL1 VARCHAR2(30), /* 이메일1 */
EMAIL2 VARCHAR2(30), /* 이메일2 */
HP1 VARCHAR2(3), /* 전화번호1 */
HP2 ... |
INSERT INTO `bookstore`.`role` (`id`, `role_name`) VALUES ('1', 'administrator');
INSERT INTO `bookstore`.`role` (`id`, `role_name`) VALUES ('2', 'regUser');
|
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 23, 2020 at 03:38 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
-- mysql -u tfzc -D tfzcpt -p <D:\Projects\j2eews\tfzcpt\src\sqlScript\sysDataInit.sql
--创建用户
delete from f_userinfo;
insert into f_userinfo (USERCODE, USERPIN, ISVALID, LOGINNAME, USERNAME, USERDESC, LOGINTIMES, ACTIVETIME, LOGINIP, ADDRBOOKID, REGEMAIL, USERORDER, USERPWD, REGCELLPHONE, CREATEDATE,CREATOR,UPDATOR,U... |
CREATE Procedure sp_Get_StkAmendBatch_FMCG_MUOM(@StkTfrID Int,@ItemCode nvarchar(20),
@Serial int , @UOMID int)
As
Create Table #template1
(
TrackBatch integer,
TrackPKD Integer,
Priceoption integer,
BatchNumber nvarchar(20),
BatchExpiry datetime,
BatchPKD datetime,
Qty Decimal(18,6),
BSalePrice Decimal(18,6),
Bpurcha... |
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Lun 17 Décembre 2018 à 11:28
-- Version du serveur: 5.6.12-log
-- Version de PHP: 5.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_... |
use login;
DROP TABLE users;
DROP TABLE user;
DROP TABLE submission;
DROP TABLE confirmation_token;
CREATE TABLE users
(
id INT PRIMARY KEY AUTO_INCREMENT,
email VARCHAR(50),
enabled bool ,
locked bool,
name VARCHAR(50),
password VARCHAR(512),
surname VARCHAR(50),
user_role int
);
CREATE TABLE conf... |
/*==============================================================*/
/* Table: T_USER_CHECK_IN */
/*==============================================================*/
create table T_USER_CHECK_IN
(
ID char(24) not null,
USER_ID numeric(8,0) no... |
INSERT INTO `categorysecond` VALUES (1, '潮流女装', 1);
INSERT INTO `categorysecond` VALUES (2, '初冬羽绒', 1);
INSERT INTO `categorysecond` VALUES (3, '毛呢大衣', 1);
INSERT INTO `categorysecond` VALUES (4, '温暖毛衣', 1);
INSERT INTO `categorysecond` VALUES (5, '精选男装', 1);
INSERT INTO `categorysecond` VALUES (6, '冬季外套', 1);
INSERT I... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.