text stringlengths 6 9.38M |
|---|
-- --------------------------------------------------------
-- Хост: localhost
-- Версия сервера: 5.7.22 - MySQL Community Server (GPL)
-- Операционная система: Linux
-- HeidiSQL Версия: 9.5.0.5196
-- --------------------------------------------------------
/*... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 17.07.2017 klo 12:17
-- Palvelimen versio: 10.1.9-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 20-05-2019 a las 01:48:22
-- Versión del servidor: 8.0.16
-- Versión de PHP: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... |
SELECT * FROM DRAFT_ITEM_VALUES
WHERE
DRAFT_ID = ?
;
|
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... |
Create table customer(
id int primary key auto_increment not null,
firstName varchar(100),
lastName varchar(100),
age int(3),
city varchar(100),
zipCode int(5)
);
insert into customer(firstName,lastName,age,city,zipcode)
values('boba','fet',28,'Bruxelles',1070),
('Mia','Moia',35,'Paris',75000),
('... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50155
Source Host : localhost:3306
Source Database : seed
Target Server Type : MYSQL
Target Server Version : 50155
File Encoding : 65001
Date: 2017-06-05 18:39:38
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... |
CREATE DATABASE IF NOT EXISTS `asgarddev` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `asgarddev`;
-- MySQL dump 10.13 Distrib 5.5.16, for Win32 (x86)
--
-- Host: localhost Database: asgarddev
-- ------------------------------------------------------
-- Server version 5.5.20-log
/*!40101 SET @OLD_CHARACTER_SET_... |
SELECT * FROM Game ORDER BY time DESC;
SELECT * FROM Game WHERE time >= date_trunc
('week', CURRENT_TIMESTAMP - interval '1 week');
SELECT Name FROM Player WHERE Name is not NULL;
SELECT id FROM Player, PlayerGame WHERE score > 1000;
SELECT name FROM Player WHERE emailaddress LIKE '%gmail%';
SELECT name, score FR... |
CREATE TABLE item (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT
); |
-- SELECT field1, field2,...fieldN
-- FROM table_name
-- WHERE field1 LIKE condition1 [AND [OR]] filed2 = 'somevalue'
select * from student where stuName like '李%';
-- 结果
-- | ID | stuID | stuName |
-- +----+----------+---------+
-- | 1 | 1000090 | 李应 |
-- | 2 | 10131677 | 李应2 |
-- | 3 | 10131678 | 李应3 ... |
/*!40101 SET NAMES binary*/;
/*!40014 SET FOREIGN_KEY_CHECKS=0*/;
/*!40103 SET TIME_ZONE='+00:00' */;
INSERT INTO `wp_terms` VALUES
(1,"Uncategorized","uncategorized",0),
(2,"Menu 1","menu-1",0),
(4,"My Footer 1","my-footer-1",0),
(5,"My Footer 2","my-footer-2",0),
(6,"award","award",0);
|
create table oauth_client_token
(
token_id varchar(128) null,
token blob null,
authentication_id varchar(128) not null
primary key,
user_name varchar(128) null,
client_id varchar(128) null
)
engine = MyISAM;
|
update ACT_GE_PROPERTY set VALUE_ = '6.7.0.0' where NAME_ = 'common.schema.version';
update ACT_GE_PROPERTY set VALUE_ = '6.7.0.0' where NAME_ = 'entitylink.schema.version';
update ACT_GE_PROPERTY set VALUE_ = '6.7.0.0' where NAME_ = 'identitylink.schema.version';
create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIM... |
set search_path to encuestas;
-- Table: grupos
-- DROP TABLE grupos;
CREATE TABLE grupos
(
id serial NOT NULL,
nombre character varying,
categoria_id integer,
subcategoria_id integer,
created timestamp without time zone,
modified timestamp without time zone,
owner_id integer,
CONSTRAINT "Grupos.primar... |
DROP TABLE IF EXISTS users CASCADE;
DROP TABLE IF EXISTS subjects CASCADE;
DROP TABLE IF EXISTS student_groups CASCADE;
DROP TABLE IF EXISTS timetables CASCADE;
DROP TABLE IF EXISTS teachers CASCADE;
DROP TABLE IF EXISTS teacher_subject CASCADE;
DROP TABLE IF EXISTS students CASCADE;
DROP TABLE IF EXISTS progress CASCA... |
CREATE DATABASE Airport_db;
USE Airport_db;
CREATE table Pilot (
id int unique not null,
first_name varchar (300) not null,
last_name varchar (300) not null,
rank varchar (300) not null,
pilot_id varchar (300) unique not null,
primary key (id)
);
CREATE table Airplane (
id int unique not null,
brand varchar (300) not... |
USE `${DB_MAIN}`;
CREATE TABLE IF NOT EXISTS RolePermissions
(
Id INT UNSIGNED NOT NULL,
`Resource` NVARCHAR(32) NOT NULL,
`Action` NVARCHAR(32) NOT NULL,
DataRoleId INT UNSIGNED,
RoleId INT UNSIGNED,
PRIMARY KEY (Id)
)
ENGINE=INNODB DEFAULT CHARSET=utf8;
ALTER TABLE RolePermissions
ADD CONSTR... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 25 Jan 2021 pada 06.34
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.2.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
/* Select snippets by language */
select s.name from languages l ,snippets s, snippets_langs sl WHERE l.id = sl.id_lang AND s.id = sl.id_snippet AND l.name = "C" GROUP BY s.id;
/* Select snippets by mime-type */
select s.* from languages l ,snippets s, snippets_langs sl, mime_types mt WHERE l.id = sl.id_lang AND mt.id... |
/**********************************/
/* Table Name: 포인트적립 */
/**********************************/
DROP TABLE point_save;
CREATE TABLE point_save(
point_save_no NUMBER(10) NOT NULL PRIMARY KEY,
payment_details_no NUMBER(10) NULL ,
... |
DROP table if exists prediction_schedule_execution;
DROP table if exists prediction_schedule;
DROP table if exists validation_value; |
DELETE FROM calendar;
INSERT INTO calendar (date, lunar, solarterms) VALUES
('2019-07-01', '廿九', '建党节'),
('2019-07-02', '三十', null),
('2019-07-03', '初一', null),
('2019-07-04', '初二', null),
('2019-07-05', '初三', null),
('2019-07-06', '初四', null),
('2019-07-07', '初五', '小暑'),
('2019-07-08', '初六', null),
('2019-07-09', '初七'... |
-- 181. Employees Earning More Than Their Managers
-- 14 / 14 test cases passed.
-- Status: Accepted
-- Runtime: 300 ms
SELECT e1.Name as Employee
FROM Employee e1 INNER JOIN Employee e2 ON e1.`ManagerId` = e2.Id
WHERE e1.Salary > e2.Salary |
CREATE TABLE TNDS_T_RCP_DPC_MN
(
SEQ1_NO VARCHAR2 (10),
SEQ2_NO VARCHAR2 (51) NOT NULL ENABLE,
VLD_FLG NUMBER (1,0),
KO_FLG NUMBER (1,0),
REC_IDENT_INFO VARCHAR2 (2),
RCP_MNG_NO VARCHAR2 (16),... |
CREATE TABLE EX1_024661.BILLING_ADDRESS
(
ADDRESS VARCHAR2(50 BYTE),
CITY VARCHAR2(50 BYTE),
STATE VARCHAR2(50 BYTE),
COUNTRY VARCHAR2(50 BYTE),
POSTAL_CODE VARCHAR2(50 BYTE),
SHIPPING_METOD VARCHAR2(50 BYTE),
SHIPPING_AMOUNT NUMBER,
EMAIL VARC... |
INSERT INTO city (state, name) VALUES ('CO', 'Boulder');
INSERT INTO city (state, name) VALUES ('CO', 'Denver');
INSERT INTO city (state, name) VALUES ('MA', 'Boston');
INSERT INTO city (state, name) VALUES ('CO', 'Niwot'); |
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 07-10-2020 a las 20:28:59
-- Versión del servidor: 10.3.24-MariaDB-cll-lve
-- Versión de PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone... |
select pxp.f_insert_tfuncion ('gem.f_verifica_alarma_gem', 'Funcion para tabla ', 'GEM');
select pxp.f_insert_tfuncion ('gem.f_tipo_mant_ime', 'Funcion para tabla ', 'GEM');
select pxp.f_insert_tfuncion ('gem.ft_equipo_medicion_ime', 'Funcion para tabla ', 'GEM');
select pxp.f_insert_tfuncion ('gem.ft_in... |
CREATE TABLE `platziBlog`.`post` (
`id` INT NOT NULL AUTO_INCREMENT,
`titulo` VARCHAR(150) NOT NULL,
`fecha_publicacion`TIMESTAMP NULL,
`contenido` TEXT NOT NULL,
`estatus` CHAR(8) NULL DEFAULT 'activo',
`usuario_id` INT NOT NULL,
`categoria_id` INT NOT NULL,
PRIMARY KEY (`id`)); |
select avg(score),sum(score * cnt) / sum(cnt)
from
(
select
cast(score as numeric(3, 2)) as score
, count(*) as cnt
from
(
select
b.ClientId
, crr.Score
from br6046 b
outer apply
(
select top 1 crr.Score
from ... |
USE hokan_ng_dev;
--
-- Table structure for table `Network`
--
DROP TABLE IF EXISTS `Network`;
CREATE TABLE `Network` (
`NETWORK_NAME` varchar(255) NOT NULL,
`CHANNELS_JOINED` int(11) DEFAULT NULL,
`CONNECT_COUNT` int(11) DEFAULT NULL,
`FIRST_CONNECTED` datetime DEFAULT NULL,
`LINES_RECEIVED` int(11) DEFAU... |
/* Author: Heidi Torres (student)
Date: 06 2016 */
USE HENRY ;
/* Tables:
AUTHOR (AUTHOR_NUM, AUTHOR_LAST, AUTHOR_FIRST)
BOOK (BOOK_CODE, TITLE, PUBLISHER_CODE, TYPE, PRICE, PAPERBACK)
BRANCH (BRANCH_NUM, BRANCH_NAME, BRANCH_LOCATION, NUM_EMPLOYEES)
INVENTORY (BOOK_CODE, BRANCH_NUM, ON_HAN... |
create or replace PROCEDURE workflow_FieldLabel_Select
(formid_1 integer,
flag out integer ,
msg out varchar2,
thecursor IN OUT cursor_define.weavercursor)
AS
begin
open thecursor for
select t1.* from workflow_fieldlable t1,workflow_formfield t2
where t1.formid=t2.formid and t1.fieldid=t2.fieldid and (t2.isdetail<>... |
use yenertuz;
create table if not exists employees
( id INT not null auto_increment,
name varchar(255) default '',
department varchar(255) default '',
salary int default 0,
primary key(id));
|
INSERT INTO CONTACTS (id,first_name, last_name, email,phone_number,active) VALUES
(1,'Abhijeet', 'Patil', 'abc@gmail.com','12345','T'),
(2,'Deja', 'Vu', 'xyz@email.com','4567','T'),
(3,'Caption', 'America', 'cap@marvel.com','56789','T');
|
with T as
(
select *
from question
inner join curriculum c on question.cur_name = c.cur_name
)
select *
from T
inner join teach on T.cur_name = teach.cur_name
where te_name = ?;
select *
from question
inner join teach on question.cur_n... |
-- Author: Kristina Chiara
-- Reporting Services production meta data is located on CORG0DB11
-- Script queries for specific keywords within embedded RDL SQL
WITH XMLNAMESPACES
(
'http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition' AS REP
)
SELECT
c.Path,
c.Name,
DataSetXML.value('@Name','v... |
DROP DATABASE IF EXISTS Projeto2;
CREATE DATABASE Projeto2;
USE Projeto2;
CREATE TABLE Medico (
crm VARCHAR(45) NOT NULL,
nome VARCHAR(45) NOT NULL,
idade INT NOT NULL,
endereco VARCHAR(45) NOT NULL,
telefone VARCHAR(45) NOT NULL,
email VARCHAR(45) NOT NULL,
senha VARCHAR(45) NOT NULL,
PRIMARY KEY (crm... |
SELECT l_orderkey
FROM lineitem
WHERE l_quantity>30
|
CREATE TABLE profiles (
id SERIAL,
email VARCHAR(100),
mobile VARCHAR(100),
address VARCHAR(100),
username VARCHAR(50)
); |
-- from https://www.kaggle.com/tkm2261/my-15th-solution-features-mainly-using-bigquery/data
Making item features
-- 基本標準、だめならレガシーで
--------------------------------------------------------------------------------------------
- 解釈
/*
count(1) 商品×ユーザ数
EXACT_COUNT_DISTINCT(user_id) ある商品を買ったことがあるユーザ
EXACT_COUNT_DISTINCT(d... |
--Phieu PTTT
--ngay 25/12
SELECT hsba.sovaovien as SOVAOVIEN,
hsba.PATIENTCODE,
hsba.PATIENTNAME,
cast((cast(to_char(hsba.hosobenhandate,'yyyy') as integer) - cast(to_char(hsba.birthday,'yyyy') as integer)) as text) as PATIENT_AGE,
gioitinhname as PATIENT_GENDERNAME,
degp.departmentgroupname AS DEPAR... |
DROP TABLE IF EXISTS vk_posts;
CREATE TABLE vk_posts (
id BIGINT NOT NULL PRIMARY KEY,
external_id VARCHAR(1024) NOT NULL UNIQUE,
message TEXT,
picture TEXT,
link TEXT,
type VARCHAR(255),
rental_fee NUMERIC,
room_count ... |
select resortID, resortName,
case
when (starRating <= 5.0 and starRating >=4.5)
then 'Excellent Resort'
when (starRating <=4.4 and starRating >= 4.0)
then 'Very Good Resort'
else 'Good Resort'
end Comments
from ... |
UPDATE behandlingshistorikk SET steg = 'VILKÅR'
WHERE steg in ('REGISTRERE_OPPLYSNINGER', 'VILKÅRSVURDERE_INNGANGSVILKÅR', 'VILKÅRSVURDERE_STØNAD'); |
DROP PROCEDURE CPI.COPY_POL_WCARGO_2;
CREATE OR REPLACE PROCEDURE CPI.copy_pol_wcargo_2(
p_new_policy_id gipi_cargo.policy_id%TYPE,
p_old_pol_id gipi_cargo.policy_id%TYPE
)
IS
/* Revised to have conformity with the objects in the database;
** the columns in the policy table should not be indi... |
/*
Title: Darkmoon Faire
Author: Nexis
Series: Setup
Location: Elwynn Forest
*/
-- Delete Gameobject Spawns
delete from `gameobject_spawns` where `id` between '150000' and '150064';
-- Delete NPCs
delete from `creature_spawns` where `id` between '150000' and '150006';
-- Delete Waypoints
delete from `c... |
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 22, 2020 at 05:36 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
CREATE PROCEDURE AjoutNouveauTrt
@idService BIGINT,
@agEncodeur VARCHAR(50),
@agEval VARCHAR(50),
@agVali VARCHAR(50),
@dateCrea DATETIME,
@dateModif DATETIME,
@nomTrt VARCHAR(50),
@toControlContact BIT,
@toControlDPD BIT,
@toModify BIT,
@isValid BIT,
@lstDonnePers TEXT,
@lstDonneSen TEXT,
... |
'55', 'Knoblauchkartoffeln', 'null', 4.00
'56', 'Knoblauchkartoffeln Spezial klein', 'mit Drehspießfleisch und Soße', 7.00
'57', 'Knoblauchkartoffeln Spezial groß', 'mit Drehspießfleisch und Soße', 8.50
'58', 'Portion Pommes Frites', 'mit Ketchup oder Nayonnaise', 3.90
|
alter table student add column created_date timestamp; |
DROP TABLE IF EXISTS dq_result_detail;
CREATE TABLE dq_result_detail
(
rule_exec_uuid STRING,
rule_exec_version INT,
rule_exec_time STRING,
rule_uuid STRING,
rule_version INT,
rule_name STRING,
rule_desc STRING... |
SQL scripts for TDS
|
ALTER TABLE activity ADD type int DEFAULT 1 NOT NULL COMMENT '1 - Generated by GPS location 2 - Generated by activity form';
ALTER TABLE distance MODIFY pathLength float NOT NULL;
ALTER TABLE distance MODIFY avgSpeed float; |
/*-------------------------------------------------------------------------
*
* foreign-data wrapper lua
*
* Copyright (c) 2013, PostgreSQL Global Development Group
*
* This software is released under the PostgreSQL Licence
*
* Author: Andrew Dunstan <andrew@dunslane.net>
*
* IDENTIFICATION
... |
/*
Warnings:
- Made the column `votes` on table `Post` required. This step will fail if there are existing NULL values in that column.
*/
-- AlterTable
ALTER TABLE "Post" ALTER COLUMN "votes" SET NOT NULL,
ALTER COLUMN "votes" SET DEFAULT 0;
|
delete from HtmlLabelIndex where id=20420
/
delete from HtmlLabelInfo where indexid=20420
/
INSERT INTO HtmlLabelIndex values(20420,'是否生成项目日程')
/
INSERT INTO HtmlLabelInfo VALUES(20420,'是否生成项目日程',7)
/
INSERT INTO HtmlLabelInfo VALUES(20420,'Build Work Plan',8)
/ |
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema mydb
-- -... |
-- users
delete from users;
insert into users (id, login_id, login_password, nick_name, created_at, updated_at)
values (1, 'taro@local', 'taro12345', '太郎', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
insert into users (id, login_id, login_password, nick_name, created_at, updated_at)
values (2, 'ziro@local', 'ziro12345', '二郎... |
INSERT INTO RODRIGOSCHEUER
(ID_PESSOA, NM_PESSOA)
VALUES
(3, 'Mario') |
insert into engines(model, engine_type, production_date) values ( 'TFSI quattro', 0, '2020-01-23' );
insert into engines(model, engine_type, production_date) values ( 'F92', 2, '2017-05-08' );
insert into engines(model, engine_type, production_date) values ( '594 cc', 0, '1993-08-15' );
insert into engines(model, engin... |
-- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Czas generowania: 07 Cze 2017, 14:21
-- Wersja serwera: 5.6.26
-- Wersja PHP: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40... |
select
i.unique_invoice_id,
i.customer_code,
i.ship_date,
rank() over (partition by i.customer_code order by i.ship_date, i.invoice_number ASC) AS account_paid_coffee_invoice_number
from {{ref('ar_invoice_history_header')}} i
join {{ref('warehouse_invoice_aggregates')}} ia on ia.unique_invoice_id = i.unique_... |
CREATE TABLE `Test` (
`testId` STRING(36) NOT NULL,
`uniqueStringTest` STRING(MAX) NOT NULL,
`stringTest` STRING(MAX) NOT NULL,
`nullableStringTest` STRING(MAX),
`intTest` INT64 NOT NULL,
`nullableIntTest` INT64,
`floatTest` FLOAT64 NOT NULL,
`nullableFloatTest` FLOAT64,
`timestampTest` TIMESTAMP NOT ... |
insert into user_details(username, first_name, last_name) values('username', 'first', 'last');
|
SET time_zone = "+05:30";
USE smalr;
CREATE TABLE IF NOT EXISTS urlBank (
id int(11) NOT NULL AUTO_INCREMENT,
url varchar(1000) DEFAULT NULL,
shortcode varchar(20) DEFAULT NULL,
time_stamp DATETIME DEFAULT NULL,
PRIMARY KEY (id)
);
|
drop database if exists lmsdb;
create database lmsdb default charset utf8 collate utf8_general_ci;
use lmsdb;
/*********系统日志表*****************/
drop table if exists t_comm_log;
create table t_comm_log(
row_id bigint(20) not null auto_increment,
operator_id bigint(20),
operator_code varchar(32),
operato... |
/*
Welcome to your first dbt model!
Did you know that you can also configure models directly within SQL files?
This will override configurations stated in dbt_project.yml
Try changing "table" to "view" below
*/
{{ config(materialized='table') }}
with source_data as (
select 1 as id, current_tim... |
CREATE TABLE [ADM].[C_CATALOGO_LISTA] (
[ID_CATALOGO_LISTA] INT IDENTITY (1, 1) NOT NULL,
[NB_CATALOGO_LISTA] NVARCHAR (100) NOT NULL,
[DS_CATALOGO_LISTA] NVARCHAR (1000) NULL,
[ID_CATALOGO_TIPO] INT NOT NULL,
[FG_SISTEMA] BIT ... |
#3、查询所有到今天为止应还书但还未还书的读者姓名、所借书名、应归还日期
SELECT
(SELECT rname FROM reader WHERE br.`rid`=rid)AS 读者姓名,
(SELECT bname FROM book WHERE br.`nif`=bid)AS 所借书的书名,
br.`willdate` AS 应归还日期
FROM borrow br WHERE
returndate IS NULL
AND DATE(br.`willdate`)<DATE(NOW());
#4、查询各种图书未借出的本数,显示查询书名和本数
SELECT
(SELECT bname FRO... |
/* Create Comments, Sequences and Triggers for Autonumber Columns */
COMMENT ON TABLE "ADM_TFEST" IS 'tabla donde se alamcenan los festivos del año con sus respecyivas fechas'
;
COMMENT ON COLUMN "ADM_TFEST"."FEST_FEST" IS 'Id de la tabla festivos'
;
COMMENT ON COLUMN "ADM_TFEST"."FEST_FECH" IS 'Fecha del festivo... |
create table user_store
(
id mediumint unsigned auto_increment comment '表id'
primary key,
user_id mediumint unsigned default 0 not null comment '用户id',
store_name varchar(50) null comment '店铺名',
true_name varchar(50) null comment '真名',
qq ... |
CREATE TABLE conditionadvice (
id CHAVE NOT NULL,
id_condition CHAVE NOT NULL,
id_advice CHAVE NOT NULL,
display BOOLEAN NOT NULL,
CONSTRAINT pk_conditionadvice PRIMARY KEY (id)
); |
/*Find films whose lengths are greater than the list of the average lengths*/
SELECT film_id, length FROM film
HAVING length > ALL (SELECT AVG(length) FROM film GROUP BY rating); |
SELECT tt.col_id AS Id,
tt.col_deadline AS Deadline,
tt.col_goal AS Goal,
tt.col_icon AS Icon,
tt.col_icon AS IconName,
tt.col_leaf AS Leaf,
tt.col_maxallowed AS MaxAllowed,
tt.col_name AS Name,
tt.col_required AS Required,
tt.col_taskorder AS TaskOrder,
... |
use mis
set character set utf8;
DELIMITER $$
CREATE DEFINER = 'root'@'localhost' PROCEDURE `get_seq`(
IN v_table_name VARCHAR(50),
OUT f_new_id INTEGER
)
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
declare v_current_id int(11);
declare v_step int(11);
... |
CREATE TABLE image_meta_data
(
"id" SERIAL PRIMARY KEY,
"name" VARCHAR(1000),
"creation_date" TIMESTAMP DEFAULT now(),
"size" INTEGER
) |
DEFINE DBF_NAME="smcfs_95.dbf";
DEFINE USER_NAME="OOB95";
DEFINE TABLESPACE_NAME="YFS";
CREATE SMALLFILE TABLESPACE &TABLESPACE_NAME DATAFILE '/u01/app/oracle/oradata/orcl/&DBF_NAME' SIZE 100M AUTOEXTEND ON NEXT 10K MAXSIZE UNLIMITED NOLOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
CREATE USER &USER_N... |
-- --------------------------------------------------------
-- Host: localhost
-- Server version: 5.7.19 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 9.4.0.5125
-- --------------------------------------------------------
/*... |
create table if not exists order_status
(
id bigint not null auto_increment,
order_id bigint not null,
status_id bigint not null,
status_date datetime(6) not null,
primary key (id),
foreign key (status_id) references status (id),
foreign key (order_id) references... |
-- teste des séquences:
--transaction collrction d'instructions
-- SEQUENCE 1
set transaction read only;
-- la transaction ne prend en charge que des lectures
/*
SQL> set transaction read only;
Transaction definie.
*/
select * from cat;
update emp set fonction='commerciale' where fonction='commercia... |
DROP TABLE IF EXISTS `aime`;
CREATE TABLE IF NOT EXISTS `aime` (
`id_aime` int(4) NOT NULL,
`date_aime` datetime NOT NULL,
`id_utilisateur` int(4) NOT NULL,
`id_publication` int(4) NOT NULL,
PRIMARY KEY (`id_aime`),
KEY `id_utilisateur` (`id_utilisateur`),
KEY `id_publication` (`id_publication`)
) ENGINE... |
INSERT INTO notes (note_name, content, folder_id)
VALUES
('Go to the doctor', 'Find out what this rash is.', 1),
('Call Mom', '...or else.', 1),
('Pay bookie before Friday', 'Cannot be late again.', 1),
('LEGOS', 'Need to build ALL the things!', 2),
('Star wars', 'Why, Disney? WHY?', 2),
('Party', 'Wizard, Paladin, Orc... |
SELECT name, MIN(cost)
FROM items WHERE name
LIKE '%boxes of frogs' AND
seller_id IN (68, 6, 18); |
delete from SystemRightDetail where rightid =1184
/
delete from SystemRightsLanguage where id =1184
/
delete from SystemRights where id =1184
/
insert into SystemRights (id,rightdesc,righttype) values (1184,'图表元素使用权限','0')
/
insert into SystemRightsLanguage (id,languageid,rightname,rightdesc) values (1184,7,'图表元素使用权限'... |
create table "Producto"
(
"Id" serial
constraint producto_pk
primary key,
"PrecioUnitario" numeric not null,
"Costo" numeric not null
);
alter table "Producto"
owner to postgres;
create unique index producto_id_uindex
on "Producto" ("Id");
create table "Cl... |
------------------creacion de directorios
create or replace directory texternal_data as '/u01/app/oracle/texternal/data';
------------------LISTAR DIRECTORIOS
select *from all_directories
------------------creacion de tablas externas
CREATE TABLE XX_EMPLOYEES_ALL(
Codigo NUMBER(4),
Empleado CHAR(50),
Fecha_inic... |
------------------------------- Top 5 Apple Actions
------- The events table tracks every time a user performs a certain action (like, post_enter, etc.) on a platform (android, web, etc.).
------- Write a query to determine the top 5 actions performed during the month of November 2020, for actions performed on an App... |
SET SERVEROUTPUT ON
SET PAGESIZE 200
SET LINESIZE 100
prompt *************************************************************
prompt ******************** DROP TABLE *****************************
prompt *************************************************************
DROP TABLE Table_Faits CASCADE CONSTRAINTS;
DROP... |
insert into checkout
select * from cart
where user_id=$1;
DELETE
from cart
where user_id=$1;
-- insert into orders(user_id,item_id,total_price)
-- values($1,$2,$3); |
DELETE FROM `db_version` WHERE `db_name`='ArcDB' AND `revision`=1 AND `game_version`='3.3.5a' AND `LastUpdate`='2014_10_01_01_Argent_Tournament';
INSERT INTO `db_version` (`db_name`,`revision`,`game_version`,`LastUpdate`) VALUES ('ArcDB',1,'3.3.5a','2014_10_02_01_waypoints');
SET @GUID1 := 122572;
UPDATE `creature_spa... |
ALTER TABLE `user_storage` DROP `max_energy`;
-- Remove unsigned
ALTER TABLE `improvements` CHANGE `more_upgrade_research_speed` `more_upgrade_research_speed` FLOAT NULL DEFAULT NULL, CHANGE `more_unit_build_speed` `more_unit_build_speed` FLOAT NULL DEFAULT NULL;
ALTER TABLE `units` ADD `bypass_shield` BOOLEAN NOT N... |
DECLARE
v_errorcode NUMBER;
v_createddate DATE;
v_createdby NVARCHAR2(255);
v_OrgChart_Id NUMBER;
v_cnt NUMBER;
BEGIN
v_errorcode:= 0;
v_OrgChart_Id := :OrgChart_Id;
BEGIN
DELETE FROM TBL_PPL_ORGCHARTMAP
WHERE COL_ORGCHARTORGCHARTMAP = v_OrgChart_Id;
EXCEPTION
... |
CREATE TABLE IF NOT EXISTS groups (id int, name VARCHAR(50), PRIMARY KEY (id));
CREATE TABLE IF NOT EXISTS students (id INT AUTO_INCREMENT, name VARCHAR(50), groupID INT, PRIMARY KEY (id));
INSERT INTO groups VALUES ('1', 'TestGroup');
INSERT INTO students VALUES ('1', 'TestStudet', '1'); |
CREATE TABLE error_logs(
error_id INT IDENTITY(1,1) NOT NULL
,error_no INT NULL
,error_msg TEXT(2147483647) NOT NULL
,occurence INT NULL
,error_type VARCHAR(1) NULL
,page_url TEXT(2147483647) NULL
,created_by INT NULL
,created_date DATETIME NULL
,updated_by INT NULL
,updated_date DATETIME NULL) |
use yasl
create table users_songs(
id int unsigned not null primary key auto_increment ,
user_id int unsigned not null,
artist_id int unsigned not null,
album_id int unsigned not null,
song_id int unsigned not null,
var1 text,
var2 text);
|
-- Replace database with new information below if it already exists on the server.
-- Create a new database labeled 'bamazon' on the server.
-- Make known that the database labeled 'bamazon' is being referenced.
--Create a new table labeled 'products' in 'bamazon' database.
-- Add a column labeled 'product_id', and ... |
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.optimize.sort.dynamic.partition=true;
CREATE DATABASE IF NOT EXISTS hwxdemo;
USE hwxdemo;
drop table if exists flights_csv purge;
drop table if exists airports_csv purge;
drop table if exists airlines_csv purge;
drop table if exists planes_csv purge;
create ta... |
# --- !Ups
create table VisitorLog (
id bigint not null AUTO_INCREMENT,
Advertisement_id bigint not null,
hitCount integer DEFAULT 0,
primary key (id),
foreign key (Advertisement_id) references Advertisement(id)
);
# --- Reason : add field counter to save user count visited
INSERT INTO Vi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.