text stringlengths 6 9.38M |
|---|
/*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
... |
SELECT gt.insert_date order_entry_time
,gtr.refnum_value order_type
,gt.gtm_transaction_xid transaction_number
,c.contact_xid customer_id
,c.first_name || ' ' || c.last_name customer_name
,nvl(gdp.address_line_1, ' ') ship_to_address
,(
CASE
WHEN gtls.status_type_gid = 'CCE.TL_RPLS'
THEN nvl(nvl(gtls.in... |
/********************
* PC Deployment PC Shortage
*********************/
DELETE FROM code WHERE code_bunrui = '20009';
INSERT INTO code VALUES ('20009','001','所属',10);
INSERT INTO code VALUES ('20009','002','設置地区',20);
INSERT INTO code VALUES ('20009','003','設置場所',30);
INSERT INTO code VALUES ('20009','004','設置階',40)... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 20, 2015 at 11:29 PM
-- Server version: 5.6.17-log
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT... |
/*******************************************PUNTO 4*****************************************************/
/*
Generar las estructuras necesarias para dar soporte a las consultas de mediciones
por fecha y por usuario , debido a que tenemos restricción de que estas no pueden demorar
más de dos segundos y tenemos previsto... |
-- What is the average account balance for the suppliers in every country?
SELECT n_name, AVG(s_acctbal)
FROM nation, supplier
WHERE n_nationkey = s_nationkey
GROUP BY n_name |
ALTER TABLE people
DROP COLUMN DateOfBirth; |
create database test_sophos;
CREATE TABLE `test_sophos`.`users` (
`id` INT NOT NULL,
`firstname` VARCHAR(45) NULL,
`lastname` VARCHAR(45) NULL,
`email` VARCHAR(100) NULL,
`user` VARCHAR(45) NULL,
`is_active` TINYINT NULL,
PRIMARY KEY (`id`));
|
/*1. List the customer number, the name (first and last), and the balance of customers.*/
SELECT
CUSTNO,
CUSTFIRSTNAME,
CUSTLASTNAME,
CUSTBAL
FROM ORDERCUSTOMER ;
/*2. List the customer number, the name (first and last), and the balance of
customers who reside in Colorado (CustState is CO).*/... |
ALTER TABLE productosxcliente
ALTER COLUMN id DROP DEFAULT;
|
-- Item Cost
SELECT dropIfExists('VIEW', 'itemcost', 'api');
CREATE OR REPLACE VIEW api.itemcost
AS
SELECT item.item_number::character varying(100) AS item_number,
costelem.costelem_type::character varying(100) AS costing_element,
itemcost.itemcost_actcost AS actual_cost,
curr_symbol.curr... |
INSERT INTO skill_clusters ( skill_code, skill_title, skill_parent )
VALUES ('DAD', 'DATABASE ADMINISTRATION AND DEVELOPMENT', null);
INSERT INTO skill_clusters ( skill_code, skill_title, skill_parent )
VALUES ('DAD-A', 'Analyze and Design Database', 'DAD');
INSERT INTO skill_clusters ( skill_code, skill_title, skill... |
REM export.sql
REM Version 1.0, last updated 5/9/97
REM This package implements a 'PL/SQL schema exporter'. It will query
REM the data dictionary views all_source, all_objects and/or all_triggers
REM to determine the source code for PL/SQL objects of type PROCEDURE,
REM FUNCTION, PACKAGE, PACKAGE BODY, or TRIGGER... |
SELECT * FROM items
WHERE cost > 463
ORDER BY cost DESC; |
/* In this demo we learned to
1) drop an attribute
*/
use pokedex;
insert into pokemon(pokemon_id, pokemon_name, no_evolutions, gender)
values ("1", "pikachu",1,"F");
alter table pokemon drop no_evolutions;
select * from pokemon; |
/*
course_id
root_account
user_id
role
section_id
status
associated_user_id
*/
WITH current_students AS (
SELECT *
FROM TABLE(EDUMATE.get_currently_enroled_students(current date))
),
student_enrolments AS (
SELECT
vcec.course_id,
null AS "ROOT_ACCOUNT",
contact.contact_id || '.' || stu... |
-- capture file-okban való keresés
cd capture dir
cd /opt/oradump/pfup/grb_pf_live_capture_0502_bck
grep 'get_package_status' ./*/*/*/*rec
strings ./capfiles/inst1/aa/wcr_cnxzuh000000v.rec |less
*/
-- FULL reszletes divergencia
-- *****************************
select
DBMS_WORKLOAD_REPLAY.GET_DIVERGING_STATEM... |
--7 Liste a diferença que representará o reajuste aplicado no item anterior no somatório dos salários de todos os empregados.
select SUM(Salario*0145) as Soma
from Empregado
where IDDepartamento IN (10)
--8 Liste o departamento que possui o empregado de maior salário.
Select top 1 Empregado.IDDepartamento,
Departa... |
COMMENT ON TABLE ADM_TALMA
IS 'TABLA DE LOS TIPOS DE ALMACENAMIENTO DEL CONTROL DOCUMENTAL'
;
COMMENT ON COLUMN ADM_TALMA.ALMA_ALMA
IS 'ID DE LA TABLA TIPOS DE ALMACENAMIENTO'
;
COMMENT ON COLUMN ADM_TALMA.ALMA_NOMB
IS 'NOMBRE DEL TIPO DE ALMACENAMIENTO'
;
COMMENT ON COLUMN ADM_TALMA.ALMA_CREA
IS 'ID DEL CREADO... |
create table Salida(
id_salida int not null auto_increment,
fecha datetime not null,
id_empleado int not null,
primary key (id_salida)
);
create table Empleado(
id_empleado int not null auto_increment,
usuario varchar(30) not null unique,
password varchar(255) not null,
nombre varchar(30) not null,
apellido varchar(30... |
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50625
Source Host : localhost:3306
Source Database : zjgt
Target Server Type : MYSQL
Target Server Version : 50625
File Encoding : 65001
Date: 2017-05-08 19:11:13
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... |
-- descendant
SELECT
s2.*
FROM
nested_set as s1
INNER JOIN
nested_set as s2
ON
s2.nsleft BETWEEN s1.nsleft AND s1.nsright
WHERE
s1.id = 5
-- ancestor
-- SELECT
-- s1.*, s2.*
-- FROM
-- nested_set as s1
-- INNER JOIN
-- nested_set as s2
-- ON
-- s1.nsleft BETWEEN s2.nsleft AND s2.nsright
-- WHERE... |
DROP VIEW IF EXISTS grape.v_active_sessions;
CREATE OR REPLACE VIEW grape.v_active_sessions AS
SELECT
s.session_id,
s.ip_address,
s.date_inserted,
s.last_activity,
s.session_origin,
s.headers,
u.username,
u.email,
u.fullnames
FROM grape."session" s
JOIN grape."user" u USING (user_id)
ORDER BY d... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 28, 2020 at 01:58 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
The Employee table holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id.
+----+-------+--------+--------------+
| Id | Name | Salary | DepartmentId |
+----+-------+--------+--------------+
| 1 | Joe | 70000 | 1 |
| 2 | Jim | 90000 | 1 ... |
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Mar 23 Mai 2017 à 17:33
-- Version du serveur : 5.7.18-0ubuntu0.16.04.1
-- Version de PHP : 7.0.15-0ubuntu0.16.04.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 ... |
-- Table: cogs.seasons
-- DROP TABLE cogs.seasons;
CREATE TABLE IF NOT EXISTS cogs.seasons
(
guild_id bigint NOT NULL,
event_name character varying COLLATE pg_catalog."default" NOT NULL,
from_date timestamp without time zone,
to_date timestamp without time zone,
icon bytea,
banner bytea,
C... |
-- Create table adding FOREING KEY
-- DDL query to create state_id with a FOREING KEY
CREATE DATABASE IF NOT EXISTS hbtn_0d_usa;
-- set database
USE hbtn_0d_usa;
-- create table if doesnt exist
CREATE TABLE IF NOT EXISTS cities(
id INT NOT NULL AUTO_INCREMENT UNIQUE,
state_id INT NOT NULL,
name VARCHAR(256) NOT NULL,
... |
INSERT INTO ready.t_detections
(DETECTION_TIME, HEIGHT, DISTANCE, IS_OURS, IS_SHUTDOWN, IMAGE_URL)
VALUES ('Wed Feb 20 2019 23:59:20 GMT+0200 (GMT+02:00)', 1000.32432432, 105.565442, 1, 0, 'airplane1.jpg');
INSERT INTO ready.t_detections
(DETECTION_TIME, HEIGHT, DISTANCE, IS_OURS, IS_SHUTDOWN, IMAGE_URL)
VALUES... |
INSERT INTO HtmlLabelIndex VALUES(17869,'管理员设置')
/
INSERT INTO HtmlLabelInfo VALUES(17869,'管理员设置',7)
/
INSERT INTO HtmlLabelInfo VALUES(17869,'SysadminSet',8)
/
CALL MMConfig_U_ByInfoInsert(11,9)
/
CALL MMInfo_Insert (383,17869,'管理员设置','/systeminfo/sysadmin/sysadminList.jsp','mainFrame',11,1,9,0,'',0,'',0,'','',0,... |
-- $Header: /u999/cvsadmin/cms_rep/repository/local_acc/usr/sql/sec_secureemail_job.sql,v 1.1 2019/02/28 02:07:54 cvsadmin Exp $
-- ----------------------------------------------------------------------------------------------
-- Script : sec_secureemail_job
-- Changes :
-- Seq Name Date Descr... |
SELECT
EMPLOYEE.EMPLOYEE_ID,EMPLOYEE_NAME,DONATION_AMMOUNT
FROM EMPLOYEE JOIN EMPLOYEE_DONORS ON
EMPLOYEE.EMPLOYEE_ID = EMPLOYEE_DONORS.EMPLOYEE_ID
JOIN DONORS ON EMPLOYEE_DONORS.TICKET_NO = DONORS.TICKET_NO
; |
CREATE DATABASE Yago;
USE Yago;
CREATE TABLE labels (ID INT PRIMARY KEY AUTO_INCREMENT,LABEL VARCHAR(255) NOT NULL,NAME VARCHAR(255) NOT NULL);
CREATE TABLE facts (ID INT PRIMARY KEY AUTO_INCREMENT,SUBJECT VARCHAR(255) NOT NULL,PREDICATE VARCHAR(255) NOT NULL,OBJECT VARCHAR(255) NOT NULL);
|
CREATE TABLE `vms_db`.`vms_users`
( `id` INT NOT NULL AUTO_INCREMENT ,
`name` VARCHAR(30) NOT NULL ,
`pw` VARCHAR(30) NOT NULL ,
`status` INT NOT NULL DEFAULT '1' ,
`remark` TEXT NOT NULL ,
PRIMARY KEY (`id`),
UNIQUE (`name`)
) ENGINE = InnoDB CHARSET=utf8 COLLATE utf8_general_ci
COMMENT = 'accoun... |
set feedback on
set echo on
spool Lab1.lst
-- ***************************************************************
-- * CSc 365 LAB #1 Spring 2007
-- * Author: Daniel Jackson Date: April 6, 2007
-- *
-- * The purpose of this lab is to setup the work environment,
-- * ... |
DECLARE
v_permissions NVARCHAR2(1000);
v_sql VARCHAR2(2000);
v_typeId NVARCHAR2(250);
v_Id NVARCHAR2(250);
v_ObjectTypeId INTEGER;
v_UIElementCode NVARCHAR2(255);
v_UIElementId INTEGER;
BEGIN
v_sql := 'SELECT * ';
--determinating builder
IF (:PageConfigId IS NOT NULL) TH... |
--
-- SOC
--
-- script para eliminar las tablas que ya no se estan usando en el aplicativo SOC
-- @author: John Heredia, <jhon.heredia@juanvaldezcafe.com>.
-- @author: Diego Poveda, <diego.poveda@softstudio.co>.
-- @version: 1.0
--
drop TABLE aprobaciones
--drop TABLE bodegas_logicas
drop TABLE productosxr... |
CREATE or REPLACE TRIGGER Tri_URole_workflow_createlist
after insert or update or delete ON HrmRoleMembers
for each row
Declare
workflowid_1 integer ;
type_1 integer ;
objid_1 integer ;
level_1 integer ;
userid_1 integer ;
begin
delete from workflow_createrlist ;
for tmp_cursor in ( select workflowid,... |
create table nts_notice_read_log
(
id bigint(64) auto_increment comment '主键'
primary key,
login_name varchar(255) null comment '账号',
notice_id bigint(32) null comment '消息公告id',
read_flag tinyint(2) default 1 null comment '阅读标识0-未阅读 1-已阅读'
);
|
-- Copyright (c) 2014, Todd M. Kover
-- All rights reserved.
--
-- 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 b... |
CREATE TABLE individual_contribution_temp
(
committee_fec_id character varying(9),
amendment_ind character varying(1),
report_type character varying(3),
transaction_pgi character varying(5),
image_num character varying(18),
transaction_type character varying(3),
e... |
create schema IF NOT Exists NCVoters;
use NCVoters;
create table IF NOT Exists voters (
`county_id` smallint(2),
`county_desc` varchar(15),
`voter_reg_num` char(12),
`status_cd` char(2),
`voter_status_desc` varchar(25),
`reason_cd` char(2),
`voter_status_reason_desc` varch... |
select m.number, p.first_name, p.last_name, sum(score) as points_matchday from events
inner join players p on p.id = events.player_id
inner join matchdays m on events.matchday_id = m.id
group by m.number, p.first_name, p.last_name;
select avg(sub.points_matchday) from
(select m.number, p.first_name, p.last_name, s... |
create table follow
(
id BIGINT auto_increment primary key,
user_id bigint not null,
follow_type int not null,
follow_id bigint not null,
gmt_create bigint
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
|
SELECT AVG(rating)
FROM ratings
WHERE movie_id IN
(SELECT id
FROM movies
WHERE year=2012); |
-- Lists all records of table second_table
SELECT score,name FROM second_table
WHERE name != ""
ORDER BY score DESC;
|
use classicmodels;
-- muốn biết có bao nhiêu đơn đặt hàng trong mỗi trạng thái, chúng ta có thể sử dụng hàm COUNT với mệnh đề GROUP BY
select status, COUNT(*) as 'So luong status'
from orders
group by status;
-- thực hiện tính tổng số tiền của các đơn hàng theo trạng thái đặt hàng
select status, sum(quantityOrdered ... |
-- Create the SOILS_LAB table
create table FIA.SOILS_LAB(
CN varchar(34),
PLT_CN varchar(34),
INVYR numeric(4,0),
STATECD numeric(4,0),
COUNTYCD numeric(3,0),
PLOT numeric(5,0),
SMPLNNBR numeric(3,0),
VSTNBR numeric(1,0),
LAYER_TYPE varchar(10),
SAMPLER_TYPE varchar(2),
QASTATCD numeric(1,0),
SAMPLE_DATE da... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 30 Agu 2021 pada 01.00
-- Versi server: 10.4.20-MariaDB
-- Versi PHP: 7.4.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
DROP TABLE IF EXISTS `admin`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(20) NOT NULL,
`password` char(32) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=... |
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1
-- Время создания: Мар 23 2019 г., 14:43
-- Версия сервера: 5.5.25
-- Версия PHP: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4010... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 27-10-2020 a las 03:39:32
-- 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_... |
DELETE FROM bin
WHERE shelfid = $1 AND binname = $2; |
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 21-10-2018 a las 23:12:57
-- 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... |
DROP TABLE CUSTOMER_ES_ALLOCATION;
CREATE TABLE CUSTOMER_ES_ALLOCATION
(
CUST_ID VARCHAR2(50),
ES_CONTRIBUTION DECIMAL(10,2),
ES_ALLOCATION DECIMAL(10,2),
REPORTING_DATE VARCHAR2(50),
... |
# 已更新到 福利内购
# 已更新到 企业采购
ALTER TABLE `ims_superdesk_shop_enterprise_import_log`
ADD `old_price` decimal(10,2) DEFAULT '0' COMMENT '原金额' AFTER `account_id`;
|
CREATE DATABASE polling_app;
USE polling_app;
CREATE TABLE `users` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(40) NOT NULL,
`username` varchar(15) NOT NULL,
`email` varchar(40) NOT NULL,
`password` varchar(100) NOT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NU... |
CREATE TABLE [Enhabit].[Listings]
(
[ListingId] uniqueidentifier NOT NULL,
[UserId] uniqueidentifier NOT NULL,
[LandlordId] uniqueidentifier NOT NULL,
[PicturesId] uniqueidentifier NULL,
[UniversityId] uniqueidentifier NOT NULL,
[Address] VARCHAR(250) NOT NULL,
[Unit] VARCHAR(10) NULL,
[XCoordinate] ... |
CREATE PROCEDURE dbo.sp_DeleHistoricoSituacoes @IdOcorrenciaPFPJ Int
AS
SET NOCOUNT ON
DELETE OcorrenciasPFPJ_SituacoesOcorrencia
WHERE IdOcorrenciaPFPJ = @IdOcorrenciaPFPJ
SET NOCOUNT OFF
|
insert into upcoming_tracks(upcoming_track_title, release_date) values ("Roses","2018/01/01");
insert into upcoming_tracks(upcoming_track_title, release_date) values ("Don't Let Me Down","2019/02/03");
insert into upcoming_tracks(upcoming_track_title, release_date) values ("All We Know","2017/09/01");
insert into up... |
INSERT INTO POKEMON_ALOLA_SPECIES VALUES('Rattata', 19, 60, 103, 70, 588, 2, 13);
INSERT INTO POKEMON_ALOLA_SPECIES VALUES('Raticate', 20, 110, 161, 144, 1550, 13, 2);
INSERT INTO POKEMON_ALOLA_SPECIES VALUES('Raichu', 26, 120, 201, 172, 2143, 4, 15);
INSERT INTO POKEMON_ALOLA_SPECIES VALUES('Sandshrew', 27, 100, 125, ... |
delete from HtmlLabelIndex where id=24743
/
delete from HtmlLabelInfo where indexid=24743
/
INSERT INTO HtmlLabelIndex values(24743,'审批人')
/
INSERT INTO HtmlLabelInfo VALUES(24743,'审批人',7)
/
INSERT INTO HtmlLabelInfo VALUES(24743,'approve',8)
/
INSERT INTO HtmlLabelInfo VALUES(24743,'審批人',9)
/
delete from HtmlLa... |
drop table if exists artist CASCADE;
drop table if exists song CASCADE;
drop table if exists playlist CASCADE;
drop table if exists addedTo CASCADE;
drop sequence if exists hibernate_sequence;
create sequence hibernate_sequence start with 1 increment by 1;
create table song (id bigint not null, title varchar(255), arti... |
/*
Navicat PGSQL Data Transfer
Source Server : 144000.tv
Source Server Version : 90606
Source Host : 144000.tv:5432
Source Database : nc
Source Schema : public
Target Server Type : PGSQL
Target Server Version : 90606
File Encoding : 65001
Date: 2018-08-21 21:19:12
*/
-- -... |
with
source_data as (
select
businessentityid
, territoryid
, salesquota
, bonus
, commissionpct
, salesytd
, saleslastyear
-- , rowguid
-- , modifieddate
from `woven-passkey-328019`.`querry_a... |
--
-- 转存表中的数据 `qs_store_category`
--
INSERT INTO `qs_store_category`(`id`,`alias`,`name`,`ordid`) VALUES
(NULL,'QS_property_type','步行商业街',0),
(NULL,'QS_property_type','社区商业',0),
(NULL,'QS_property_type','写字楼配套',0),
(NULL,'QS_property_type','市场',0),
(NULL,'QS_property_type','购物中心',0),
(NULL,'QS_property_type','独立商业',0... |
--Create a MySQL Database called `bamazon`.
CREATE DATABASE bamazon;
--Then create a Table inside of that database called `products`.
--The products table should have each of the following columns:
--item_id (unique id for each product)
--product_name (Name of product)
--department_name
--price (cost to customer)
--sto... |
create table Empresa(
Id_Empresa int identity(1,1) primary key,
Nombre varchar,
);
create table Disciplina (
Id_Disciplina int identity(1,1) primary key,
Nombre varchar,
Naturaleza varchar,
Finalidad varchar
);
create table Periodico(
Id_Periodico int identity(1,1) primary key,
Nombre varc... |
insert into tutor(name) values ('Mnqjmuyylxmyugtwfzpkbdksrzyxzxuoiww');
insert into tutor(name) values ('Qteektjzodygobvnpmnutxfvzhyycemzaehqjjweykbfdvimkwoqctqqoxyhlp');
insert into tutor(name) values ('Ukrbywkxnjjdjbfxbme');
insert into tutor(name) values ('Bwpiwzqpanrsjzbpadahubwe');
insert into tutor(name) values (... |
IF NOT EXISTS (SELECT * FROM SYSOBJECTS WHERE NAME='#TABLENAME#' AND XTYPE='U')
CREATE TABLE #TABLENAME# (
[ID] INT NOT NULL,
[STARTEP] INT,
[ENDEP] INT,
[STARTDT] datetime,
[ENDDT] datetime,
PRIMARY KEY (ID),
);
|
drop table if exists hr_test_wifi;
CREATE TABLE hr_test_wifi (
row_id STRING,
mall_id STRING,
wifi_bssid STRING,
strong STRING
);
insert into hr_test_wifi(row_id,mall_id,wifi_bssid,strong)
select row_id, mall_id, wifi1, wifi1_strong
FROM hr_test WHERE wifi1 != '';
... |
SET SERVEROUTPUT ON;
/**
##### REQ 3: LISTADO DE SOCIOS Y SUS ABONADOS ######################################################################################
**/
SET SERVEROUTPUT ON;
CREATE OR REPLACE PROCEDURE listado_socios IS
--Cursor que almacena los socios
CURSOR c_socios IS
SELECT n... |
-- -----------------------
-- STATS
-- -----------------------
-- Kurinnaxx
UPDATE `creature_template` SET `HealthMultiplier`='50', `ManaMultiplier`='10', `MinLevelHealth`='333100', `MaxLevelHealth`='333100', `MinMeleeDmg`='1757', `MaxMeleeDmg`='2330' WHERE `Entry`='15348';
-- General Rajaxx
UPDATE `creature_templat... |
ALTER TABLE new_table RENAME TO users;
|
SET VAR:database_name=dymz_sales;
Create Database IF NOT EXISTS ${var:database_name}
COMMENT 'Parquet sales data imported from sales_raw database';
--Create Parquet sales Table
CREATE TABLE IF NOT EXISTS ${var:database_name}.product_region_sales_partition
COMMENT 'Parquet region and sales materialized table'
STORED A... |
/*
Navicat MySQL Data Transfer
Source Server : 本机连接测试邮件导入功能
Source Server Version : 50024
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50024
File Encoding : 65001
Date: 2015-09-11 17:23:08
*/
SET FOREIGN_KEY_... |
INSERT INTO gift_certificate (name, description, price, duration, create_date, last_update_date)
VALUES ('certificate 1', 'description 1', 1.1, 1000000, '2020-01-01 01:11:11', '2021-01-01 01:22:11'),
('certificate 2', 'description 2', 2.2, 2000000, '2020-02-02 02:22:22', '2021-02-02 02:33:22'),
('certific... |
-- phpMyAdmin SQL Dump
-- version 3.1.2deb1ubuntu0.1
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Ven 02 Octobre 2009 à 15:51
-- Version du serveur: 5.0.75
-- Version de PHP: 5.2.6-3ubuntu4.2
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-- --------------------------------------------------------
--
... |
/*
Navicat MySQL Data Transfer
Source Server : 10.2.10.201111
Source Server Version : 50540
Source Host : 10.2.10.201:3306
Source Database : yqxdc
Target Server Type : MYSQL
Target Server Version : 50540
File Encoding : 65001
Date: 2020-02-19 16:01:06
*/
SET FOREIGN_KEY_CHECKS=0;
... |
CREATE TABLE [ASData_PL].[Appfb_FeedbackTransaction](
[Id] [bigint] NOT NULL,
[ApprenticeFeedbackTargetId] [uniqueidentifier] NOT NULL,
[TemplateId] [uniqueidentifier] NULL,
[CreatedOn] [datetime] NOT NULL,
[SendAfter] [datetime] NULL,
[SentDate] [datetime] NULL,
[AsDm_UpdatedDateTime] datetime2 default getdate... |
DROP SEQUENCE CPI.INTERFUND_SEQ;
CREATE SEQUENCE CPI.INTERFUND_SEQ
START WITH 1
MAXVALUE 999999999999999999999999999
MINVALUE 1
NOCYCLE
NOCACHE
NOORDER;
|
-- Table: LOBBY_USER
CREATE TABLE STG_LOBBY_USER (
PLAYER_ID DECIMAL(16,2) NOT NULL DISTKEY PRIMARY KEY,
USER_ID DECIMAL(16,2) NOT NULL,
REG_TS timestamp without time zone SORTKEY,
DISPLAY_NAME character varying(255),
REAL_NAME character varying(255),
FIRST_NAME character varying(255),
PICTURE_LOCATION ch... |
CREATE TABLE Aluno (
id INT NOT NULL ,
nome VARCHAR (255),
email VARCHAR (255),
data_nascimento DATETIME,
PRIMARY KEY (id)
)
CREATE TABLE Turma (
id INT NOT NULL,
inicio DATETIME,
fim DATETIME,
observacoes LONGTEXT,
PRIMARY KEY (id)
)
CREATE TABLE AlunoTurma (
aluno_id INT ... |
SELECT * FROM hw1_table;
insert into hw1_table
values('aaba', 55, 54, 60, 50);
select * from hw1_table;
insert into hw1_table
values('bbb', 32, 43, 50, 25),
('ccc', 88, 95, 100, 89),
('ddd', 16, 15, 16, 16),
('eeabe', 34, 25, 34, 20);
select * from (hw1_table)
where (low between 30 and 50);
select * ... |
DECLARE
V_RESULT VARCHAR2(255);
V_CASE_ID INTEGER;
V_STATE_CONF_ID INTEGER;
V_CASE_ACTIVITY VARCHAR2(255);
V_TARGET VARCHAR2(255);
V_FIND_INTO VARCHAR2(255);
V_SCENARIO VARCHAR2(255);
V_LINK_TYPE_CODE VARCHAR2(255);
V_IS_TRY_TO_CLO... |
UPDATE characters
SET character_id = $1,
character_name = $2,
character_description = $3
WHERE user_id = $4
AND character_id = $1;
SELECT *
FROM characters
WHERE user_id = $4
ORDER BY character_id; |
drop table if exists posts2;
create table posts2 (
id integer primary key autoincrement,
name text not null,
content text not null
);
|
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 80015
Source Host : localhost:3306
Source Schema : face_sign
Target Server Type : MySQL
Target Server Version : 80015
File Encoding : 65001
Date: 09/09/... |
select l.id_auth_location,
l.`name` as brand,
count(r.id)
from till t
inner join receipt r on (r.device_key=t.till_key)
left join AUTH_location l on (t.location_id = l.id_auth_location)
where id_auth_location is not NULL
group by id_auth_location
having count(r.id)>50; |
/*COPY employees
FROM 'C:\Users\Public\employees.csv'
DELIMITER ','
CSV HEADER;*/
/*COPY Departments
FROM 'C:\Users\Public\departments.csv'
DELIMITER ','
CSV HEADER;*/
/*COPY salaries
FROM 'C:\Users\Public\salaries.csv'
DELIMITER ','
CSV HEADER;
COPY titles
FROM 'C:\Users\Public\titles.csv'
DELIMITER ','
CSV HEADER;... |
DROP DATABASE IF EXISTS CIBPSDB;
CREATE DATABASE IF NOT EXISTS CIBPSDB;
USE CIBPSDB;
CREATE TABLE penghuni(
id_penghuni VARCHAR(6) NOT NULL,
nama VARCHAR(26) NOT NULL,
alamat VARCHAR(40),
pekerjaan VARCHAR(26),
no_hp VARCHAR(16),
kendaraan VARCHAR(26),
huni VARCHAR(16) NOT NULL,
bayar... |
DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE products(
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(40) NOT NULL,
department_name VARCHAR(30) NOT NULL,
price DECIMAL (10,2) NOT NULL,
stock_quantity INT (20) NOT NULL,
PRIMARY KEY (item_id)
);
SELECT * FROM ... |
use is_ski;
-- grad
insert into grad values('79101','Prijedor','BiH');
insert into grad values('78108','Banja Luka','BiH');
insert into grad values('71000','Sarajevo','BiH');
insert into grad values('78400','Gradiska','BiH');
insert into grad values('74101','Doboj','BiH');
-- osobe
insert into osoba values('02119931... |
CREATE TABLE [ADM].[K_ARCHIVO] (
[ID_ARCHIVO] UNIQUEIDENTIFIER NOT NULL,
[NB_ARCHIVO] NVARCHAR (512) NOT NULL,
[FI_ARCHIVO] VARBINARY (MAX) NOT NULL,
[FE_CREACION] DATETIME NOT NULL,
[FE_MODIFICACION] DATETIME NULL,
[... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 28 Jan 2020 pada 12.47
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
DROP TABLE IF EXISTS "tv_shows"; |
--<DQL종합실습문제> 2021.02.02
--@ 실습 문제
/*
문제1
기술지원부에 속한 사람들의 사람의 이름,부서코드,급여를 출력하시오
*/
select emp_name,
dept_code,
salary
from employee
where dept_code = (
select dept_id
from department
where dept_title = '기술지원부'
);
/*
... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 26, 2021 at 06:27 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
drop table game;
CREATE TABLE game(
game_id int primary key auto_increment,
name varchar(255) not null,
description longtext not null,
rating enum('0','1','2','3','4','5','6','7','8','9','10') not null,
author varchar(255) not null,
price double(9,2) default 10.0,
releaseDate datetime default ... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.7.24 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 10.2.0.5599
-- --------------------------------------------------------
/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.