text
stringlengths
6
9.38M
-- ----------------------------------------------------------------------------------- -- File Name : http://www.oracle-base.com/dba/monitoring/min_datafile_size.sql -- Author : DR Timothy S Hall -- Description : Displays smallest size the datafiles can shrink to without a reorg. -- Requirements : Access ...
drop database if exists phan_tich_thiet_ke_csdl; create database phan_tich_thiet_ke_csdl; use phan_tich_thiet_ke_csdl; create table payments( ma_thanh_toan int primary key, ngay_thanh_toan date, so_tien int ); create table orders( ma_don_hang int primary key, ngay_mua date, ngay_yeu_cau_giao_hang date, ngay_giao_th...
copy user_list from 'dir/userlist.txt' with delimiter ',' null '' csv header; copy user_loc from 'dir/userloc.txt' with delimiter ',' null '' csv header; copy user_state from 'dir/userstate.txt' with delimiter ',' null '' csv header; copy user_update from 'dir/userupdate.txt' with delimiter ',' null '' csv header; copy...
INSERT INTO `dmahockey`.`all_types` (`category`, `typeCode`, `typeName`, `description`) VALUES ('player_stat', '1', 'G', 'Goal'); INSERT INTO `dmahockey`.`all_types` (`category`, `typeCode`, `typeName`, `description`) VALUES ('player_stat', '2', 'A', 'Assist'); INSERT INTO `dmahockey`.`all_types` (`category`, `typeCod...
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Client : localhost -- Généré le : Mar 05 Décembre 2017 à 09:06 -- Version du serveur : 5.7.20-0ubuntu0.16.04.1 -- Version de PHP : 7.0.22-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!4...
--복습 --WHERE --연산자 --비교 : =, !=, <>, >=, >, <=, < --BETWEEN start AND end --IN (set) --LIKE 'S%' (% : 다수의 문자열과 매칭, _ : 정확히 한글자 매칭) --IS NULL (!= NULL) --AND, OR, NOT --emp 테이블에서 입사일자가 1981년 6월 1일부터 1986년 12월 31일 사이에 있는 직원 조회 SELECT * FROM emp WHERE hiredate BETWEEN TO_DATE('1981/06/01','YYYY/MM/DD') AND TO_DATE('1986...
create or replace procedure searchDonorsByArea(matchArea in DONOR.Darea%TYPE) IS id Donor.DID%Type; name Donor.Dname%TYPE; age DONOR.Dage%TYPE; gender Donor.Dgender%TYPE; bloodGrp Donor.Dbloodgroup%TYPE; area Donor.Darea%TYPE; address Donor.Daddress%TYPE; phonenum Donor.Dphonenum%TYPE; elgib Donor.Delig...
USE employees; SHOW TABLES; --- list of tables departments, dept_emp, dept_manager, employees, salaries, titles DESCRIBE employees; SHOW CREATE TABLE employees; -- int, date, varchar, -- The following tables contain numerics, dept_emp, dept_manager, employees, salaries, titles -- The following tables contai...
select isnull(cast(ROW_NUMBER() OVER (ORDER BY (SELECT '')) AS int), - 1) AS OBJECTID, bbr.regareal, bbr.vejareal, bbr.antal_byg, bbr.antal_parc, bbr.antal_raekke, bbr.antal_etage, bbr.antal_sommer, bbr.antal_andre, bbr.beb_areal, bbr.Byg_Bolig_Arl_Saml, bbr.erhv_a...
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 10, 2016 at 08:19 PM -- Server version: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
#数据库创建 CREATE DATABASE `DaDa` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; #用户表创建 use dada; #用户表创建 CREATE TABLE `user_info` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_name` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '用户名(登录名)', `user_pwd` varchar(45) COLLATE utf8_unicode_ci DEF...
SELECT * FROM Students WHERE NOT PostalCode = NULL;
 create PROC ERP.Usp_Sel_NumeroLote_Vale @IdEmpresa INT, @IdProducto INT, @Fecha DATETIME AS BEGIN SELECT [ERP].[GenerarNumeroLoteValeDetalle](@IdEmpresa,@IdProducto,@Fecha) END
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: localhost (MySQL 5.7.26) # Database: CSC350 # Generation Time: 2020-05-10 03:05:31 +0000 # ************************************************...
use `order`; -- 2.Show the list of first and last names of the employees from London. select employee.FIRST_NAME, employee.LAST_NAME, city.CITY from employee join city on employee.ID_CITY=city.ID_CITY where CITY='London' order by employee.FIRST_NAME; -- 7.Calculate the greatest, the smallest and the average age of ...
create index lesson_builder_group_site on lesson_builder_groups(siteId); create index lesson_builder_item_gb on lesson_builder_items(gradebookid); create index lesson_builder_item_altgb on lesson_builder_items(altGradebook); create index lesson_builder_prop_idx on lesson_builder_properties(attribute); create index less...
CREATE TABLE IF NOT EXISTS `quests` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` text NOT NULL, `date` text NOT NULL, `description` text, PRIMARY KEY (`id`) ) DEFAULT CHARSET=latin1 AUTO_INCREMENT;
/* Group Name: Group 6 Project : Library Mangement System Database. Date: 8/13/18. Description: The following document creates tables for library database and inserts data into the library database tables. */ /* Creates BOOKS TABLE */ CREATE TABLE books ( id INT AUTO_INCREMENT PRIM...
-- Mitchel Davis -- Thomas Simko -- General Q1 SELECT Start, End, PriceInc, PriceDec FROM (SELECT COUNT(DISTINCT Ticker) as Start FROM Prices p WHERE p.Day <= ALL (SELECT Day from Prices where YEAR(Day) = 2016) and YEAR(Day) = 2016) q1, (SELECT COUNT(DISTINCT Ticker) as End FROM Prices p WHERE p.Day >=...
DROP TABLE IF EXISTS `XXX_kraken_settings`; ##b_dump## CREATE TABLE `XXX_kraken_settings` ( `name` varchar(255) NOT NULL, `value` varchar(255) DEFAULT NULL, PRIMARY KEY (`name`) ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ; ##b_dump## DROP TABLE IF EXISTS `XXX_kraken_history`; ##b_dump## CREATE TABLE `...
/* SQLyog Community v13.1.5 (64 bit) MySQL - 8.0.18 : 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_K...
create table if not exists clients ( id serial primary key, username varchar not null, password varchar not null, created_at timestamptz not null default NOW(), enabled boolean not null default true ); create table if not exists organizations ( id serial primary key, guid ...
-- 181. 超过经理收入的员工 -- SQL架构 DROP TABLE employee; CREATE TABLE IF NOT EXISTS Employee (Id INT, NAME VARCHAR(255), Salary INT, ManagerId INT); TRUNCATE TABLE Employee; INSERT INTO Employee (Id, NAME, Salary, ManagerId) VALUES ('1', 'Joe', '70000', '3'); INSERT INTO Employee (Id, NAME, Salary, ManagerId) VALUES ('2',...
-- Schema for creating the Burger DB -- -- Creates the database -- CREATE DATABASE burgers_db; USE burgers_db; -- Creates a burgers table with the required values -- CREATE TABLE burgers ( id INT NOT NULL AUTO_INCREMENT, burger_name VARCHAR(255) NOT NULL, devoured BOOLEAN DEFAULT FALSE, ts TI...
DROP DATABASE IF EXISTS kleancierge_product_api; CREATE DATABASE kleancierge_product_api; USE kleancierge_product_api; DROP TABLE IF EXISTS `vendor_review`; CREATE TABLE vendor_review ( id INT PRIMARY KEY AUTO_INCREMENT, vendor_id INT NOT NULL, cleaner_id INT NOT NULL, rating_score INT NOT NULL,...
PARAMETERS [@FechaIniID] Text ( 255 ), [@FechaFinID] Text (255); SELECT A.FichaPesoSerie & " - " & A.FichaPesoNumero AS FichaPeso, cdate(format(A.FechaEmisionID,"####-##-##")) AS Fecha, C.ComprobanteNombre, A.Serie, A.Numero, F.NumeroDocumento AS ND, F.RazonSocial, IIf...
PARAMETERS [@CampañaID] Text ( 255 ), [@LoteID] Text (255); SELECT sum(C.KilosProducidos) AS TotalProducidos, sum(C.KilosProducidos)-sum(C.MermaProceso) - sum(MermaDespacho) AS TotalVendido, format(sum(ImporteTotal)/(sum(C.KilosProducidos)-sum(C.MermaProceso) - sum(MermaDespacho)),"0.00") AS Precio, ...
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 29, 2018 at 08:50 AM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
// Database informtion: List Labels, Types, Keys MATCH (n)-[r]->(m) RETURN DISTINCT Labels(n), Type(r), Labels(m), Keys(m); // Database information: count of nodes by Labels MATCH (n) RETURN DISTINCT Labels(n), Count(Labels(n));
-- Materialized View: staging.vw_population -- DROP MATERIALIZED VIEW staging.vw_population; CREATE MATERIALIZED VIEW staging.vw_population AS SELECT row_number() OVER () AS id, db.dbuid::bigint AS dbuid, bcpop.year::integer AS year, scpop.pop2011::numeric * bcpop.growth_base_2011 AS population...
CREATE TABLE `tn_batch` ( `BATCH_ID` varchar(20) COLLATE utf8_bin NOT NULL, `BATCH_NM` varchar(100) COLLATE utf8_bin DEFAULT NULL, `BATCH_DC` varchar(1000) COLLATE utf8_bin DEFAULT NULL, `FRST_REGISTER_ID` varchar(20) COLLATE utf8_bin DEFAULT NULL, `FRST_REGIST_PNTTM` datetime DEFAULT NULL, `LAST_UPDUSR_ID`...
-- phpMyAdmin SQL Dump -- version 4.4.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 25-Jun-2015 às 11:33 -- Versão do servidor: 5.6.24 -- PHP Version: 5.5.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
-- Select count of actors first names in descending order select first_name, count(first_name ) as count_first_name from actor group by first_name order by count_first_name desc -- Select the average duration of movies by rating select rating, avg(rental_duration) as rental_duration from film group by rating -- Sele...
/* ################################################################################ Migration script to create a new CATALOG_UNPUBLISH_DATE in the HOUSEKEEPING table Designed for execution with Flyway database migrations tool; this should be automatically run to completely generate the schema that is out-of-the-box c...
/* SQLyog Community v12.5.1 (64 bit) MySQL - 5.6.22 : Database - ese_app ********************************************************************* */ /*!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...
create database ticketsale; use ticketsale; create table `order` ( id int primary key not null AUTO_INCREMENT, rout_number varchar(20) not null, date_of_fly DATETIME not null, status_of_order varchar(10) not null ); alter table `order` add column user_id int not...
USE employees; SELECT DISTINCT last_name FROM employees ORDER BY last_name DESC LIMIT 10; SELECT * FROM employees WHERE birth_date LIKE '%-12-25' AND hire_date BETWEEN '1990-01-01' AND '1999-12-31' ORDER BY hire_date DESC LIMIT 5; SELECT * FROM employees WHERE birth_date LIKE '%12-25'AND hire_date LIKE '199%' ORDER...
-- -- set define off set sqlblanklines on spool KR-Release-3_0_1-3_1_S1-SR-Oracle-Install.log @ORACLE/DML/SR/DML_BS_OBJ_ID_CLEAN.sql @ORACLE/DML/DML_BS1_KREN_PRODCR_T.sql @ORACLE/DML/SR/DML_BS2_KRNS_PARM_DTL_TYP_T.sql @ORACLE/DML/SR/DML_BS2_KRNS_PARM_T.sql @ORACLE/DML/DML_BS3_KRIM_PERM_T.sql @ORACLE/DML/DML...
insert into breeding_info ( dog_id, insemination_type, ng_ml, date_taken, time_taken ) values ( $1, $2, $3, $4, $5 ); returning * where dog_id = $1;
-- Table: public.email_subscribers ALTER TABLE public.endpoint_email_subscriptions RENAME COLUMN event_type TO subscription_type;
CREATE TABLE `paciente` ( `nome` VARCHAR(255) NOT NULL, `idade` INT NOT NULL, `sexo` VARCHAR(10) NOT NULL, `email` VARCHAR(100) NOT NULL, `telefone` VARCHAR(100) DEFAULT NULL, `cpf` VARCHAR(100) NOT NULL, `dataNascimento` VARCHAR(100) NOT NULL, PRIMARY KEY (`cpf`) ); SELECT * FROM paciente;
CREATE TRIGGER updateWriteOff AFTER UPDATE ON GroupTourGuideDetails FOR EACH ROW BEGIN SET @new_write_off = NEW.write_off; SET @old_write_off = OLD.write_off; SELECT total_write_off FROM GroupTour WHERE group_tour_id = NEW.group_tour_id INTO @total_write_off; SELECT total_write_off_currency FROM GroupTour WHERE group_t...
1.Count number of employees SELECT COUNT(customer_id) FROM customer 2.Show first name,last name and id of employees SELECT employees_id, first_name, last_name FROM employees 3.Show Info of Customer and adress info SELECT customer_id, first_name, last_name, street_name, city_name FROM customer JOIN adress ON adress_id =...
/* Selecione as colunas nome da tabela empresa e nome das tabelas cidade(e), da tabela empresa(e), empresas_unidades(eu), cidades(c) onde empresa coluna id igual a empresa_unidades coluna empresa_id e cidade coluna id igual a empresa_unidades coluna estado_id e sede == true ou 1 */ select e.nome, c.nome from ...
select t.owner As Schema_Name,t.table_name,t.partitioned, sum(t.num_rows) as "RowCount", round(sum(bytes)/1024/1024,4) as "Table Size (MB)", round(sum(bytes)/1024/1024/1024,5) as "Table Size (GB)", round(sum(bytes)/1024/1024/1024/1024,8) as "Table Size (TB)" from dba_tables t,dba_segments s where t.owner=s.owner and t...
-- -- Table structure for table `products_list` -- CREATE TABLE IF NOT EXISTS `products_list` ( `id` int(11) NOT NULL, `product_name` varchar(60) NOT NULL, `product_desc` text NOT NULL, `product_code` varchar(60) NOT NULL, `product_image` varchar(60) NOT NULL, `product_price` decimal(10,2) NOT NULL...
SELECT 'utf8mb4_bin' AS `collation` , 'は' COLLATE utf8mb4_bin LIKE 'ハ' AS `は≒ハ` , 'は' COLLATE utf8mb4_bin LIKE 'ハ' AS `は≒ハ` , 'や' COLLATE utf8mb4_bin LIKE 'ゃ' AS `や≒ゃ` , 'や' COLLATE utf8mb4_bin LIKE 'ャ' AS `や≒ャ` , 'や' COLLATE utf8mb4_bin LIKE 'ャ' AS `や≒ャ` , 'は' COLLATE utf8mb4_bin LIKE 'ば' AS `は≒ば` , 'は' COLLATE...
SELECT * FROM VOLDB.passager WHERE noPassager IN ( SELECT reservation.noPassager FROM VOLDB.reservation WHERE noVol IN ( SELECT vol.noVol FROM VOLDB.vol WHERE codeAeroportDepart = 'YUL' AND codeAeroportArrivee = 'RBA' ) );
CREATE USER "LK_MIS_RETAG" IDENTIFIED BY VALUES '5E572C25C94EF453' DEFAULT TABLESPACE "RETAG_DADOS" TEMPORARY TABLESPACE "TEMPORARY";
alter table paid_journey drop column paid; create table thank_size( paid_journey_id bigint not null, size numeric not null, constraint thank_size_pk primary key (paid_journey_id) ); create table status_thank ( id bigserial not null, name_status varchar(255) not null, constraint status_thank_pk...
-- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64) -- -- Host: localhost Database: sbm -- ------------------------------------------------------ -- Server version 5.7.29-0ubuntu0.18.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE...
# $Id$ CREATE TABLE Film( FilmID INTEGER NOT NULL AUTO_INCREMENT, FilmTitle VARCHAR(80) NOT NULL, FilmYear DATE NOT NULL, PRIMARY KEY(FilmID) ); CREATE TABLE Actor( ActorID INTEGER NOT NULL AUTO_INCREMENT, ActorName VARCHAR(80) NOT NULL, ActorDOB DATE NOT NULL, PRIMARY KEY(ActorID) ); CREATE TABLE FilmRole( ...
-- creat two new record for "Pilot RIDER//MSKCC" and "Pilot RIDER//MDACC" INSERT INTO trial_data_provenance (TRIAL_DP_PK_ID, DP_SITE_NAME, DP_SITE_ID, PROJECT) VALUES (21, 'MSKCC', '6', 'RIDER Pilot'); INSERT INTO trial_data_provenance (TRIAL_DP_PK_ID, DP_SITE_NAME, DP_SITE_ID, PROJECT) VALUES (22, 'MDACC', '4', '...
INSERT INTO Account VALUES( 0, 'Billy Bob', (TO_DATE('04/04/1997','MM/DD/YYYY')) ); INSERT INTO PrimaryAccount VALUES( 0, '123', 'E Glenn st', 85716 ); INSERT INTO Account VALUES( 1, 'Bobby Bill', (TO_DATE('04/05/1997','MM/DD/YYYY')) ); INSERT INTO PrimaryAccount VALUES( 1, ...
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 12, 2020 at 11:03 AM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
USE db_pessoas; CREATE TABLE pessoa ( id INT NOT NULL AUTO_INCREMENT, nome VARCHAR(80) NULL, idade INT NULL, cpf VARCHAR(15) NULL, rg VARCHAR(15) NULL, data_nasc VARCHAR(15) NULL, signo VARCHAR(30) NULL, mae VARCHAR(80) NULL, pai VARCHAR(80) NULL, email VARCHAR(90) NULL, se...
-- MySQL dump 10.13 Distrib 5.5.43, for debian-linux-gnu (i686) -- -- Host: localhost Database: klikabc -- ------------------------------------------------------ -- Server version 5.5.43-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA...
prompt prompt Creating table FM$$_ADR_EMAIL prompt ======================== prompt create table FM$$_ADR_EMAIL ( ADR_EMAIL_EM_ADDR number(19) not null, RECIPCLASS INTEGER, ADR_MAIL NVARCHAR2(490), NOM_DEST NVARCHAR2(490) ) ; prompt prompt Creating table FM$$_BDG prompt =============...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 20, 2019 at 04:19 PM -- Server version: 10.1.35-MariaDB -- PHP Version: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
-- phpMyAdmin SQL Dump -- version 2.10.3 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2014 年 12 月 02 日 03:39 -- 服务器版本: 5.0.51 -- PHP 版本: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- 数据库: `mayi` -- -- -------------------------------------------------------- -- -- 表的结构 `action` -- CREATE TABLE...
SELECT COUNT(player_id) SElECT player_id, CASE WHEN datediff(event_date, next_event_date) <= 1 THEN 1 ELSE 0 AS valid_candidate FROM (SELECT player_id, event_date, lead(event_date) over(parition by player_id order by event_date) next_event_date FROM Activity...
/* * View: memory_by_user_by_current_bytes * * Summarizes memory use by user * * mysql> select * from memory_by_user_by_current_bytes; * +------+--------------------+-------------------+-------------------+-------------------+-----------------+ * | user | current_count_used | current_allocated | current_avg_allo...
-------------------------------------------------------- -- File created - Selasa-Mei-09-2017 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Table MST_KARYAWAN -------------------------------------------------------- CREATE TABLE "MST...
DROP TABLE IF EXISTS stock_quote_company; CREATE TABLE stock_quote_company ( id INT AUTO_INCREMENT PRIMARY KEY, symbol VARCHAR(25) NOT NULL, company_name VARCHAR(250) NOT NULL, primary_exchange VARCHAR(250), latest_price DECIMAL NOT NULL, realtime_price DECIMAL NOT NULL, previous_volume B...
CREATE OR REPLACE VIEW group_data AS SELECT red.id as id, red.profile, red.imported_data, g.id as "group", g.slug as "slug", g.active as "active", re.id as "research_entity" FROM research_entity_data red JOIN research_entity re on red.research_entity = re.id JOIN "group" g on re.id = g.research_entity...
-- TEMA 4 -- Popescu Paullo Robertto Karloss Grupa 2311 -- Laborator 2 PL/SQL -- Ex 2 -- creez un vector tip_orase_Robertto CREATE OR REPLACE TYPE tip_orase_Robertto AS VARRAY(100) OF VARCHAR2(100); / -- creez tabelul excursie_Robertto CREATE TABLE excursie_Robertto (cod_excursie NUMBER(4) PRIMARY KEY, ...
/* Formatted on 21/07/2014 18:38:06 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCRE0_ULTIMA_ACQUISIZIONE ( COD_FILE, IDPER ) AS SELECT -- V1 02/12/2010 VG: Congelata cod_file, MAX (TO_CHAR (periodo_riferimento, 'YYYYMMDD')) idper ...
CREATE TABLE `items` ( `id` int NOT NULL default '0', `name` text NOT NULL default '', `pic` text NOT NULL default '', PRIMARY KEY (`id`) ); INSERT INTO items( id, name, pic ) VALUES ( '17', 'Wooden Arrow', 'none' ); INSERT INTO items( id, name, pic ) VALUES ( '53', '(Not In Use)', 'none' ); INSERT I...
update dictionary set value_order = 1 where category = 'Operational test' and item = 'T1'; update dictionary set value_order = 2 where category = 'Operational test' and item = 'T2'; update dictionary set value_order = 3 where category = 'Operational test' and item = 'T3'; update dictionary set value_order = 4 where ...
-- create database DROP DATABASE IF EXISTS Testing_System_Assignment_7; CREATE DATABASE IF NOT EXISTS Testing_System_Assignment_7; USE Testing_System_Assignment_7; -- create table1: Department DROP TABLE IF EXISTS department; CREATE TABLE IF NOT EXISTS department ( department_id TINYINT UNSIGNED PRIMARY KEY AUTO_...
SELECT A.hashtagid AS source, B.hashtagid AS target FROM vorkommen_in A, vorkommen_in B WHERE A.tweet_id = B.tweet_id AND A.hashtagid < B.hashtagid ORDER BY A.hashtagid
COMMON/TRAC5/NSTEP,B,S,SD,SC,AN,BN,IOUT,IFN
/* MySQL Data Transfer Source Host: localhost Source Database: car Target Host: localhost Target Database: car Date: 2017/5/22 8:08:50 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for car_cars -- ---------------------------- DROP TABLE IF EXISTS `car_cars`; CREATE TABLE `car_cars` ( ...
-- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: erpsys_db -- ------------------------------------------------------ -- Server version 8.0.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT...
/*Dilaram's work */ use AdventureWorks2012 --Question 1 --Retrieve information about the products with colour values except null, red, silver/black, white and list --price between £75 and £750. Rename the column StandardCost to Price. Also, sort the results in --descending order by list price. SELECT * FROM Producti...
--use template_db --go /* Developer : Перепечко А.В. Created : 30.03.2015 Purpose : Связь пользователя системы и филиала Change list: 05.05.2017 Перепечко А.В. Переносим на PG 14.05.2017 Перепечко А.В. Приводим к единому виду обязательных атрибутов (id, descr, comm, cu, cd, ct, cu_id) */ /* Удаляем, е...
DROP TABLE CYUSER PURGE; DROP TABLE CYMEMBER PURGE; DROP TABLE CYPICTURE PURGE; DROP TABLE CYINTRO PURGE; DROP TABLE CYMEMBERBOARD PURGE; DROP TABLE CYPICREPLE PURGE; DROP TABLE CYGUESTREPLE PURGE; DROP TABLE CYGUESTBOOK PURGE; DROP TABLE CYMYITEM PURGE; DROP TABLE CYCART PURGE; DROP TABLE CYITEMSHOP PURGE; DROP TABLE ...
-- ###################### -- # MATERIALIZED VIEWS # -- ###################### /*+++ Types of Refresh +++ The refresh method can be incremental or a complete refresh. There are two incremental refresh methods, known as log-based refresh and partition change tracking (PCT) refresh. The incremental refresh is com...
set names utf8mb4; drop database if exists n9e_v5; create database n9e_v5; use n9e_v5; CREATE TABLE `users` ( `id` bigint unsigned not null auto_increment, `username` varchar(64) not null comment 'login name, cannot rename', `nickname` varchar(64) not null comment 'display name, chinese name', `passwo...
USE corecd; #配置表 CREATE TABLE IF NOT EXISTS `c_config` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL DEFAULT '' COMMENT 'KEY', `value` varchar(500) DEFAULT '' COMMENT 'VALUE', `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREM...
#1a use employees; select A.emp_no, e1.first_name, e1.last_name, A.dept_no, A.from_date, B.emp_no, e2.first_name, e2.last_name, B.dept_no, B.from_date from dept_emp A inner join employees e1 on A.emp_no = e1.emp_no, dept_emp B inner join employees e2 on B.emp_no = e2.emp_no where (A.from_date = B.from_date or A.from...
-- creating a simple table CREATE TABLE SUPERHEROES ( sh_name VARCHAR2(20) ); -- Example 1 CREATE OR REPLACE TRIGGER bi_superheroes BEFORE INSERT ON SUPERHEROES FOR EACH ROW ENABLE DECLARE v_user VARCHAR2(20); BEGIN SELECT user INTO v_user FROM dual; DBMS_OUTPUT.PUT_LINE('You just inserted a line Mr ' || v_u...
CREATE DATABASE charity; ALTER DATABASE charity CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; USE charity; CREATE USER 'charity'@'localhost' IDENTIFIED BY 'test12345'; GRANT ALL PRIVILEGES ON charity.* TO 'charity'@'localhost';
-- -- The MIT License -- Copyright © 2016 Matt Carrier -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modi...
-------------------------------------------------------------------------------------------- -- вывести информацию обо всех жителях заданного города, разговаривающие на заданном языке -------------------------------------------------------------------------------------------- SELECT c.city, n.nationality, p.population...
SELECT MIN(kt.kind) AS movie_kind, MIN(t.title) AS complete_us_internet_movie, count(*) AS cnt FROM complete_cast AS cc, comp_cast_type AS cct1, company_name AS cn, company_type AS ct, info_type AS it1, keyword AS k, kind_type AS kt, movie_com...
------------------------------------------------------------------------------------------------------------------------ -- ЛНО импорт ------------------------------------------------------------------------------------------------------------------------ -- -- -- Статус реестров импорта select external_id, status_cd, ...
INSERT INTO bin (name, price, shelf_id, bin_num) VALUES ($1, $2, (SELECT id FROM shelf WHERE letter_id = $3), $4);
CREATE TABLE createTableDataTypeText (textCol TEXT, PRIMARY KEY (textCol))
ALTER TABLE sys_vod_detail MODIFY COLUMN vod_blurb TEXT; ALTER TABLE sys_vod_detail MODIFY COLUMN vod_behind TEXT; ALTER TABLE sys_vod_detail MODIFY COLUMN vod_en TEXT;
DROP TABLE FACTURAS CASCADE CONSTRAINTS; CREATE TABLE FACTURAS( NRO INTEGER PRIMARY KEY, CLIENTE VARCHAR(10), FECHA DATE, TOTAL NUMERIC(8,2), DIRECCION VARCHAR(100), CP VARCHAR(5), CIUDAD VARCHAR(20) ); DROP TABLE LINEASFACTURA; CREATE TABLE LINEASFACTURA( LINEA INTEGER, NRO ...
CREATE OR REPLACE VIEW "RESOURCE_CAPACITY"."PNMAC"."VW_PROJECTMILESTONEINFO" AS select pm.project_milestone_id as effort_id ,pm.milestone_item_name as effort_name ,pm.project_id ,p.project_name ,project_milestone_id as milestone_id ,pm.milestone_...
grant select on SAPIENS_PROD.E000FOP to consultajm; grant select on SAPIENS_PROD.E000FOR to consultajm; grant select on SAPIENS_PROD.E000FPG to consultajm; grant select on SAPIENS_PROD.E000FOT to consultajm; grant select on SAPIENS_PROD.E000GPF to consultajm; grant select on SAPIENS_PROD.E000IBT to consultajm; gr...
CREATE TABLE titles( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(100) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB; insert into titles (title) values ('Underline'); insert into titles (title) values ('Evil Overload'); insert into titles (title) values ('Benevolent Dictator');
# ************************************************************ # Sequel Pro SQL dump # Version 4096 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: localhost (MySQL 5.6.22) # Database: jhodisco # Generation Time: 2016-03-26 14:29:30 +0000 # ************************************************...
# Profil : infos client / user SELECT `niveau_user`, `public_user`, `nom_user`, `login_user`, `fk_client`, `printer_client`, `convert_client`, `entreprise_client`, `uploaded_client`, `stored_client`, `branded_client` FROM `user`, `client` WHERE `pk_c...
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 10, 2018 at 12:47 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 */;...
-- Lisää INSERT INTO lauseet tähän tiedostoon INSERT INTO Trainer (username, password, admini) VALUES ('Steven','Stone', true); INSERT INTO Trainer (username, password, admini) VALUES ('Archie','Aqua', false); INSERT INTO Typing (typing_name) VALUES ('Normal'); INSERT INTO Typing (typing_name) VALUES ('Fighting'); INS...
/* building query up incrementally: SELECT movie_id FROM stars WHERE person_id = (SELECT id FROM people WHERE name = 'Johnny Depp'); SELECT movie_id FROM stars WHERE person_id = (SELECT id FROM people WHERE name = 'Helena Bonham Carter'); SElECT id FROM movies WHERE id IN (SELECT movie_id FROM stars WHERE pers...
/* Navicat MySQL Data Transfer Source Server : 127.0.0.1 Source Server Version : 50528 Source Host : localhost:3306 Source Database : cmtp Target Server Type : MYSQL Target Server Version : 50528 File Encoding : 65001 Date: 2018-06-25 10:26:53 */ SET FOREIGN_KEY_CHE...