text stringlengths 6 9.38M |
|---|
CREATE TABLE `ly_site_theme` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主题ID',
`uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'UID',
`cid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类ID',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '主题名称',
`title` varchar(255) NOT NULL DEFAULT '' C... |
use smoothiesdb;
DROP TABLE Qty_Ingredients;
DROP TABLE Recipes;
DROP TABLE Ingredient;
CREATE TABLE Recipes(
recipe_id INT auto_increment PRIMARY KEY,
title VARCHAR(255),
image VARCHAR(255),
rating float,
directions VARCHAR(255),
servings int,
calories int,
fat int,
carbohydrates... |
CREATE DATABASE IF NOT EXISTS mall
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
use mall;
-- 商品(SPU)
create table tb_goods(
id bigint not null AUTO_INCREMENT comment '商品id',
name varchar(64) not null comment '商品名称',
brand_id bigint not null comment '品牌id',
category1_id bigint null comm... |
insert into cie10(cve,descripcion) values
('A00','Cólera'),
('A00.0','Cólera debido a Vibrio cholerae 01, biotipo cholerae'),
('A00.1','Cólera debido a Vibrio cholerae 01, biotipo El Tor'),
('A00.9','Cólera, no especificado'),
('A01','Fiebres tifoidea y paratifoidea'),
('A01.0','Fiebre tifoidea'),
('A01.1','Fiebre para... |
call MMConfig_U_ByInfoInsert( 45,12)
/
call MMInfo_Insert (694,21384,'Íø¶Î²ßÂÔ','/hrm/tools/NetworkSegmentStrategy.jsp','mainFrame',45,2,12,0,'',1,'NetworkSegmentStrategy:All',0,'','',0,'','',2)
/
|
/* create the necessary tables - one for song titles and metadata and one for
* fingerprint hashes. */
CREATE TABLE songs (
songId MEDIUMINT PRIMARY KEY NOT NULL,
title VARCHAR(200) NOT NULL,
CONSTRAINT uniqueSongId UNIQUE(songId)
);
CREATE TABLE fingerprints (
songId MEDIUMINT NOT NULL,
hash BI... |
ALTER TABLE instituciones_nacionales RENAME COLUMN estado TO observaciones;
ALTER TABLE instituciones_nacionales ADD COLUMN estado_institucion_id INT NULL;
ALTER TABLE instituciones_nacionales ADD COLUMN tipo_regimen_id INT NULL;
ALTER TABLE instituciones_nacionales ADD COLUMN categoria_id INT NULL;
ALTER TABLE institu... |
----------------------
-- Json/Jsonb Storage
----------------------
select '{"foo": "bar"}'::json;
select '{
"foo": "bar",
"bar": true,
"baz": 1
}'::json;
select '{"foo": "bar"}'::jsonb;
select '{
"foo": "bar",
"bar": true,
"baz": 1
}'::jsonb;
select pg_column_size('{
"notificationType":"Bou... |
create table invoice
(
invoice_id int(11) unsigned auto_increment
primary key,
order_id int(20) unsigned default 0 not null comment '订单id',
order_sn varchar(20) charset utf8 default '' not null comment '订单编号',
user_id int(11) unsigned default 0 ... |
delete from HtmlLabelIndex where id=24412
/
delete from HtmlLabelInfo where indexid=24412
/
INSERT INTO HtmlLabelIndex values(24412,'已有权限查看')
/
INSERT INTO HtmlLabelInfo VALUES(24412,'已有权限查看',7)
/
INSERT INTO HtmlLabelInfo VALUES(24412,'Have permissions to view',8)
/
INSERT INTO HtmlLabelInfo VALUES(24412,'已有權限查看'... |
DECLARE
v_grantAdGroups NCLOB;
v_UserID NUMBER;
BEGIN
v_UserID := :USERID;
:errorCode := 0;
:errorMessage := '';
v_grantAdGroups := null;
--Grand AD Groups if exists
BEGIN
SELECT list_collect(cast(collect(to_char(t_group.Code) order by to_char(usr_group.userid)) as sp... |
-- Adding data to a database
Insert into Employee
(lastname, firstname, JobId)
values ('John', 'Papa', 3); |
CREATE TABLE "public"."users" (
"id" serial,
"email" text NOT NULL,
"password" text,
PRIMARY KEY ("id"),
UNIQUE ("email")
);
|
USE codeup_test_db;
select'all albums by Pink Floyd' AS '';
Select name as '' from albums where artist = 'Pink Floyd';
select 'the year Sgt. Pepper''s Lonely Hearts Club band was released' AS '';
select release_date as '' from albums where name = 'Sgt. Pepper''s Lonely Hearts Club Band';
select 'The genre for Neverm... |
-- Print full description of the table: first_table
SHOW CREATE TABLE first_table;
|
UPDATE MAIL_HOOK_IGNORE_CONDITIONS
SET
CONDITION_KIND = ?
, CONDITION = ?
, INSERT_USER = ?
, INSERT_DATETIME = ?
, UPDATE_USER = ?
, UPDATE_DATETIME = ?
, DELETE_FLAG = ?
WHERE
CONDITION_NO = ?
AND HOOK_ID = ?
AND IGNORE_CONDITION_NO = ?
;
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- Host: 127.0.0.1
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
-- Airlines Reservation System
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_RESUL... |
SELECT COUNT(*) as SameNumbers
FROM(SELECT DISTINCT i.SellerID
FROM Items i, Bids b
WHERE i.SellerID = b.BidderID); |
delete from HtmlLabelIndex where id=21700
/
delete from HtmlLabelInfo where indexid=21700
/
INSERT INTO HtmlLabelIndex values(21700,'您打开的文档目前为查看状态')
/
delete from HtmlLabelIndex where id=21701
/
delete from HtmlLabelInfo where indexid=21701
/
INSERT INTO HtmlLabelIndex values(21701,'无法保存您的编辑')
/
INSERT INTO HtmlL... |
/* Loaded on startup */
INSERT INTO USER_TABLE (ID, USER_NAME, PASSWORD, STATUS) VALUES
(0, 'admin', '$2a$10$DTCKIErx/FYf8VOuLH0xN.pPmzhSUpwSPc/dQ4LWnpDJMvsaN0c4e', 1),
(1, 'admin2', '$2a$10$DTCKIErx/FYf8VOuLH0xN.pPmzhSUpwSPc/dQ4LWnpDJMvsaN0c4e', 1);
INSERT INTO customer VALUES (1,'Big News Media Corp',1),(2,'Onl... |
-- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 12-11-2013 a las 22:08:19
-- Versión del servidor: 5.5.32
-- Versión de PHP: 5.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
--liquibase formatted sql
--changeset kmschoep:entered_online_view
CREATE OR REPLACE FORCE VIEW entered_online_view
(
method_id
,source_method_identifier
,method_descriptive_name
,insert_person_name
,completion_flag
,ready_for_review
,method_type
,last_update_person_name
,last_method_up... |
DELIMITER //
CREATE PROCEDURE updatedateinfoolog(ID int,DESCRIPTION varchar(50),LOCATION varchar(50))
BEGIN
INSERT INTO foolog values(ID,DESCRIPTION,LOCATION,now());
END //
DELIMITER ;
|
alter table worktask_operator add createrviewtype integer
/
alter table worktask_operator add checkorviewtype integer
/ |
-- Adminer 4.7.8 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
CREATE TABLE `admin` (
`adminid` int(11) NOT NULL AUTO_INCREMENT,
`adminname` varchar(255) NOT NULL,
`adminpassword` varchar(255) NOT NULL,
PRIMARY KEY (`adminid`)
) ENGI... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table member (
id bigserial not null,
email varchar(255),
gender varchar(255),
name var... |
SELECT students.name AS student, AVG(duration) AS average_assignment_duration
FROM assignment_submissions
JOIN students ON student_id=students.id
WHERE students.end_date IS NULL
GROUP BY student
ORDER BY average_assignment_duration DESC;
|
-- ----------------------------
-- Table structure for sys_code
-- ----------------------------
CREATE TABLE "SYS_CODE" (
"UUID" VARCHAR2(32) NOT NULL ,
"CODE_ID" VARCHAR2(32) NULL ,
"CODE_NAME" VARCHAR2(255) NULL ,
"CODE_TEXT" VARCHAR2(255) NULL ,
"CODE_VALUE" VARCHAR2(255) NULL ,
"CODE_DESC" VARCHAR2(255... |
SELECT table_name,partition_name,
TO_CHAR(last_analyzed,'dd/mm/yyyy hh24:mi:ss') Last_Analyzed
FROM dba_tab_partitions
WHERE TO_CHAR(last_analyzed,'dd/mm/yyyy') = '&Date_of_analysis'
AND table_owner = 'DATAW'
ORDER BY last_analyzed
/
QUIT
|
#=================TASK #2==================
drop procedure if exists get_sportsmans_by_sport;
delimiter $$
/**
* Selects sportsmans tby specified kind of sport.
*
* param[in] category (-1) if filtering by category is not needed
*/
create procedure get_sportsmans_by_sport(IN sport_name varchar(20),
IN category in... |
DECLARE
--INTERNAL
v_count INTEGER;
v_taskid INTEGER;
v_caseid INTEGER;
BEGIN
--DETERMINE IF SLA EVENT IS IN CACHE
:IsInCache := f_DCM_isSLAinCache(:SLAEventID);
--GET CONTEXT
IF :IsInCache = 1 THEN
SELECT col_slaeventcctaskcc,
col_slaeventcccasecc
INTO v_taskid,
... |
-- --------------------------------------------------------
-- 主機: 127.0.0.1
-- 服務器版本: 10.1.16-MariaDB - mariadb.org binary distribution
-- 服務器操作系統: Win32
-- HeidiSQL 版本: 9.3.0.4984
-- -------------------------------------------... |
#
# Table structure for table 'tx_ecomtoolbox_domain_model_language'
#
CREATE TABLE tx_ecomtoolbox_domain_model_language (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL,
sys_language int(11) DEFAULT '0' NOT NULL,
flag varchar(20) DEFAULT '' NOT NULL... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 29, 2021 at 05:51 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
{% snapshot SAT_USER %}
{{
config(
unique_key='User_Sk',
strategy='check',
check_cols=['First_Name', 'Last_Name', 'Password', 'Email'],
tags=['sattelite'],
)
}}
select distinct
MD5(Username) as User_Sk
,Firstname as First_Name
,Lastname as Last_Name
,Email ... |
set serveroutput on;
Create or replace procedure show_enrollments is
cursor c1 is
select sid,classid,lgrade from enrollments;
c1_rec enrollments%rowtype;
begin
open c1;
fetch c1 into c1_rec;
while c1%found loop
dbms_output.put_line(c1_rec.sid||','||c1_rec.classid||','||c1_rec.lgrade);
fetch c1 i... |
Hibernate:
select
product0_.ProductName as ProductN1_0_0_,
product0_.SupplierCompanyName as Supplier3_0_0_,
product0_.UnitsOnStock as UnitsOnS2_0_0_,
supplier1_.CompanyName as CompanyN1_1_1_,
supplier1_.City as City2_1_1_,
supplier1_.Street as Street3_1_1_
from
... |
create database bd_escola_registro;
use bd_escola_registro;
create table alunos(
ra bigint auto_increment,
nome varchar(255) not null,
sala varchar (10) not null,
sexo varchar (10),
telefone double,
nota float not null,
primary key (ra)
);
insert into alunos (nome, sala, sexo, telefone, nota) value ("Alberto Giro", "... |
/*
SQLyog Ultimate - MySQL GUI v8.2
MySQL - 5.7.20-log : Database - easybuyssm
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_K... |
CREATE TABLE Variavel(
Variavel_ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
Variavel VARCHAR(20) NOT NULL
); |
-- CreateTable
CREATE TABLE "FlashSaleItems" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"price" INTEGER NOT NULL,
"quantity" INTEGER NOT NULL DEFAULT 0,
"beginAt" TIMESTAMP(3) NOT NULL,
PRIMARY KEY ("id")
);
|
--user TABLE
CREATE TABLE FRIENDLIST (
FRIENDLISTID SERIAL PRIMARY KEY,
USERID INT REFERENCES PALUSER(USERID),
FRIENDID INT REFERENCES PALUSER(USERID),
FRIENDLISTTIME TIMESTAMP
);
--SAMPLE iNSERT
INSERT INTO FRIENDLIST (USERID, FRIENDID,FRIENDLISTTIME)VALUES (
'4',
'5',
TIMESTAMP '1997-01-31 09:26:50.12');
--... |
/**
* @file consulta-basica.sql
* @version 1.0
* @author Linea de Codigo (http://lineadecodigo.com)
* @date 15-enero-2013
* @url http://lineadecodigo.com/sql/consulta-basica-en-sql/
* @description Consulta Básica sobre una tabla de la base de datos
*/
select * from libros; |
/*
* Copyright 2011 Snoopy Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: marki
* Created: 17/09/2017
*/
create table Aluno(
RA int,
Nome varchar(150) not null,
Senha varc... |
CREATE TABLE customer
(
customer_id INTEGER NOT NULL,
hoverboard_id INTEGER NOT NULL,
trip_duration DECIMAL NOT NULL,
start_time_and_date TIMESTAMP,
start_location_latitude DECIMAL NOT NULL,
start_location_longitude DECIMAL NOT NULL,
end_location_latitude DECIMAL NOT NULL,
en... |
select codelist_value, count(codelist_value)
from rolecodes
where xpath ilike '%identificationInfo%' or xpath ilike '%/contact'
group by codelist_value
order by codelist_value; |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 01, 2020 at 12:47 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
SELECT * FROM goals
WHERE goalsid = $1; |
--Checklist 85
CREATE OR REPLACE TRIGGER TransferePaciente
AFTER INSERT ON medico
BEGIN
UPDATE paciente SET crm_medico = 12351 WHERE crm_medico = 12346;
END;
/ |
drop view if exists view_rt_districts_per_province;
create or replace view view_rt_districts_per_province
(province_id, province, district_count)
as
select
rt_province.id,
rt_province.name,
count(rt_district.id)
from
rt_province
inner join rt_district on (rt_province.... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 08. Sep 2019 um 12:02
-- Server-Version: 10.1.26-MariaDB
-- PHP-Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
DECLARE
v_format VARCHAR2(50);
v_def_format VARCHAR2(50) := 'Mon DD, YYYY';
v_offset number;
BEGIN
v_offset := :Offset;
if( v_offset is NULL) then v_offset := 0; ENd IF;
SELECT to_char(SYSDATE+v_offset, v_def_format) INTO :ResultText FROM dual;
EXCEPTION
WHEN OTHERS THEN
SELECT to_char(SYSDATE+v... |
insert into CMDS_M_PRAC_IDENT_DPC values('01','01:全体に係る識別コード');
insert into CMDS_M_PRAC_IDENT_DPC values('11','11:初診');
insert into CMDS_M_PRAC_IDENT_DPC values('12','12:再診');
insert into CMDS_M_PRAC_IDENT_DPC values('13','13:医学管理');
insert into CMDS_M_PRAC_IDENT_DPC values('14','14:在宅');
insert into CMDS_M_PRAC_I... |
-- Create schema Artists;
Use Artists;
Create table Artist(
ArtistId Integer NOT NULL,
ArtistName char(35) NOT NULL,
Rating char(30) NOT NULL,
Phone char(10) NULL,
CONSTRAINT Artists_PK PRIMARY KEY(ArtistId)
);
Create table Album(
ArtistId Integer NOT NULL,
Track char(35) NOT NULL,
Genre char(30) NOT NULL,
... |
CREATE DATABASE pubs;
CREATE TABLE names (id VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, street VARCHAR(255), city VARCHAR(255), longitude DOUBLE PRECISION NOT NULL, latitude DOUBLE PRECISION NOT NULL); |
select fn_db_add_column('roles', 'is_inheritable', 'boolean not null default false');
|
CREATE VIEW [stage].[vLoanService]
AS
SELECT [LoanSequenceNumber]
,[ReportingMonth]
,[ActualUPB]
,[DelinquencyStatus]
,[LoanAge]
,[MonthsToMaturity]
,[RepurchaseFlag]
,[ModificationFlag]
,[ZeroBalanceCode]
,[ZeroBalanceEffectiveMonth]
,[InterestRate]
,[DeferredUPB]
,[DDLPI]
,[MIRecoveries]
,[NetSalesPro... |
ALTER TABLE Variables
ADD UNIQUE (researchId, name); |
-- 사용자권한
grant select on employees to scott
revoke select on employees from scott
-- dba권한
grant select any table to scott
revoke select any table from scott
/*
Sub Query
1. Main Query에 반대되는 개념으로 이름을 부여한 것임.
2. 메인쿼리를 구성하는 소단위 쿼리
3. 서브쿼리안에는 select, insert, delete, update절에 모두 사용 가능
4. 서브쿼리의 결과 집합을... |
/*TUTORIAL 4 SELECT within SELECT */
/*1. Countries with population larger than that of Russia */
SELECT name FROM world
WHERE population >
(SELECT population FROM world
WHERE name='Russia');
/*2. Show the countries in Europe with a per capita GDP greater than 'United Kingdom*/
SELECT name FROM world
... |
USE sakila;
-- Question 1
SELECT first_name, last_name FROM actor;
SELECT CONCAT(first_name, " ", last_name) AS "Actor Name" FROM actor;
-- Question 2
SELECT actor_id, first_name, last_name FROM actor
WHERE first_name = "Joe";
SELECT actor_id, first_name, last_name FROM actor
WHERE last_name LIKE "%gen%";
SELECT a... |
CREATE
TABLE location
(
id bigint(20) NOT NULL AUTO_INCREMENT,
version bigint(20) NOT NULL,
address1 varchar(255) NOT NULL,
address2 varchar(255) NOT NULL,
city varchar(255) NOT NULL,
direction varchar(255),
name varchar(255),
state varch... |
delete from workflow_filetypeicon where extendname in('docx','xlsx','pptx')
/
insert into workflow_filetypeicon (extendname, iconpath, describe)
values ('docx', 'word2007.gif', 'Microsoft Word 2007')
/
insert into workflow_filetypeicon (extendname, iconpath, describe)
values ('xlsx', 'excel2007.gif', 'Microsoft Excel 2... |
CREATE OR REPLACE PROCEDURE CPI.giexs004_process_post_button (
p_module_id VARCHAR2,
p_user IN giex_expiries_v.extract_user%TYPE,
p_all_user IN giis_users.all_user_sw%TYPE,
p_line_cd IN giex_expiries_v.line_cd%TYPE,
p_subline_cd ... |
# $NetBSD: files.udf,v 1.3 2008/08/29 15:04:18 reinoud Exp $
deffs fs_udf.h UDF
file fs/udf/udf_osta.c udf
file fs/udf/udf_vfsops.c udf
file fs/udf/udf_vnops.c udf
file fs/udf/udf_subr.c udf
file fs/udf/udf_readwrite.c udf
file fs/udf/udf_strat_bootstrap.c udf
file fs/udf/udf_strat_sequential.c udf
file fs/udf... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50615
Source Host : localhost:3306
Source Database : mybatis-plus
Target Server Type : MYSQL
Target Server Version : 50615
File Encoding : 65001
Date: 2016-02-29 18:03:37
*/
SET FOREIGN... |
create or replace function teste_cursor
return int
is
cursor emp2 is select est.URI ,
est.CNPJ ,
est.RAZAO_SOCIAL ,
est.NOME_FANTASIA ,
est.URI_PORTE ,
est.EMAIL ,
est.CAPITAL_SOCIAL ,
est.URI_E_MATRIZ_OU_FILIAL ,
est.URI_PRINCIPAL_ATIV_ECONOMICA ,
est.DATA_INICIO_ATIV ,
est.URI_ENDERECO ,
est.TELEFONE1 ,
est.TELEFONE2... |
-- phpMyAdmin SQL Dump
-- version 4.4.15.5
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Nov 24, 2016 at 11:53 AM
-- Server version: 5.5.49-log
-- 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_... |
create table project (
tif_id text primary key,
county_name text,
county_number int,
tif_name text,
project_date text,
city_name text,
school_district text,
base_school text,
unified_lc text,
class int,
name text,
location text,
description text
);
create table year (
tif_id text,
tax_yea... |
-- 1: Nome e data de nascimento do artista mais velho cadastrado no museu
select nome, datanasc
from artista order by datanasc limit 1;
-- 2: Quantidade de obras de cada um dos tipos relevantes para o museu
select count(e) as qnt_escultura
from escultura e;
select count(p) as qnt_pintura
from pintura p;
select count... |
USE `gv_tvpad_web`;
/**************************************************************************
* 赠品发货功能
**************************************************************************/
/*Table structure for table `lv_activity_appoint_product` */
DROP TABLE IF EXISTS `lv_activity_appoint_product`;
CREATE TABLE `lv_act... |
CREATE SEQUENCE s_person_id START WITH 1;
CREATE TABLE person (
id INT NOT NULL,
name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
date_of_birth DATE NOT NULL,
CONSTRAINT pk_t_author PRIMARY KEY (ID)
); |
update ACT_GE_PROPERTY set VALUE_ = '6.5.1.5' where NAME_ = 'variable.schema.version';
|
INSERT INTO department (id, department_name)
VALUES (1, "Sales"),
(2, "Engineering"),
(3, "Finance"),
(4, "Legal");
INSERT INTO role (id, title, salary, department_id)
VALUES (1, "Salesperson", 70000, 1),
(2, "Lead Engineer", 150000, 2),
(3, "Software Engineer", 120000, 2),
(4... |
create index std_index on student(id);
-- Query 1
SELECT sql_no_cache name FROM student where id = 653061;
-- Query 2
SELECT sql_no_cache name FROM student where id between 30000 and 50000;
-- Query 3
SELECT student.name FROM student JOIN transcript ON transcript.studId = student.id WHERE transcript.crsCode = 'crsCode... |
CREATE DATABASE IF NOT EXISTS bdl;
USE bdl;
CREATE EXTERNAL TABLE `bdl_user_browse_action_day`(
`date_id` bigint,
`uid` bigint,
`search_cnt` int,
`login_cnt` int,
`add_chart_cnt` int,
`collection_cnt` int,
`order_cnt` int,
`pay_cnt` int,
`weekday` string,
`st` string)
PARTITIONED BY (
... |
INSERT INTO `#__user_roles` VALUES (0, '__cgaf', -1, 1); |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50717
Source Host : localhost:3306
Source Database : optocon
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2018-09-27 11:24:37
*/
SET FOREIGN_KEY_CHECKS=0;
-- -... |
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c written by the UFO converter
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
DOUBLE PRECISION G
COMMON/STRONG/ G
DOUBLE COMPLEX GAL(2)
COMMON/WEAK/ GAL
DOUBLE PRECISION MU_... |
/*
Navicat MySQL Data Transfer
Source Server : Local PC
Source Server Version : 50617
Source Host : localhost:3306
Source Database : colibri
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2016-10-06 15:58:22
*/
SET FOREIGN_KEY_CHECKS=0;
-- --... |
INSERT INTO account (name, password, editor)
VALUES ('test', 'test', false);
INSERT INTO account (name, password, editor)
VALUES ('soares', '123', true);
INSERT INTO account (name, password, editor)
VALUES ('patife', '123', false);
INSERT INTO account (name, password, editor)
VALUES ('zemamede', '123', true);
INSERT IN... |
PREPARE q FROM 'SELECT name, barCode from products WHERE price <= ?';
SET @price = 12;
EXECUTE q USING @price;
DEALLOCATE PREPARE q;
|
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Creato il: Mar 23, 2021 alle 21:33
-- Versione del server: 10.4.17-MariaDB
-- Versione PHP: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
-- 1210
ALTER TABLE mgt_channel_funnel ADD COLUMN channle_settlement_cnt int(11) default 0 comment '渠道结算数';
-- 1205
ALTER TABLE mgt_channels ADD COLUMN company_required tinyint not null default 0 comment '公司信息';
-- 用户登录统计临时表
CREATE TABLE mgt_user_login_app_tmp
(
statistic_date date comment '统计时间',
channel... |
CREATE TABLE "CMDS_M_GENERIC"
(
"GENERIC" VARCHAR2 (1) NOT NULL ENABLE,
"GENERIC_NAME" NVARCHAR2(10),
CONSTRAINT "CMDS_M_GENERIC_PK" PRIMARY KEY ("GENERIC") USING INDEX
TABLESPACE NDB_USERS1
)
TABLESPACE NDB_USERS1
NOLOGGING
PARALLEL 96
;
|
**********************************************************;
* SAS Install Reporter for SAS 8 or SAS 9 *;
* Purpose: to show what SAS products are installed *;
* *;
* Version 2 -- 5/15/09 changes and additions: *;
* ... |
create table cv_table (
id bigint not null auto_increment,
person_id bigint,
primary key (id)
) engine=InnoDB;
create table person_table (
id bigint not null auto_increment,
first_name varchar(255) not null,
last_name varchar(255) not null,
middle_name varchar(255),
gender varchar(255) not null,
birt... |
insert into CMDS_M_PHA_CLS values('111','全身麻酔剤');
insert into CMDS_M_PHA_CLS values('112','催眠鎮静剤、抗不安薬');
insert into CMDS_M_PHA_CLS values('113','抗てんかん薬');
insert into CMDS_M_PHA_CLS values('114','解熱鎮痛消炎剤');
insert into CMDS_M_PHA_CLS values('115','興奮剤、覚せい剤');
insert into CMDS_M_PHA_CLS values('116','抗パーキンソン剤');
... |
/*
SQLyog Ultimate v12.08 (64 bit)
MySQL - 5.6.24 : Database - test
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 07, 2017 at 06:40 AM
-- 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... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Окт 28 2020 г., 10:15
-- Версия сервера: 8.0.19
-- Версия PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
DROP DATABASE acaddb;
CREATE DATABASE acaddb;
USE acaddb;
CREATE TABLE Department (
DepartmentID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
DepartmentAbbreviation VARCHAR(45) NULL,
DepartmentName VARCHAR(45) NOT NULL,
DepartmentCode VARCHAR(20) NULL,
EstablishmentYear INTEGER NULL,
FaxNo VARCHAR(20) NULL,
... |
drop table board;
create table board(
b_num int AUTO_INCREMENT primary key,
title varchar(300) not null,
content text,
reg_date datetime not null,
writer int not null
);
select * from board;
insert into board(title, content, reg_Date, writer)
values('test5','냉무2',now(),8);
update user
set name='김경훈'
... |
CREATE table member(
num INT PRIMARY KEY,
NAME VARCHAR(50),
addr VARCHAR(50)
);
DESC member;
INSERT INTO member(num,NAME,addr) VALUES(1,'뚱이','비키니시티');
INSERT INTO member(num,NAME) VALUES(2, '징징이');
INSERT INTO member VALUES(3,'다람이','텍사스'); # 이방법으로 쓰지 말것
SELECT num, name
FROM member
SELECT * FROM member; # *는 잘쓰지않는... |
CREATE SCHEMA `university`;
drop user univ_user;
create user univ_user@localhost identified by 'Forever007';
-- Create tables
create table university.ref_subjects (
subject_id int not null auto_increment,
subject_name varchar(50) not null,
primary key(subject_id)
);
create table university.ref_clubs ... |
ALTER TABLE giac_dcb_users
DROP CONSTRAINT GDCU_PK;
|
CREATE TABLE comments (
id INTEGER PRIMARY KEY AUTOINCREMENT,
file_id INTEGER NOT NULL,
content TEXT NOT NULL,
author TEXT NOT NULL,
create_time DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT 'fk_comments_files' FOREIGN KEY ('file_id') ... |
-- IN
-- Example 1: Find all the 0.99, 1.98 and 1.99 payments that were made.
SELECT * FROM payment
WHERE amount IN (0.99, 1.98, 1.99)
ORDER BY amount ASC
-- Example 2: Figure out the number of payments made give the amounts in example 1.
SELECT COUNT(*) FROM payment
WHERE amount IN (0.99, 1.98, 1.99)
-- Examp... |
select a.customer_id, name
from( select customer_id, substring(order_date,1,7) m, sum(quantity*price) spend
from orders o left join product p on o.product_id = p.product_id
where order_date between '2020-06-01' and '2020-07-31'
group by 1,2 having spend>=100) a
left join customers c on a.cust... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.