text
stringlengths
6
9.38M
create table `reservation_request` ( `id` BIGINT AUTO_INCREMENT NOT NULL, `doctor_id` BIGINT, `patient_id` BIGINT, `clinic_id` BIGINT, `clinic_branch_id` BIGINT, `status` varchar(255), `reservation_date_time` DATETIME NOT NULL, PRIMARY KEY(`id`), FOREIGN KEY(doctor_id) references user (id) on delete no action on update...
/* * 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: Tom� * Created: 12.4.2016 */ CREATE TABLE band ( id BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, name VAR...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Oct 31, 2020 at 02:25 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.2.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
Create Procedure sp_get_CategoryBasedSplCategory (@Special_Cat_Code INT) As Select CategoryID from Special_Cat_Product where Special_Cat_Code=@Special_Cat_Code
-- addres_maps updates UPDATE backend_company SET address_maps = backend_address.address_maps FROM backend_address WHERE backend_company.id_migration = backend_address.id_migration; -- Company updates UPDATE backend_company SET legal_id_id = backend_legal.id FROM backend_legal WHERE backend_company.legal_id_migrat...
SELECT a.id AS id, a.numero AS numero, a.nom_voie AS nom_voie, a.rep AS rep, c.code_insee AS code_insee, a.code_post AS code_post, c.nom AS nom FROM {SCHEMA}.adresse a, {SCHEMA}.commune c WHERE a.code_insee = c.code_insee AND a.code_post like '{DEPARTEMENT}%'
-- script lists all cities contained in database -- record displays city id, name and state name -- ordered by cities.id SELECT cities.id, cities.name, states.name FROM cities INNER JOIN states ON cities.state_id=states.id ORDER BY cities.id ASC;
create index IX_EBCEF6CB on LP_LPServiceTimer (billId); create index IX_7B27FACF on LP_LPServiceTimer (clientId); create index IX_27C83AC5 on LP_LPServiceTimer (matterId); create index IX_A6E63C8F on LP_LPServiceTimer (userId);
SET NOCOUNT ON; -- Since the starting quantity can vary from 0-1, create a list of vendor-item pairs to identify the lowest level pricebreak. -- The first range = base cost and can be excluded from the matrix. WITH STARTLIST AS ( SELECT itemPrice.[Vendor No_] VENDORID, RTRIM(itemPrice.[Item No_]) ITEMNMBR, MIN(it...
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 17-Fev-2017 às 03:12 -- Versão do servidor: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
select texasTable.airline_name, SUM(texasTable.flight_count) as flight_count from (select A.airline_name ,F.plane_tail_number, count(*) as flight_count from flight_reports F, world_area_codes W, airline_codes A where W.wac_name = 'Texas' and W.wac_id = F.dest_wac_id and A.airline_code = F.airline_code ...
'SELECT * FROM employee_trackerdb.employee'
DROP DATABASE IF EXISTS todo_db; CREATE DATABASE todo_db; USE todo_db; CREATE TABLE items ( id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, text VARCHAR(50) NOT NULL, isDone BOOL NOT NULL DEFAULT 0 );
-- phpMyAdmin SQL Dump -- version 3.3.3 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jul 07, 2011 at 06:34 AM -- Server version: 5.5.8 -- PHP Version: 5.3.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SE...
/*Creation of strong entities*/ #create schema carfactory; create table factory( factoryID int unsigned not null, address text not null, faxNo varchar(20) not null, phoneNo varchar (20) not null, manager int unsigned, primary key(factoryID) ); create table staff( staffID int unsigned not null, f...
-- Q1: What is the average number of films rented per day, and the average days between rentals for the top 5 renting customers? WITH t1 AS ( SELECT customer_id, COUNT(*) AS num_of_films_rented, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS customer_rank FROM rental GROUP BY 1 ORDER BY 2 DESC LIMIT 5 ), t2 AS ( SEL...
-- Write a SQL query to find the salary of all employees whose salary is in the range [20000…30000]. SELECT e.Salary FROM dbo.Employees e WHERE e.Salary >= 20000 AND e.Salary <= 30000
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Tempo de geração: 05-Abr-2021 às 14:48 -- Versão do servidor: 8.0.21 -- versão do PHP: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
CREATE TABLE DrugMgmt ( DrugID int, DrugName varchar(255) );
SELECT * FROM soft_uni.employees; #Exercise 1 SELECT first_name, last_name FROM employees WHERE LOWER(substring(first_name, 1, 2)) = 'sa' ORDER BY employee_id; #Exercise 2 SELECT first_name, last_name FROM employees WHERE LOCATE('ei', LOWER(last_name)) ORDER BY employee_id; #Exercise 3 SELECT first_name FROM employe...
-- Grader report SET SEARCH_PATH TO markus; DROP TABLE IF EXISTS q4; -- You must not change this table definition. CREATE TABLE q4 ( assignment_id integer, username varchar(25), num_marked integer, num_not_marked integer, min_mark real, max_mark real ); -- You may find it convenient to do this...
.load ../utils/split.dylib create temporary table input(line TEXT); .mode csv .import 11_input.txt input create table all_seats as select value from input, split(input.line, ""); create table seats(x int, y int, status int, unique(x,y)); with dimensions(d) as ( select max(length(line)) from input ) insert ...
CREATE TABLE IF NOT EXISTS accounts ( id uuid PRIMARY KEY, email VARCHAR(40) NOT NULL UNIQUE, login VARCHAR(40) NOT NULL UNIQUE, password VARCHAR NOT NULL, balance NUMERIC(20, 2) DEFAULT 0.00 CONSTRAINT not_negative_balance CHECK (balance >= 0), created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP );
------------------------------------------------------------------------------ -- PostgreSQL Table Tranlation Engine - Helper functions uninstallation file -- Version 0.1 for PostgreSQL 9.x -- https://github.com/edwardsmarc/postTranslationEngine -- -- This is free software; you can redistribute and/or modify it under -...
-- Just detect problem with duplicate field on the screens -- Duplicate key error in Jira server on creating issue via REST API or accessing Custom Fields page in JIRA -- https://confluence.atlassian.com/jirakb/duplicate-key-error-in-jira-server-on-creating-issue-via-rest-api-or-accessing-custom-fields-page-in-jira-872...
#SELECT * FROM mydb.producto #WHERE nombre LIKE '%a' #5 productos más caros #SELECT * FROM mydb.producto #ORDER BY precio DESC #LIMIT 5 #VEGATALES PRECIO ENTRE 10 y 12 #SELECT * FROM mydb.producto #WHERE idcategoria = 2 AND precio BETWEEN 10 AND 12 #Cuanto ganaria si vendo todo el stock SELECT SUM(precio * stock)...
-- ================================================= -- Autor: Stephan Endres, Diego Salas -- Resumen: Procedimiento almacenado que imprime el mapa RISQ -- Fecha creacion: 20/08/2013 -- Fecha modificacion:29/01/2014 -- ================================================= CREATE or REPLACE Procedure PA_print IS pcontinent...
-- 1303. 求团队人数 -- 员工表:Employee -- -- +---------------+---------+ -- | Column Name | Type | -- +---------------+---------+ -- | employee_id | int | -- | team_id | int | -- +---------------+---------+ -- employee_id 字段是这张表的主键,表中的每一行都包含每个员工的 ID 和他们所属的团队。 -- 编写一个 SQL 查询,以求得每个员工所在团队的总人数。 -- -- 查询结果中的顺...
USE `arenafifadb`; DELIMITER $$ DROP PROCEDURE IF EXISTS `spCreateTablesTempAutomaticDraw` $$ CREATE PROCEDURE `spCreateTablesTempAutomaticDraw`() Begin DROP TABLE IF EXISTS `TB_AUTOMATIC_DRAW_TB_USUARIO_TEMP`; DROP TABLE IF EXISTS `TB_AUTOMATIC_DRAW_TB_TIME_TEMP`; CREATE TABLE `TB_AUTOMATIC_DRAW_TB_USUARIO_TEMP`...
prompt Created on 2012-04-24 by ljy prompt batch sql beginning... @@01_f_userinfo.sql; @@02_f_roleinfo.sql; @@03_f_optdef.sql; @@04_f_optinfo.sql; @@05_f_userrole.sql; @@06_f_rolepower.sql; @@07_f_usersetting.sql; @@08_f_datacatalog.sql; @@09_f_datadictionary.sql; @@10_clear.sql @@11_f_unitinfo.sql prompt batch sql e...
alter table Group_ add typeSettings long varchar; alter table SCProductEntry add tags varchar(300); alter table SCProductEntry add author varchar(75); create table SCProductScreenshot ( productScreenshotId bigint not null primary key, companyId bigint, groupId bigint, productEntryId bigint, thumbnailId bigint, ...
# 1. 테이블 생성 CREATE TABLE `favorite` ( `id` int NOT NULL AUTO_INCREMENT primary key, `name` varchar(16) NOT NULL, `url` varchar(512) NOT NULL, `createdAt` timestamp DEFAULT CURRENT_TIMESTAMP, `updatedAt` timestamp DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; # 2. 데이터 저장 INS...
select jou.*, jli.* from joujournal jou join jjoujlijli joujli on joujli.UIDjou = jou.jouUID join jlijournalline jli on jli.jliUID = joujli.journalLineUIDjli where jouSubjectId = 'b0448179-316a-402f-b2a0-213a1e13731b' #and jouType in ('PREMIUM_ORIGINAL', 'PREMIUM_ADDITIONAL', 'PREMIUM_RETURN') #and jli.jliType = 'PREMI...
INSERT INTO insuranceclaims( icid, subid, DATE ) VALUES( 34, 32, '2016-04-21 02:43:23' ); INSERT INTO insuranceclaims( icid, subid, DATE ) VALUES( 48, 38, '2016-05-07 23:29:03' ); INSERT INTO insuranceclaims( icid, subid, DATE ) VALUES( 25, 40, '2016-12-07 20:18:35' ); INSERT INTO insuranceclaims( icid, subid, DATE ...
SELECT USER FROM DUAL; --==>> SCOTT --■■■ UPDATE ■■■-- -- 1. 테이블에서 기존 데이터를 수정(변경)하는 구문 -- 2. 형식 및 구조 -- UPDATE 테이블명 -- SET 컬럼명 = 변경할값[, 컬럼명 = 변경할값, ...] -- [WHERE 조건절]; SELECT * FROM TBL_SAWON; --○ TBL_SAWON 테이블에서 사원번호 1004번 사원의 -- 주민번호를 [ 8802031234567 ] 로 수정한다. UPDATE TBL_SAWON SET 주민번호 = '8802031234567' WHE...
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50726 Source Host : localhost:3306 Source Schema : phone_store Target Server Type : MySQL Target Server Version : 50726 File Encoding : 65001 Date: 12/04/202...
CREATE TABLE usuario ( email VARCHAR(100) primary key, senha varchar(255) not null, codigo_grupo BIGINT ); alter table farmaceutico add column email_usuario VARCHAR(100) not null; alter table farmaceutico add constraint email_fk foreign key(email_usuario) references usuario(email);
CREATE TABLE ships ( ship TEXT NOT NULL PRIMARY KEY, weapon TEXT NOT NULL, hull TEXT NOT NULL, engine TEXT NOT NULL, FOREIGN KEY(weapon) REFERENCES weapons(weapon), FOREIGN KEY(hull) REFERENCES hulls(hull), FOREIGN KEY(engine) REFERENCES engines(engine) ); CREATE TABLE engines ( engin...
\encoding UTF8; SET client_min_messages TO WARNING; CREATE TABLE app.com_gruppo_cliente ( id SERIAL NOT NULL PRIMARY KEY, descrizione VARCHAR(255) NOT NULL ); CREATE TABLE app.com_divisa ( id SERIAL NOT NULL PRIMARY KEY, simbolo VARCHAR(255), iso_alpha VARCHAR(3), iso_num NUMERIC(3), descri...
UPDATE fdmail SET del_s = 1 WHERE id = ? AND sndr = ?
set names utf8; set foreign_key_checks = 0; USE overflowing; update challenge set description = "We are born in society. It's natural to communicate with people.\r\nStart a conversation with random completely strangers." where challenge_name = "Have A Conversation With Strangers"; update challenge set challenge_name ...
-- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64) -- -- Host: localhost Database: fa2 -- ------------------------------------------------------ -- Server version 5.7.29 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!4010...
-- TITLE1: -- TITLE2: Viewing the Capture Processes for the LCRs in Each Buffered Queue -- DESC: COLUMN SENDER_NAME HEADING 'Capture|Process' FORMAT A10 COLUMN SENDER_ADDRESS HEADING 'Sender Queue' FORMAT A15 COLUMN QUEUE_NAME HEADING 'Queue Name' FORMAT A10 COLUMN CNUM_MSGS HEADING 'Number|of LCRs|Enqueued' FORMAT 99...
SELECT 'GL' SRCE, ACCT, PERD, MODULE, CUSMOD, BATCH, CUSKEY4 PART, SUM(AMT) AMTGL, 0.0 AMTQOH FROM QGPL.FFSBGLR1 WHERE MODULE = 'ICIT' AND PERD = '1603' AND SUBSTR(ACCT,7,4) IN ('1200','1220') GROUP BY ACCT, PERD, MODULE, CUSMOD, BATCH, CUSKEY4 UNION ALL SELECT 'GL' SRCE, ACCT, PERD, M...
-- Update alert_cause prefix -- Auther: Jackie vndwbwan@cn.ibm.com -- Description: Please make sure to update TRAILSPD and the replication scripts for TRAILSRP && TRAILSST will do automatic data update for alert_cause db table -- Rule: Given the Cause Codes with the Prefix '1' -- The prefixes should be migrated t...
CREATE TABLE Instance ( id INT PRIMARY KEY AUTO_INCREMENT, model_id INT NOT NULL, FOREIGN KEY (model_id) REFERENCES Gun (id) ); INSERT INTO Instance (model_id) VALUES (1); INSERT INTO Instance (model_id) VALUES (1); INSERT INTO Instance (model_id) VALUES (1); INSERT INTO Instance (model_id) VALUES (1); INS...
Create Procedure sp_get_MailInfo (@MailID int) As Select CustomerID, VendorID, Message, CreationDate, DocPrefix + Cast(DocumentID As nvarchar), Subject From MailMessage Where ID = @MailID
-- AQ test tables for OCI*ML -- -- Need AQ_ADMINISTRATOR_ROLE and EXECUTE on DBMS_AQ for this to work -- -- typed queue create type message_t as object ( message_id integer, message_text varchar2(80)); / begin dbms_aqadm.create_queue_table ( queue_table => 'tbl_message_queue', queue_payload_t...
Working with dates and timestamps
USE productmanagementdb2; -- products INSERT INTO products VALUES (1, 'Galaxy ','Samsung','Android',550), (2, 'iPhone5','Apple','iOS',700), (3, 'GE 60 2PE Apache Pro','MSI','Gaming Notebook',1300), (4, 'Remi Note 3 Pro','Xiaomi','Android',250), (5, 'Play Station 4','Sony','Gaming Console',350), (6, 'MOTO G...
-- DDL:Create database item_stock CREATE TABLE item_stock( repository_id CHAR(4) NOT NULL, item_id CHAR(4) NOT NULL, stock INTEGER NOT NULL, PRIMARY KEY (repository_id, item_id) ); -- DML Register data BEGIN TRANSACTION; INSERT INTO item_stock VALUES ('S001', '0001', 0); INSERT INTO item_stock VALUES ('S001',...
-- DROP TABLE IF EXISTS products; -- -- CREATE TABLE customers ( -- customer_id VARCHAR(100) PRIMARY KEY NOT NULL, -- personal_Id_number INT NOT NULL, -- full_name TEXT NOT NULL, -- address TEXT, -- phone_number INT -- ); -- INSERT INTO customers (customer_id, personal_Id_number, full_name, address, phone_nu...
ALTER TABLE `app_users` ADD COLUMN `last_login_datetime` DATETIME NULL AFTER `wall_message`, ADD COLUMN `last_login_ip` VARCHAR(16) NULL AFTER `last_login_datetime`;
-- phpMyAdmin SQL Dump -- version 3.3.8.1 -- http://www.phpmyadmin.net -- -- Host: sql -- Erstellungszeit: 10. Januar 2013 um 05:30 -- Server Version: 5.1.66 -- PHP-Version: 5.3.8 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_R...
-- select column user_id SELECT user_id, -- select the maximum time_stamp for each user_id as last_stamp. MAX(time_stamp) AS last_stamp -- select from logins FROM Logins -- where the year of time_stamp is 2020 WHERE YEAR(time_stamp) = 2020 -- group by user_id GROUP BY user_id;
# This will be used to store data on stored weapons for PD CREATE TABLE IF NOT EXISTS `rack_weapons` ( `id` INT(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY, `owner` varchar(22) NOT NULL, `stored` varchar(22) NOT NULL DEFAULT `0`, `weapon` varchar(22) NOT NULL, `flashlight` varchar(22) NOT NULL DEFAULT '0', `mag` varchar...
create or replace view v_dtpf17012_data_gkb as select de042, de086, pc, sum(je) as n1, bz, bs from ( select de042, f_getjsde702byde086(2017, de086) as de086, pc, sum(nvl(n4, 0)-nvl(n12, 0)+nvl(n23, 0)+nvl(n25, 0)+nvl(n27, 0)) as je, 0 as bz, 3 as bs from v_dtys17001s_3 where de086 in ('30201','30202','30205','30206','3...
create schema lifter; use lifter; create table if not exists 响应信息 ( 时间 datetime not null, 楼层 int not null, 等待时间 bigint not null, primary key(时间,楼层,等待时间), index(时间) ); create table if not exists 运行信息 ( 时间 datetime not null, 楼层 int not null, 位置 double not null, 速度 double not null, primary key(时间), index(时间) );
INSERT INTO `ticket` VALUES (1, 20, 199, '2016-12-27 00:00:00', 2, 1); INSERT INTO `ticket` VALUES (2, 20, 1000, '2016-12-27 00:00:00', 1, 1);
/*SET NAMES utf8;*/ INSERT INTO tbl_type(`name`, `parent`) VALUES ("коллекция", NULL), /* 1 */ ("плитка", NULL), /* 2 */ ("напольная плитка", 2), ("настенная плитка", 2), ("декоративные элементы", NULL);
--------------------------------------------------------------------------------------------- -------------------------------- INCIO FINANCEIRO ------------------------------------------- --------------------------------------------------------------------------------------------- -- planilha de distribuição drop tab...
-- Leetcode: https://leetcode.com/problems/find-total-time-spent-by-each-employee/ -- Find the total time an employee spends in office by event day # Write your MySQL query statement below select event_day as day, emp_id, sum(out_time - in_time) as total_time from Employees group by 1, 2
CREATE TABLE [display].[sc_cat_item] ( [sc_catalogs_display_value] NVARCHAR(4000) NULL, [sys_name_display_value] NVARCHAR(255) NULL, [vendor_display_value] NVARCHAR(255) NULL, [sys_created_on_display_value] DATETIME NULL, [use_sc_layout_display_value] NVARCHAR(255) NULL, [description_display_value] NVARCH...
DROP TABLE IF EXISTS drinker; CREATE TABLE drinker (value SMALLINT PRIMARY KEY, property VARCHAR (20) NOT NULL); INSERT INTO drinker (value, property) VALUES (0, 'Prefer Not To Say'); INSERT INTO drinker (value, property) VALUES (1, 'No'); INSERT INTO drinker (value, property) VALUES (2, 'Yes - Not often'); INSERT...
-- findcol.sql - jared still -- jkstill@gmail.com @clears @columns col owner format a10 col data_type format a20 set line 120 col ccolumn noprint new_value ucolumn col cowner noprint new_value uowner set term on echo off feed off prompt This utility searches for columns in DBA_TAB_COLUMNS prompt prompt Account to ...
\connect "city-info" CREATE TABLE junction ( id text NOT NULL PRIMARY KEY, name text NOT NULL, latitude real NOT NULL, longitude real NOT NULL ); CREATE TABLE meter ( id text NOT NULL PRIMARY KEY, address text NOT NULL, latitude real NOT NULL, longitude real NOT NULL ); CREATE TABLE meter_upd...
PRAGMA foreign_keys = ON; BEGIN TRANSACTION; DROP TABLE IF EXISTS server; CREATE TABLE server ( id INTEGER PRIMARY KEY, name VARCHAR UNIQUE, notes VARCHAR ); DROP TABLE IF EXISTS ip; CREATE TABLE ip ( id INTEGER PRIMARY KEY, ip INTEGER UNIQUE, notes VARCHAR...
-- Queries 1- 8 --1. List the following details of each employee: employee number, last name, first name, sex, and salary. --Creatig a view CREATE VIEW question1 as SELECT e.emp_no, e.last_name, e.first_name, e.sex, s.salary FROM employees as e INNER JOIN salaries as s ON (e.emp_no = s.emp_no) ORDER BY s.salary DE...
/*建立用户并授权*/ create user YKT_CK identified by "kingstar" default tablespace TS_YKT_CK temporary tablespace TEMP profile DEFAULT quota unlimited on TS_YKT_CK; grant create any index to YKT_CK; grant create any table to YKT_CK; grant create any view to YKT_CK; grant drop any table to YKT_CK; grant d...
DROP DATABASE IF EXISTS `jbb-associates-db`; CREATE DATABASE IF NOT EXISTS `jbb-associates-db`; USE `jbb-associates-db`; -- Table structure for table `user_details_table` DROP TABLE IF EXISTS `user_details_table`; CREATE TABLE `user_details_table` ( `user_id` int(11) NOT NULL auto_increment, `password` char(120) ...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th2 27, 2020 lúc 05:51 AM -- Phiên bản máy phục vụ: 10.4.11-MariaDB -- Phiên bản PHP: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!...
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'; CREATE SCHEMA IF NOT EXISTS `oac_archive` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ; USE `oac_archive`; -- --------------...
use BIGGYM; drop function if exists statuscode; delimiter $$ create function statuscode (finalStatusCode varchar(64)) returns varchar(64) begin -- Initialise .. -- Process .. return case when (strisnumeric(finalStatusCode)) then case ...
 use HOMv18 insert into Kullanici(kullanici_id, kullanici_isim, sifre, e_mail) values (1, 'Merve Tahtaci', '12345a', 'tahtaci@gmail.com') insert into Kullanici(kullanici_id, kullanici_isim, sifre, e_mail) values (2, 'Ozum Oral','123a','ozumoral@gmail.com') insert into Kullanici(kullanici_id, kullanici_isim, sifre, e...
#订单详细表 CREATE TABLE orders_detail( id INT AUTO_INCREMENT, detail VARCHAR(2000), order_id INT, PRIMARY KEY(id) ); CREATE TABLE orders_detail_1( id INT AUTO_INCREMENT, detail VARCHAR(2000), order_id INT, PRIMARY KEY(id) ); CREATE TABLE orders_detail_2( id INT AUTO_INCREMENT, detail VARCHAR(2000), order_id INT, PRIMARY...
prompt PL/SQL Developer import file prompt Created on 2008Äê10ÔÂ14ÈÕ by Administrator set feedback off set define off prompt Disabling triggers for T_TIF_CFGTXFEE... alter table T_TIF_CFGTXFEE disable all triggers; prompt Deleting T_TIF_CFGTXFEE... delete from T_TIF_CFGTXFEE; commit; prompt Loading T_TIF_CFGTX...
-- ********************************************** -- IT2351 Assignment 4 Part 4 - Abimael Rivera -- Creating a select statement that returns the order_id and order_date columns to show when they will be approximately arriving. -- Only for orders in March. -- ********************************************** CREATE VIEW o...
# patch_50_51_b.sql # # title: protein_feature hit_name # # description: # Rename hit_id column in protein_feature to hit_name ALTER TABLE protein_feature DROP INDEX hid_index; ALTER TABLE protein_feature CHANGE COLUMN hit_id hit_name VARCHAR(40) NOT NULL; ALTER TABLE protein_feature ADD INDEX hitname_idx (hit_name)...
--1 SELECT Employe.Sex as 'Стать', Count(*) as 'Кількість' FROM Employe Group by Employe.Sex --2 SELECT [Department].[Name] AS "Департамент", Count([Department].[Id]) AS "Кількість співробітників" FROM [Department] JOIN [Employe] ON [Department].[ID] = [Employe].[DepartmentID] GROUP BY [Department].[Name] --3 Sele...
-- Adicionar o primeiro usuário admin INSERT INTO Admin (nome, login, senha, tipo) VALUES ('admin', 'admin', '$2y$12$UV.R6.1fzwWppWPwPipTWuP5ouXAtiSQYlkT2UufPqL95t4oeqMZa', 'A');
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.5.5-10.2.12-MariaDB) # Database: antrian-puskesmas # Generation Time: 2018-05-23 16:51:17 +0000 # **********************...
SELECT CAST(begin_interval_time AS DATE) begin_time , metric_name , metric_unit , value FROM dba_hist_snapshot NATURAL JOIN dba_hist_sysmetric_history WHERE metric_name IN ('Logons Per Sec') AND begin_interval_time > SYSDATE - 30 ORDER BY metric_name , begin_time /
INSERT INTO organization VALUES (1, 0,'IT консалтинг', 'ООО "IT Консалтинг"', 'г. Москва, ул. Солянка, д.19, стр.1', '8-495-333-11-22', '0099887766', '112233445', TRUE); INSERT INTO organization VALUES (2, 0, 'RusOil', 'ОАО "Russia Oil Group"', 'г. Смоленск, ул. Совободы, д.36', '8-4812-20-41-28', '0028301682', '745263...
DROP DATABASE IF EXISTS blacksmith; CREATE DATABASE blacksmith; USE blacksmith; CREATE TABLE products ( item_id INT NOT NULL AUTO_INCREMENT, product_name VARCHAR(50) NULL, product_category VARCHAR(50) NULL, price DECIMAL(10,2) default 0, stock_quantity INT(9) default 0, PRIMARY KEY (item_id) ); ...
--This patch is to correct a problem with DBs which do not follow --the standard naming convention(drosophila, c elegans). Non standard names result in new --coord systems and seq_regions being generated when they are in fact the --same as a previous release. This can cause data loaded on an old coord system --not to...
select `nationkey`, min(`nationkey`) over (partition by `regionkey` order by `comment` range between unbounded_preceding and unbounded_following) as `min` from `tpch`.`tiny`.`nation`
ALTER TABLE "group" ADD COLUMN user_id INT NOT NULL DEFAULT 0;
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.5.29 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; ...
USE TelerikAcademy SELECT TOP 5 * FROM Employees WHERE Salary > 50000 ORDER BY Salary DESC
CREATE TRIGGER numeroVoo AFTER INSERT ON voo FOR EACH ROW UPDATE pilotos p set num_voos = num_voos + 1 where voo.piloto = p.codigo;
-- -- Update sql for MailWizz EMA from version 1.3.5.1 to 1.3.5.2 -- ALTER TABLE `list` ADD `merged` ENUM('yes','no') NOT NULL DEFAULT 'no' AFTER `opt_out`;
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 11, 2017 at 09:41 PM -- Server version: 5.6.17 -- 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 */;...
/* 结算中心-索赔金额,未收金额 */ delimiter $ drop procedure if exists Proc_Settlements_SumClaimAmount $ create procedure Proc_Settlements_SumClaimAmount(sInvoiceNO varchar(255)) begin declare fClaimAmount decimal(18,2); set fClaimAmount=(Select Sum(ifnull(PayedAmount,0)) as PayedAmount From Complaints Where Invoi...
create or replace view v_xtdlyh as select b.de194,b.de193,b.de022 from cfg031 a ,jscs005 b where a.de194 = b.de194 and a.de022= b.de022 and jsde070 = 2
SELECT properties.id, properties.title, properties.cost_per_night, reservations.start_date, AVG(property_reviews.rating) as average_rating FROM reservations JOIN properties ON reservations.property_id = properties.id JOIN property_reviews ON property_reviews.property_id = properties.id WHERE reservations.guest_id = 1 A...
-- OnlnPayCnclQuery -- 23 line -- getOnlnPayObjByGramNoQuery() SELECT A.PAY_NO , A.RCGN_NO , A.LOAN_NO , A.LOAN_SEQ , A.PAY_BSN_DIV_CD , A.CUST_NM , A.MNG_DEPT_CD , A.SETL_BANK_CD , A.SETL_ACNT_NO , A.D...
# ------------------------------- CRIAÇÃO DO AMBIENTE DE TRABALHO ------------------------------- # CREATE SCHEMA projeto_cinema; # ------------------------------- CRIAÇÃO DAS TABELAS ------------------------------- # CREATE TABLE ator ( ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, ...
INSERT INTO player VALUES (1, 'english@freemail.hu', 'USER', '$2a$10$8Kre7KpW8MXDqWJ3uh/a.eNiQAoeT0ONaZtg38UDm.Lz4U7o.LZSm', 'not_Shakespeare'); INSERT INTO player VALUES (2, 'berci@freemail.hu', 'USER', '$2a$10$8Kre7KpW8MXDqWJ3uh/a.eNiQAoeT0ONaZtg38UDm.Lz4U7o.LZSm', 'Farkas_Bertalan'); SELECT pg_catalog.setval('playe...
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64) -- -- Host: localhost Database: emp -- ------------------------------------------------------ -- Server version 8.0.22 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!4010...
drop table if exists stocks; create table stocks ( name text primary key, zone text not null, date text not null open real, high real, low real, volume integer, close real );