text
stringlengths
6
9.38M
create procedure train.CHCourseSummary @boro char(1) = 'A' as begin select Course, cid, Paris, [Required], [Booked], [Completed] from ( select Req.ID, Courses.Course, Courses.ID as cid, Courses.Paris, Statuses.[Status] from train.Req join train.Courses on Req.Course = Courses.ID and Courses.Obselete = 0 left...
SELECT TOP(5) c.CountryName, MAX(p.Elevation) AS HighestPeakElevation, MAX(r.[Length]) AS LongestRiverLength FROM Countries c LEFT JOIN MountainsCountries mc ON mc.CountryCode=c.CountryCode LEFT JOIN Mountains m ON m.Id=mc.MountainId LEFT JOIN Peaks p ON p.MountainId=m.Id LEFT JOIN CountriesRivers cr ON cr.Count...
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 80015 Source Host : localhost:3306 Source Schema : library Target Server Type : MySQL Target Server Version : 80015 File Encoding : 65001 Date: 18/04/2019 18...
DROP PROCEDURE IF EXISTS Test_AddReview; DELIMITER @@ CREATE PROCEDURE Test_AddReview (IN patient_alias VARCHAR(20), IN doctor_alias VARCHAR(20), IN star_rating FLOAT, IN comments VARCHAR(256)) BEGIN /* add review by patient_alias for doctor_alias with the given star_rating and comments fields, assign the current date ...
ALTER TABLE images DROP CONSTRAINT fk_images_users; ALTER TABLE images ADD CONSTRAINT fk_images_users FOREIGN KEY(user_id) REFERENCES users(id)
SELECT count(1) FROM compra WHERE compradorId = :id;
select a.de042,b.c9,a.c10,b.c11,b.c31,a.shjg,a.czde103 from (select distinct de042,substr(shjg,0,length(shjg)-length('身份证位数不正确')) as c10,shjg,czde103,count(1) from gz230 where shjg like '%身份证%' and czde103 in (20130000000122,20130000000124,20130000000126) and ctime like '%2013.06%' group by de042,shjg,czde103) a,g...
DELIMITER // -- Проверка правильности ссылки на вторую сторону в договорах DROP TRIGGER IF EXISTS add_contract_dependencies_check; CREATE TRIGGER add_contract_dependencies_check BEFORE INSERT ON contracts FOR EACH ROW BEGIN IF NEW.contract_type_id = (SELECT id FROM contract_types ct WHERE contract_type = 'income') ...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost:3306 -- Généré le : Dim 11 mars 2018 à 04:53 -- Version du serveur : 5.7.18 -- Version de PHP : 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
--1) 각 학생의 평점을 검색하라(별명을 사용) SELECT sno 생일, sname 이름, avr 평점 FROM student; --2) 각 과목의 학점수를 검색하라(별명을 사용) SELECT cno 학수번호, cname 과목명, st_num 학점 FROM course; --3) 각 교수의 지위를 검색하라(별명을 사용) SELECT pname 교수이름, orders 지위 FROM professor; --4) 급여를 10%인상했을 때 연간 지급되는 급여를 검색하라(별명을 사용) SELECT sal 월급, sal*12 연봉, sal*12*1.1 "10% 인상 연...
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Tempo de geração: 08/12/2017 às 11:54 -- Versão do servidor: 5.7.17-0ubuntu0.16.04.1 -- Versão do PHP: 7.0.13-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD...
insert into trips ( name, img, profile_id) values ($1, $2, $3) RETURNING *;
CREATE Procedure sp_ser_loadinvoicetask (@InvoiceID as int, @Product_Code as nvarchar(15), @Product_Specification1 as nvarchar(50)) as Select TaskMaster.TaskID, TaskMaster.Description, EstimatedPrice, Price, IsNull(ServiceInvoiceDetail.ServiceTax_Percentage,0) Percentage, IsNull(ServiceInvoiceDetail.Servic...
INSERT INTO PERSON (first_name, last_name, email) VALUES ('Amol', 'Bhople', 'abc@gmail.com'), ('Deja', 'Vu', 'xyz@email.com'), ('Cap', 'America', 'cap@marvel.com'), ('Abigail','Adam','AbigailAdam@abc.com'), ('Alexandra','Adrian','AlexandraAdrian@abc.com'), ('Alison','Alan','AlisonAlan@abc.com'), ('Amanda'...
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 27, 2015 at 11:04 AM -- Server version: 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=@...
-- -------------------------------------------------------- -- 主机: 127.0.0.1 -- 服务器版本: 5.7.28 - MySQL Community Server (GPL) -- 服务器OS: Win64 -- HeidiSQL 版本: 10.2.0.5599 -- -------------------------------------------------------- /...
-- Add/modify columns alter table BT_BANKACC_APP add attachment_path VARCHAR(500);
------------------------------------ --Author: Jeffrey Yu --RevisedDate: 2015-7-6 ------------------------------------ select distinct dfc.DocumentId, dt.Name as DocType, d.DocumentEffectiveDate as EffectiveDate, d.CreationDate, d.FilingId, d.FormType, d.CIK, ...
CREATE TABLE IF NOT EXISTS `ticket` ( `usuario_idUsuario` INT UNSIGNED NOT NULL, `assento_sala_idAssento` INT NOT NULL, `sesao_idSesao` INT NOT NULL, `reserva` INT NOT NULL, `valor` DECIMAL(4,2) NOT NULL, INDEX `fk_ticket_usuario1_idx` (`usuario_idUsuario` ASC), CONSTRAINT `fk_ticket_usuario1` FOREIGN...
-- SQL – Assignment 3 -- -- Exercise 1: Tiếp tục với Database quản lý Fresher-- -- Question 1: Thêm ít nhất 10 bản ghi vào table -- Question 2: Viết lệnh để lấy ra tất cả các thực tập sinh đã vượt qua bài test đầu vào, nhóm chúng thành các tháng sinh khác nhau -- Question 3: Viết lệnh để lấy ra thực tập sinh có tên dài...
CREATE DATABASE IF NOT EXISTS `siimn` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `siimn`; -- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86) -- -- Host: fliaguerrero.no-ip.info Database: siimn -- ------------------------------------------------------ -- Server version 5.6.23-log /*!40101 SET @OLD_CHARACTER_SET_...
-- 修改日期:20121205 -- 修改人:胡浩军 --修改内容:科目余额汇总表 declare max_id_cs20121204 number; max_id_cs20121204_id number; max_id_cs20121204_1 number; begin select count(*) into max_id_cs20121204 from bt_function where FUNCTION_IDEN='w_query_subject_balance_collect'; if max_id_cs20121204=0 then select function_id in...
DROP TABLE IF EXISTS `playercreateinfo_item`; CREATE TABLE `playercreateinfo_item` ( `race` tinyint(3) unsigned NOT NULL DEFAULT '0', `class` tinyint(3) unsigned NOT NULL DEFAULT '0', `itemid` mediumint(8) unsigned NOT NULL DEFAULT '0', `amount` tinyint(3) NOT NULL DEFAULT '1', KEY `playercreateinfo_race_clas...
create database db_generation_game_online; use db_generation_game_online; create table tb_classe( id bigint auto_increment, tipo varchar(255) not null, defesa decimal (5,3), ataque decimal(5,3), primary key (id) ); insert into tb_classe (tipo, defesa, ataque) values ( "Atirador",0.500,2.500); insert into ...
update li_profile set name = $2, summary = $3, company = $4, experience = $5, years = $6, past_company = 7$, past_experience = 8$, past_years = 9$, skill1 = 10$, skill2 = 11$, skill3 = 12$, degree = 13$, school = 14$, school_years = 15$, avatar = 16$, ...
alter table questionnaire_result add column question_id integer; delete from questionnaire_result; insert into questionnaire_result select nextval('hibernate_sequence'),q.configuration_id, q.surveyexecution_id, q.question_id from ( select distinct q.configuration_id, qa.surveyexecution_id, qa.question_id from questi...
select s_store_name, i_item_desc, sc.revenue, i_current_price, i_wholesale_cost, i_brand from store, item, ( select ss_store_sk, avg(revenue) as ave from ( select ss_store_sk , ss_item_sk , sum(ss_sales_price) as revenue from store_sales ...
USE chickenice; DROP TABLE IF EXISTS transaction_client; DROP TABLE IF EXISTS bill; DROP TABLE IF EXISTS client; DROP TABLE IF EXISTS dosage; DROP TABLE IF EXISTS users; DROP TABLE IF EXISTS product; DROP TABLE IF EXISTS entity; /* * MySQL script. * Create the database schema for the application. */ CREATE TABLE...
create table WFTacheType ( /* class WFTacheType*/ oid DECIMAL (19,0) NOT NULL PRIMARY KEY , version INTEGER NOT NULL , tacheName VARCHAR (20) NOT NULL , tacheValue VARCHAR (20) NOT NULL , businessType VARCHAR (20) NOT NULL , startTacheFlag INTEGER , visibleFlag INTEGER );
CREATE SEQUENCE public.code_id_seq INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1; CREATE TABLE category ( code BIGINT NOT NULL DEFAULT nextval('code_id_seq'::regclass), nome VARCHAR(50) NOT NULL, CONSTRAINT code_pkey PRIMARY KEY (code) ); INSERT INTO categor...
insert into table_1_test values (1) select * from table_1_test delete from table_1_test dbcc checkident ("table_1_test", reseed , 0)
select product.name, description from product join Manufacturer M on product.manufacturld = M.id where M.name = :manu_name;
-- 为商品表添加分类的ID alter TABLE p39_goods add COLUMN is_floor enum('是','否') not null DEFAULT '否' comment '是否推荐楼层'; alter TABLE p39_goods add COLUMN sort_num tinyint unsigned not null DEFAULT '100' comment '排序的数字'; alter TABLE p39_goods add index is_floor(is_floor); alter TABLE p39_goods add index sort_num(sort_num); alter...
SELECT bmprdstr_sql.item_no, qty_per_par, comp_item_no, item_desc_1, item_desc_2 FROM bmprdstr_sql INNER JOIN imitmidx_sql AS IM ON comp_item_no = IM.item_no WHERE im.prod_cat like '6%' ORDER BY bmprdstr_sql.item_no SELECT * FROM iminvloc_sql INNER JOIN oelinhst_sql AS OL ON Ol.item_no = iminvloc_sql.i...
-- -- migration that adds recurrences -- drop table recurrences cascade; create table recurrences ( id serial, name varchar(50), recurrence_amount integer, recurrence_type text ); insert into recurrences values ( 1, 'daily', 1, 'daily'), ( 2, 'weekly', 1, 'week'), ( 3, 'bi-weekly', 2, 'week'), ( 4,...
/* Query to show the manager's names at each store, with full address of property (street address, district, city and country) */ SELECT s.store_id, s.first_name, s.last_name, a.address, a.district, c.city, co.country FROM staff s JOIN address a ON s.address_id = a.address_id JOIN city c ON a...
-- Mar 13, 2008 8:15:22 AM BRT -- FR [ 1913092 ] Add the Payment Rule to Commissioning INSERT INTO AD_Column (Name,IsMandatory,IsTranslated,Description,IsIdentifier,SeqNo,Help,AD_Reference_Value_ID,Version,IsActive,AD_Table_ID,AD_Column_ID,ColumnName,AD_Client_ID,AD_Org_ID,FieldLength,IsParent,Created,IsSyncDatabase,...
SELECT URUNKOD,URUNAD,KDVORAN*LISTEFIYAT AS 'KDV DAHIL SATIS FIYATI' FROM tblUrun
INSERT INTO Probe(probeId,probeName,password,salt,token) VALUES (10001,"Hot_resource_scalability","n/a","n/a","n/a"), (10002,"Resource_scalability","n/a","n/a","n/a"), (10003,"Service_availability","n/a","n/a","n/a"), (10...
CREATE DATABASE IF NOT EXISTS `heroku_f1cf93086df67b3` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `heroku_f1cf93086df67b3`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: us-cdbr-iron-east-01.cleardb.net Database: heroku_f1cf93086df67b3 -- ------------------------------------------------------...
/* remove column */ ALTER TABLE mst_animes DROP COLUMN tipe, DROP COLUMN jenis;
select * from account where acc_email = ${email}
set echo off set heading off set verify off set feedback off set show off set trim off set pages 0 ...
ALTER TABLE Rtablas ADD Estado char(1) null
use movies /*1. Напишете заявка, която извежда имената на актрисите, участвали в Terms of Endearment.*/ select starname from starsin where movietitle = 'Terms of Endearment' /*2. Напишете заявка, която извежда имената на филмовите звезди, участвали във филми на студио MGM през 1995 г. */ select starname from starsin ...
/************************ * Table Population * * Grupo 19 * *************************/ INSERT INTO reserva Values('314159'); INSERT INTO reserva Values('265358'); INSERT INTO reserva Values('979323'); INSERT INTO reserva Values('846264'); INSERT INTO reserva Values('338327'); INSERT INTO reserva ...
CREATE OR REPLACE VIEW History_Dataset_View AS SELECT t.id AS tid_id, t.name AS tid, ff.name AS flag, t.ipaddress AS ipaddress, to_char(tis.timeentered, 'MM-DD-YYYY HH24:MI:SS') AS lasttime, to_char(tis.timeentered, 'MM-DD-YYYY HH24:MI:SS') AS sorttime, f.name AS facility, f.id AS facility_id, tfm.tra...
create or replace package body PK_GPY_ACTIVIDAD is PROCEDURE Pr_RegistrarActividad (p_A005DESCRPCNACTVDD IN GPYT_T005_ACTIVIDAD.A005DESCRPCNACTVDD%TYPE, p_A005IDTIPACTVDD IN GPYT_T005_ACTIVIDAD.A005IDTIPACTVDD%TYPE, ...
--Quiz02 --Q1 SELECT emp.employee_id, emp.first_name, dept.department_name, man.first_name FROM employees emp JOIN employees man ON emp.manager_id = man.employee_id JOIN departments dept ON emp.department_id = dept.department_id ORDER BY emp.employee_id; --Q2 SELECT reg.region_...
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: DB.J.MINE -- Generation Time: Jul 13, 2015 at 07:18 PM -- Server version: 5.5.38-log -- PHP Version: 5.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
create database uwebanco; use uwebanco; CREATE TABLE usuario( id INT AUTO_INCREMENT, nome varchar (50), cpf varchar (15), senha varchar (20), endereço varchar (250), telefone varchar (15), contatipo varchar (30), datanascimento date, saldo float, numeroconta varchar (10), PRIMARY KEY (id)); SELECT * FROM usuario; SE...
# What is the percentage value of each product in inventory # sorted by the highest percentage first (Hint: Create a view first). DROP VIEW IF EXISTS ValueOfEachProductsStock; CREATE VIEW ValueOfEachProductsStock AS SELECT productName, quantityInStock*MSRP AS productValue FROM Products; SELECT * , ROUND(100*produ...
-- 1. Show the name, continent and population of all countries. SELECT name, continent, population FROM world; -- 2. Show the name for the countries that have a population of at least 200 million. SELECT name FROM world WHERE population >= 200000000; -- 3. Give the name and the per capita GDP for those ...
ALTER TABLE teams RENAME TO sys_team; ALTER TABLE organisations RENAME TO sys_organisation; ALTER TABLE team_members RENAME TO sys_team_member; ALTER TABLE users RENAME TO sys_user;
select * from tbl_Categorias select * from tbl_Clientes select * from tbl_Estoque select * from tbl_EstoqueLocado select * from tbl_FormaPgto select * from tbl_Fornecedor select * from tbl_Funcionarios select * from tbl_Locacao select * from tbl_LocacaoItens select * from tbl_LocacaoItensPgto select * from tb...
Create Procedure sp_get_CategoryBasedSplCategoryItems (@CATEGORYID INT) As Select Product_Code from Items where CategoryID=@CATEGORYID
CREATE TABLE raw_test ( username text, language text, userAgent varchar(65535), content varchar(65535) ); vacuum; drop table raw_test; copy raw_test from 's3://transitapp-111/sessions.log-20160107.gz' credentials 'aws_access_key_id=AKI********OZQ;aws_secret_access_key=d*****************************ty' delim...
ALTER TABLE UTBETALING_BEGRUNNELSE ADD COLUMN OPPRETTET_AV VARCHAR DEFAULT 'VL' NOT NULL; ALTER TABLE UTBETALING_BEGRUNNELSE ADD COLUMN OPPRETTET_TID TIMESTAMP(3) DEFAULT LOCALTIMESTAMP NOT NULL; ALTER TABLE UTBETALING_BEGRUNNELSE ADD COLUMN ENDRET_AV VARCHAR; ALTER TABLE UTBETALING_BEGRUNNELSE ADD C...
/****** Thursday night participation ******/ --incomplete. Needs more accurate filtering to stop games that creep in from earlier / later in the night. with data as ( select GameTimestamp, GameName, Players.PlayerID, GamerTag, Score, ROW_NUMBER() over (partition by GameTimestamp order by score desc) as gamePosition, ...
/* Andres Rocha 12-11247 Francisco Rojas 12-10515 */ CREATE OR REPLACE TYPE equipo_t AS OBJECT ( Nombre VARCHAR2(20), Ciudad VARCHAR2(20) ); / CREATE TABLE equipo OF equipo_t( PRIMARY KEY (nombre) ); CREATE OR REPLACE TYPE integrante_t AS OBJECT ( Nombre VARCHAR(20), Pasaporte VARCHAR(20), Edad VARCHAR...
create TABLE po_doedsfall ( id bigint PRIMARY KEY, fk_po_person_id bigint REFERENCES PO_PERSON (id) NOT NULL, versjon bigint DEFAULT 0 NOT NULL, doedsfall_dato TIMESTAMP(3) ...
/*Atividade 6 Crie um banco de dados para um serviço de um site de cursos onlines, o nome do banco deverá ter o seguinte nome db_cursoDaMinhaVida, onde o sistema trabalhará com as informações dos produtos desta empresa. O sistema trabalhará com 2 tabelas tb_curso e tb_categoria. siga exatamente esse passo a passo:...
SELECT * FROM dbo.Employees
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 24-Maio-2014 às 03:32 -- Versão do servidor: 5.6.16 -- PHP Version: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
update m set m.name = l.display_name from municipalities as m inner join laus as l on m.lau = l.id;
-- -------------------------------------------------------------------------------- -- Routine DDL -- Note: comments before and after the routine body will not be stored by the server -- -------------------------------------------------------------------------------- DELIMITER $$ CREATE DEFINER=`62465_evila`@`%` PROCE...
-- Feb 17, 2009 9:21:53 PM EET -- UPDATE AD_Table SET AccessLevel='1',Updated=TO_DATE('2009-02-17 21:21:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Table_ID=702 ; -- Feb 17, 2009 9:22:06 PM EET -- UPDATE AD_Table SET AccessLevel='1',Updated=TO_DATE('2009-02-17 21:22:06','YYYY-MM-DD HH24:MI:SS'),UpdatedB...
USE `arenafifadb`; DELIMITER $$ DROP PROCEDURE IF EXISTS `spAddHistAltUsuario` $$ CREATE PROCEDURE `spAddHistAltUsuario`( pIdUsuarioAlt INTEGER, pIdUsuarioOperacao INTEGER, pTpOperacao VARCHAR(30), pPsnIdAlt VARCHAR(30), pPsnIdOperacao VARCHAR(30), pDsPagina VARCHAR(30) ) begin insert into TB_HISTORICO_ALT_USU...
/*==============================================================*/ /* Nom de SGBD : MySQL 5.0 */ /* Date de création : 19/03/2021 16:35:50 */ /*==============================================================*/ drop table if exists T_INFO_MOVIES; drop table if...
SELECT name FROM customer WHERE referee_id is NULL or referee_id!=2;
@@autotask_sql_setup select * from DBA_AUTOTASK_WINDOW_HISTORY order by window_start_time;
use cadastro; insert into pessoas (id, nome, nascimento, sexo, peso, altura, nascionalidade) values (default, 'José', '1985-09-12', 'M', '100', '1.85', 'Argentina'); insert into pessoas values (default, 'João', '1985-09-12', 'M', '80.5', '1.95', 'Angola'), (default, 'Marta', '1985-09-12', 'F', '55.5', '1.65', 'Bras...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 17-07-2020 a las 08:48:25 -- Versión del servidor: 10.4.11-MariaDB -- Versión de PHP: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
-- 코드를 입력하세요 -- # SELECT product_code, SUBSTRING(product_code,1,2) from product; SELECT left (product_code, 2) as category, count (*) as products from product group by category; -- # select * from product
SELECT b.title FROM books b,subjects s,books_subjects sb WHERE b.id=sb.book AND s.id=sb.subject AND s.name IN ('Technology','Politics');
SELECT f.ProductId, f.Rate, f.Description, f.CustomerId, c.Age, c.Gender FROM Feedbacks f JOIN Customers c ON c.Id=f.CustomerId WHERE f.Rate<5.0 ORDER BY ProductId DESC, f.Rate
drop user sandbox cascade; exit;
create table userid( id varchar2(30) primary key ); insert into userid values('son'); insert into userid values('hhaneunjoo'); select count(id) as cnt from userid where id='son';
CREATE OR REPLACE PROCEDURE SSHARM17."AddDiseaseLimit" ( "observationSpecName" IN VARCHAR2, "metricName" IN VARCHAR2, "upperLimit" IN VARCHAR2, "lowerLimit" IN VARCHAR2, "diseaseName" IN VARCHAR2, "limitId" OUT INTEGER) AS BEGIN "AddGeneralLim...
#Fetch all the apartments which are available for the lease. select * from apartment where leaseStatus=0; #Fetch recent maintenance details of apartment with apartment id 11103. select * from maintenance where apartmentId=11103 order by maintenanceDate desc; #Fetch details of the tenant who lives in apartment with th...
-- //queries into DB -- //add answer -- //add question -- //add reported to answer/question -- //add thumbnail to answer -- //add helpfulness to answer/question \connect qa; DROP SCHEMA IF EXISTS qa; DROP TABLE IF EXISTS questions; DROP TABLE IF EXISTS answers; DROP TABLE IF EXISTS photos; CREATE SCHEMA q...
CREATE PROCEDURE sp_Update_CityInfo(@CityID [nvarchar](50), @DistrictID Integer, @StateID Integer, @Active Integer, @STD nvarchar(50) = 0) As Update City Set DistrictID = @DistrictID, StateID = @StateID, Active = @Active, STDCode = @STD Where CityID = @CityID Updat...
-------------------------------------------------------- -- File created - Saturday-April-10-2021 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Function HUNGARORING_FILTER -------------------------------------------------------- CREA...
select count(*) from `nation` union all select sum(`n_nationkey`) from `nation` group by `n_regionkey`
--select * FRom ar_system_parameters_all; select * from all_tables where owner='ONT' and table_name like 'OE%PARA%'; desc OE_SYS_PARAMETERS_ALL desc OE_SYSTEM_PARAMETERS_ALL -- these two tables store the same data select ORG_ID, TO_NUMBER(PARAMETER_VALUE) from OE_SYS_PARAMETERS_ALL where parameter_code = 'MASTER_ORGA...
-- phpMyAdmin SQL Dump -- version 4.0.6 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 25, 2013 at 07:05 PM -- Server version: 5.5.33 -- PHP Version: 5.5.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.6.37 - MySQL Community Server (GPL) -- Server OS: Win32 -- HeidiSQL Version: 9.4.0.5125 -- -------------------------------------------------------- /*...
/** QAQC invalid_date_lastupdt invalid_date_filed invalid_date_statusd invalid_date_statusp invalid_date_statusr invalid_date_statusx bistest **/ DROP TABLE IF EXISTS _INIT_qaqc; WITH -- identify invalid dates in input data JOBNUMBER_invalid_dates AS ( SELECT DISTINCT job_number, (CASE WHEN (is_date(date_l...
USE BKEL; CREATE TABLE IF NOT EXISTS AUTHOR ( AuthorId INTEGER NOT NULL AUTO_INCREMENT, AuthorName VARCHAR(255) NOT NULL, PRIMARY KEY (AuthorId) ); LOAD DATA INFILE '/mnt/DAE242A5E242862B/Code/db/Excel/author.csv' INTO TABLE AUTHOR FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n' IGNORE 1 ...
/* Erste Uebungen zu JOIN's Fach: Grundlagen Datenbanken Basis: DB Bestellungen aus Vorlesung Autor: R. Zimmermann Datum: 25.11.2016 -------------------------------------------------------------------------------------------------------------------------*/ # Vorgehen: # 1. vertehen der Frage # 2. Welche Tabelle brauc...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 10, 2020 at 11:38 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
CREATE DATABASE IF NOT EXISTS `projectdb` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `projectdb`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: projectdb -- ------------------------------------------------------ -- Server version 5.7.20-log /*!40101 SET @OLD_CHARA...
DROP TABLE IF EXISTS postings; CREATE TABLE postings ( id BIGINT not null AUTO_INCREMENT, owner_id BIGINT not null, title varchar(1000), cost varchar(64), bedrooms INT, address varchar(1000), city varchar(64), state varchar(32), info varchar(20000), location point, PRIMARY KEY (id) ) ENGINE = MYISAM; insert into post...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 05-Nov-2020 às 13:26 -- Versão do servidor: 10.4.14-MariaDB -- versão do PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
reate table sequence_table ( sequence_Name varchar(100) not null primary key, current_value integer );
copy( SELECT uuid, localization_class_uuid, key, application_name, class_name, inherited_class_name, full_key, translations::json -> 'en' as en, translations::json -> 'nl' as nl FROM mh_localization.translation_keys_extended where inherited = false or overwrites = true ) to 'f:/temp/translations.txt' wi...
-- TODO make sure all preset data exists -- TODO add foreign key references -- TODO majors - get data pragma foreign_keys = on; create table college ( id integer primary key, name text, url text, address text, faculty_to_student_ratio text, num_grad integer, num_undergrad integer, percent_admitted int...
-- 1. -- ### Part (a) -- **_[5 points]_** -- $\{X, Y\}$ is a **superkey** for a relation $R(W,X,Y,Z)$. DROP TABLE IF EXISTS R; CREATE TABLE R ( W INT, X INT, Y INT, Z INT ); insert into R values (1, 2, 3, 4), (1, 3, 3, 4), (1, 4, 3, 4), (1, 5, 3, 4), (1, 6, 3, 4), (2,...
-- get current status SELECT GET_AHM_EPOCH(), GET_AHM_TIME(), GET_CURRENT_EPOCH(); -- prevent new connections Select set_config_parameter(‘MaxClientSessions’,0); -- close off all sessions: Select close_all_sessions(); -- Check the transactions that were stuck in WOS (attached the list) select * from storage_contain...
SELECT `WsaUserOrganizationRelationship`.`id` `WsaUserOrganizationRelationship`.`user_id` `WsaUserOrganizationRelationship`.`wsa_role_id` `WsaUserOrganizationRelationship`.`wsa_organization_id` `WsaUserOrganizationRelationship`.`wsa_group_id` `WsaUserOrganizationRelationship`.`name` `WsaUserOrganizationRel...