text
stringlengths
6
9.38M
CREATE OR REPLACE PUBLIC SYNONYM "TEST" FOR orient."TEST";
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: localhost Database: tutorial -- ------------------------------------------------------ -- Server version 5.7.17-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */...
DROP DATABASE IF EXISTS gsbrv ; CREATE DATABASE IF NOT EXISTS gsbrv DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci ; USE gsbrv ; create table activitecompl ( ac_num int default '0' not null primary key, ac_date date null, ac_lieu varchar(50) null, ac_theme varchar(20) nu...
CREATE OR REPLACE PUBLIC SYNONYM recovery_pkg FOR orient.recovery_pkg;
UPDATE settings SET chat = 1 WHERE username = 'admin'
create table additional_parties_involved ( additional_parties_involved_id bigint not null auto_increment, explanation_of_involvement varchar(255), party_name varchar(255), supervisor varchar(255), intake_form_id bigint, primary key (additional_parties_involved_id) ...
CREATE TABLE TEDARIKCI( ID tinyint not null IDENTITY (1,1) UNIQUE, TEDARIKCI_FIRMA varchar(20) not null, AD varchar(20) not null, SOYAD varchar(20) not null, TEL_NO1 CHAR(11) not null, TEL_NO2 CHAR(11) not null, EMAIL varchar(50)not null, ADRES varchar(100)unique )
SELECT MAP("grouped_by", tag) AS __labels__, COUNT(*) AS count, AVG(value) AS avg_value FROM tagged_value GROUP BY tag ;
create class CodeWithName; create property CodeWithName.code string; create property CodeWithName.name string; alter property CodeWithName.code mandatory true; alter property CodeWithName.name mandatory true; create class Address; create property Address.city embedded CodeWithName; create property Address.street embed...
DROP TABLE IF EXISTS `talent_scout`; CREATE TABLE `talent_scout` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `user_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `user_id` (`user_id`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
select `nationkey`, min(`nationkey`) over (partition by `regionkey` order by `nationkey` rows between `preceding`(2) and `following`(1)) as `min` from `tpch`.`tiny`.`nation`
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
ARPU, histograms, and percentiles
-- char can be used when you need to truncate inputs like California to Ca create table Inventory( item_name varchar(50), price float, quantity int ); -- timestamp takes up less space than datetime but cannot store dates before 1970 and after 2038 select current_time(); select current_date...
SELECT DISTINCT Product.maker, Laptop.speed FROM Product, Laptop WHERE Product.model = Laptop.model AND Laptop.hd >= 10;
/* Navicat Premium Data Transfer Source Server : mysql Source Server Type : MySQL Source Server Version : 50727 Source Host : localhost:3306 Source Schema : miaosha Target Server Type : MySQL Target Server Version : 50727 File Encoding : 65001 Date: 04/05/2020 19:15:...
-- -- Definition of table `active_guests` -- DROP TABLE IF EXISTS `active_guests`; CREATE TABLE `active_guests` ( `ip` varchar(15) NOT NULL, `timestamp` int(11) unsigned NOT NULL, PRIMARY KEY (`ip`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Definition of table `active_users` -- DROP TABLE IF EXISTS `activ...
create sequence SEQ_TOPIC_CATEGORY start with 1000 cache 20; -- ============================================================ -- Table : TOPIC_CATEGORY -- ============================================================ create table TOPIC_CATEGORY ( TOP_CAT_ID NUMERIC ...
-- groups.sql --- Database access groups. -*- sql -*- -- Copyright (C) 2005-2012 Opersys inc., All rights reserved. <<< connect(tbxsosd_db) >>> <<< isnorole(teambox) >>> create role teambox nosuperuser nocreatedb nocreaterole noinherit nologin; -- one group per database. <<< isnorole(teambox_event) >>> create role ...
COL con_id FOR 999 HEA 'Con|ID'; COL pdb_name FOR A30 HEA 'PDB Name' FOR A30 TRUNC; COL timestamp FOR A19 HEA 'Timestamp'; COL plan_hash_value FOR 9999999999 HEA 'Plan|Hash Value'; -- PRO PRO PLANS IN AWR (dba_hist_sql_plan) PRO ~~~~~~~~~~~~ SELECT TO_CHAR(h.timestamp, '&&cs_datetime_full_format.') timestamp, p...
INSERT INTO actor Values( 01, 'Sam', 'Iruedo', 'M'); INSERT INTO actor Values( 02, 'Sam', 'Bako', 'M'); INSERT INTO actor Values( 03, 'Dayo', 'Ayoola', 'M'); INSERT INTO actor Values( 04, 'Seyi', 'Capecodd', 'M'); INSERT INTO actor Values( 05, 'Joy', 'Fatoye', 'F'); INSERT INTO reviewer Values ( 01, "Naheem"); INSERT...
Create procedure Sp_Get_DandDSavedBatch @ID int, @Product_Code nVarchar(30) AS BEGIN Select BP.Batch_Number, Sum(IsNull(DD.TotalQuantity,0)) as TotalQuantity, Rate = BP.PTS, Tax = BP.TaxSuffered ,Sum(IsNull(DD.RFAQuantity, 0)) as RFAQuantity ,Sum(IsNull(DD.TaxAmount, 0)) as TaxAmount, Sum(IsNull(DD.TotalAmount,0)) a...
Create Procedure [Sp_GetPMCategoryList_PMScreen](@ParamID Int) As Begin /* This SP is used both in PM Metrics screen and PM report.*/ Create Table #TempPMCategoryList ( Product_Code Nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS, Product_Name Nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS, ...
WITH donanteConSuMPago (dni,cod_pago) AS ( SELECT a.DNI, m.cod_pago FROM ciudad.aporte a,ciudad.medio_pago m WHERE (a.cod_pago = m.cod_pago AND a.frecuencia = 'Mensual') ), donantesConTarjeta (dni,nro,titular,f_vencimiento,empresa) AS ( SELECT d.DNI, t.nro, t.titular, t.f_vencimiento, t.empresa FROM donanteConSu...
===== 전화번호 부( Contact ) -- 대리키 : 일련번호 -> pIdx -- 이름, 전화번호, 주소, 이메일 <- 기본정보 -- 주소값과 이메일은 입력이 없을 때 기본값 입력 -- 친구의 타입 (카테고리) : univ, com, cafe 세가지 값만 저장 가능 ------ 선택 정보 -- 전공, 학년 -- 회사이름, 부서이름, 직급 -- 모임이름, 닉네임 --컬럼 레발 제약 정의 create table phonebook ( pidx number(4) constraint phonebook_pidx_pk primary key, pname va...
-- Populate tables INSERT INTO w_table (name, owner) VALUES ('Progetto Universitario','108010470989656785699'); INSERT INTO w_table (name, owner) VALUES ('Lavoro','108010470989656785699'); INSERT INTO w_table (name, owner) VALUES ('Tesi','108010470989656785699'); INSERT INTO w_table (name, owner) VALUES ('Semantic Tabl...
SELECT row_to_json(customers) FROM "Evangelista-northwind".customers;
create table t_cargo_leg_detail ( tracking_id number(8) not null, idx number not null, voyage_number varchar2(100) not null, from_location varchar2(5) not null, to_location varchar2(5) not null, load_time date not null, unload_time date not null ); ...
insert into item_category VALUES (1,'家具'), (2,'食品'), (3,'本');
CREATE TABLE IF NOT EXISTS `stat_config` ( `variable` varchar(50) NOT NULL, `value` varchar(255), PRIMARY KEY (`variable`) ) ENGINE=innoDB DEFAULT CHARSET=utf8; INSERT INTO `stat_config`(`variable`,`value`) VALUES ('language','russian'), ('mail_day','0'), ('mail_email',''), ('mail_subject','SiteEdit Satisti...
-- 10-Jan-2009 19:27:28 MYT -- BUG 2497770 -- JavaPOS DocType Setup in GW UPDATE C_POS SET C_DocType_ID=135,Updated=TO_TIMESTAMP('2009-01-10 19:27:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_POS_ID=100 ;
alter table report_images add column userId int not null; alter table report_images add column size int not null; alter table report_images add foreign key (userId) references konta(id) on delete no action;
alter table geparame add(cd_tp_pessoa_cliente number(4)) add(cd_tp_pessoa_vendedor number(4)) / alter table geparame add (cd_condicao_padrao number(4)) / alter table geparame add (constraint FK_GEPARAME_GETIPOPE_CLI foreign key (cd_tp_pessoa_cliente) references getipope(cd_tp_pessoa)) add (constraint...
UPDATE APX_ASA.PARAMS SET LAST_UPDATE = TRUNC(SYSDATE); COMMIT; EXIT;
/* Name: Top 10 countries searched by Date Data source: 4 Created By: Admin Last Update At: 2015-09-02T16:27:55.177647+00:00 */ SELECT TOP(country, 10) TOP10Countries, count(*) AS Amount FROM ( SELECT nvl(UPPER(C1.displayName),UPPER(C2.country)) AS Country FROM [djomniture:devspark.COUNTRIES] C1 FULL OUT...
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
CREATE TABLE currencies ( id INT GENERATED ALWAYS AS IDENTITY, code CHAR(3) NOT NULL, name VARCHAR(40), PRIMARY KEY(id) ); INSERT INTO currencies (code, name) VALUES ('PHP', 'Philippine Peso'); INSERT INTO currencies (code, name) VALUES ('USD', 'United States Dollar'); INSERT INTO currencies (code, nam...
CREATE TABLE `uploaded_text` ( `ID` int(11) NOT NULL, `content` text COLLATE utf8mb4_unicode_ci, `date` date DEFAULT NULL, `words_count` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE `word` ( `ID` int(11) NOT NULL, `text_id` int(11) DEFAULT NULL, `...
-- 06-08-2010 12:47:16 PM CST -- IsCreatePlan default value=Y UPDATE AD_Column SET DefaultValue='Y',Updated=TO_TIMESTAMP('2010-06-08 12:47:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=53382 ; -- Jun 14, 2010 1:50:44 PM COT -- FR3013401_IsCreatePlan default value=Y INSERT INTO t_alter_column val...
drop table posts; drop table comments; create table posts ( id serial primary key, content text, author varchar(255) ); create table comments ( id serial primary key, content text, author varchar(255), post_id integer )
create or replace function wxhf_time_eclapse(d002 date, d001 date) return varchar2 is Result real; d1 date; d1b date; d1e date; d_1 date; d2 date; d2b date; d2e date; d_2 date; hour Real; minute Real; seconds Real; sgn Char(1); begin if d002<d001 then sgn:='-'; result:=d001 - d002...
DROP VIEW APPS.XXKBN_GL_JOUR_ACCRUE_V; /* Formatted on 2/9/2021 4:19:22 PM (QP5 v5.256.13226.35538) */ CREATE OR REPLACE FORCE VIEW APPS.XXKBN_GL_JOUR_ACCRUE_V ( JE_BATCH_ID, BATCH_DESC, JE_HEADER_ID, "Journal_Name", HEADER_DESC, JE_SOURCE, JE_CATEGORY, JE_REFERENCE, COA, DA...
create table project.MEMBER ( ID int auto_increment primary key, EMAIL varchar(255), PASSWORD varchar(100), NAME varchar(100), REGDATE datetime, unique key (EMAIL) ); -- sysdate INSERT INTO `project`.`member` (`EMAIL`, `PASSWORD`, `NAME`, `REGDATE`) VALUES ('test2@test2', '2222', 'tester2', now());
/* Find greatest common divisor (GCD) of two integers by Euclid's algorithm * original version * See https://en.wikipedia.org/wiki/Euclidean_algorithm */ DELIMITER // CREATE FUNCTION gcd(a INT, b INT) RETURNS INT NO SQL DETERMINISTIC BEGIN DECLARE ai INTEGER DEFAULT a; DECLARE bi INTEGER DEFAULT b; W...
CREATE TABLE IF NOT EXISTS TENTATIVE_CONNEXION ( id_tentative INT UNSIGNED NOT NULL AUTO_INCREMENT, login_tentative VARCHAR(255) NOT NULL, password_tentative VARCHAR(255) NULL DEFAULT NULL, ip_tentative VARCHAR(15) NOT NULL, date_tentative DATETIME NOT NULL, connexion_ok BOOLEAN NOT NULL...
SELECT name FROM Employee WHERE salary > 2000 AND months < 10 ORDER BY employee_id;
--select - select -- 값으로 사용 select first_name, salary, avg(salary) from employees; select avg(salary) from employees; select first_name, salary, 6461 avg_salary from employees; select first_name, salary, trunc((select avg(salary) from employees)) as 평균 from employees; --테이블로 사용 (join) select first_name, (sel...
INSERT INTO `user` (`id`, `name`) VALUES (1, 'tset'), (2, '임adfadf태진'), (3, '윤남권'), (4, '이상동'); INSERT INTO `instructor` (`id`, `bank_account`, `email`, `first_name`, `highest_education`, `last_name`, `phone`, `class_day_id`) VALUES (1, '외환은행 258-38-392878-5', 'schwang@espressobook.com', '상철', '석사', '황', '+82103358877...
DROP TABLE score; CREATE TABLE score ( score_id INTEGER PRIMARY KEY auto_increment, score INTEGER, player_name VARCHAR(100) );
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Gegenereerd op: 06 apr 2018 om 12:58 -- Serverversie: 10.1.30-MariaDB -- PHP-versie: 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 13-06-2019 a las 03:35:07 -- Versión del servidor: 10.1.31-MariaDB -- Versión de PHP: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
-- MySQL dump 10.13 Distrib 5.7.9, for osx10.9 (x86_64) -- -- Host: localhost Database: test -- ------------------------------------------------------ -- Server version 5.7.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40...
CREATE OR REPLACE PROCEDURE equipo_trabajador ( dni_ IN trabajador.dni%type ) IS x trabajador.nombre%type; cod TRABAJADOR.ONG%TYPE; numtrabajadores integer; dni trbajador.dni%type; nom trabajador.nombre%type; vol trabajador.esvoluntario%type; BEGIN SELECT NOMBRE, ONG INTO x, cod FROM TRABAJADOR WHERE D...
create sequence SEQ_LOGINHISTORY minvalue 1 maxvalue 99999999999999999999 start with 701921 increment by 1 cache 20
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- 主機: 127.0.0.1:3307 -- 產生時間: 2020-11-10 13:56:18 -- 伺服器版本: 10.4.14-MariaDB -- PHP 版本: 7.3.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
CREATE TRIGGER del_cliente AFTER DELETE ON voo FOR EACH ROW DELETE FROM piloto where piloto.codigo = new.piloto; DELETE FROM cliente where cliente.codigo in (SELECT cliente FROM cliente_voo, WHERE new.codigo = cliente_voo.voo);
CREATE TABLE representantes ( rcod int primary key NOT NULL AUTO_INCREMENT, rnome varchar(10) NOT NULL, email varchar(100) NOT NULL, fone int(10) NOT NULL, ativo int(10) NOT NULL ); create table clientes( cnome varchar(30) NOT NULL, contato varchar(30) NOT NULL, telefone varchar(30) NOT NULL, emailc varchar(30) ...
# 5. Monte uma query que exiba os dados da tabela `products` # a partir do quarto registro até o décimo terceiro, # incluindo tanto um quanto o outro. Obs.: não use `where` ou `order by`. SELECT * FROM northwind.products LIMIT 10 OFFSET 3;
-- EXECUTE THE ADD CUSTOMER PROCEDURE EXECUTE ICIC_BANK.PN_ADD_CUSTOMER('JAMES','S','MILLER','M','01-JUN-2018','IND'); SELECT * FROM BANK_CUST; -- EXECUTE THE PN_ADD_CUST_CONTACT PROCEDURE EXECUTE ICIC_BANK.PN_ADD_CUST_CONTACT(1011,9885000935,'HOME','56 RD NO 14 B HILLS','BNR COLONY','HYD','TS',500034); SELECT *...
DROP TABLE IF EXISTS organizations; CREATE TABLE organizations ( organization_id VARCHAR(100) PRIMARY KEY NOT NULL, name TEXT NOT NULL, contact_name TEXT NOT NULL, contact_email TEXT NOT NULL, contact_phone TEXT NOT NULL); INSERT INTO organizations (orga...
/** * * @public * @author Alexey * @name chars_flat */ Select * From lc_chars t1 Where :flat_id = t1.lc_id or :all_flats = true
 -- EXERCÍCIO 01 : SELECT id 'ID', nome 'nome', codigo 'codigo', categoria 'categoria', altura 'altura', peso 'peso', hp 'hp', ataque 'ataque', defesa 'defesa', especial_ataque 'ataque especial', especial_defesa 'defesa especial', velocidade 'velocidade', descricao 'descrição' FROM pokemons; -- EXERCÍCIO 02 : ...
--修改时间2012-11-15 --修改人 andy.huang --修改内容 开户申请完善 alter table bt_bankacc_app add prov varchar(20); alter table bt_bankacc_app add city varchar(20); alter table bt_bankacc_app add is_householdobject char(1);
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Aug 14, 2017 at 06:40 PM -- Server version: 5.7.19-0ubuntu0.16.04.1 -- PHP Version: 5.6.31-2+ubuntu16.04.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40...
SET client_encoding='utf-8'; CREATE TABLE sedzia ( id serial not null, imie varchar(16) not null, nazwisko varchar(32) not null, region varchar(32) , licencja char(6) not null, CONSTRAINT sedzia_pk PRIMARY KEY(id) ); CREATE TABLE stadion ( id serial , pojemnosc int not null, miasto varchar...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 02, 2021 at 08:51 AM -- 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...
ALTER TABLE `#__md_district` ADD `email` varchar(100) DEFAULT NULL AFTER `include_in_ar`; update `#__md_district` set email = 'sec-north@scacr.org' where id = 1; update `#__md_district` set email = 'sec-south@scacr.org' where id = 2; update `#__md_district` set email = 'sec-east@scacr.org' where id = 3; update `#__md_...
create table Material( id int not null primary key, item char(100) not null, unit Enum(of,grams,ml,slices), date Date);
-- phpMyAdmin SQL Dump -- version 2.10.0.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 24, 2015 at 11:37 PM -- Server version: 5.0.37 -- PHP Version: 5.2.1 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `class_7` -- -- -------------------------------------------------------- ...
CREATE TABLE tb_url_encurtada ( id INT AUTO_INCREMENT PRIMARY KEY, sUrlOriginal VARCHAR(250) NOT NULL, sUrlCodificada VARCHAR(250) NOT NULL, dtCriado DATE NOT NULL, PRIMARY KEY (id), CONSTRAINT UC_UrlCodificada UNIQUE(sUrlCodificada) );
insert into student(id,name, age) values(1,'liu', 18); insert into student(id,name, age) values(2,'yang', 19); insert into student(id,name, age) values(3,'gan', 18); insert into student(id,name, age) values(4,'li', 20);
ALTER TABLE consent_template ADD COLUMN version BIGINT; ALTER TABLE consent_template ADD COLUMN active BIT; update consent_template set version = 1; update consent_template set active = 1;
DELETE FROM dept_manager_dup WHERE emp_no = '110228'; DELETE FROM departments_dup WHERE dept_no = 'd009'; Insert into dept_manager_dup values('110228','d003','1992-03-21','9999-01-01'); insert into departments_dup values('d009', 'customer_service'); /* Left join returns all columns from the LHS ...
# [v10.1.9] create user nju33; # [v10.1.9] # +-------+-----------+----------+ # | user | host | password | # +-------+-----------+----------+ # | nju33 | | | # +-------+-----------+----------+ select user, host, password from mysql.user # [v10.1.9] # +-----------------------------------+ # | ...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- 主機: 127.0.0.1 -- 產生時間: 2016-07-19 07:07:51 -- 伺服器版本: 10.1.10-MariaDB -- PHP 版本: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARA...
-- phpMyAdmin SQL Dump -- version 4.1.4 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Lun 08 Mai 2017 à 03:43 -- Version du serveur : 5.6.15-log -- Version de PHP : 5.4.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S...
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Erstellungszeit: 20. Jun 2014 um 19:52 -- Server Version: 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 */; /*...
/* Navicat MySQL Data Transfer Source Server : Me Source Server Version : 50524 Source Host : localhost:3306 Source Database : domain_jump Target Server Type : MYSQL Target Server Version : 50524 File Encoding : 65001 Date: 2016-02-15 21:28:08 */ SET FOREIGN_KEY_CHE...
SELECT `group` AS 'Группа' FROM ( SELECT `group`, MAX(`informat` + `linal` + `diskr`) - MIN(`informat` + `linal` + `diskr`) AS diff FROM persons GROUP BY `group` ) AS tab WHERE diff = ( SELECT MAX(diff2) FROM ( SELECT MAX(`informat` + `linal` + `diskr`) - MIN(`informat` + `linal` + `diskr`) AS diff2 FROM perso...
SELECT * FROM tournaments;
-- TRIGGERS -- When Stores does not have that UPC already CREATE OR REPLACE TRIGGER CreateItemStoreAutomatically AFTER INSERT ON Item FOR EACH ROW DECLARE numbStoresInStore NUMBER; numbStoresInStore NUMBER; tempNumber NUMBER; tempNumber2 NUMBER; storeName2 VARCHAR(30); BEGIN SELECT COUNT(*...
insert into broadcast (user_id,stack_id,broadcast_code) VALUES ($1, $2, $3) returning *;
--Problem 23 --Use Hotel database and decrease tax rate by 3% to all payments. Then select only TaxRate column from the Payments table. Submit your query statements as Prepare DB & Run queries. UPDATE Payments SET TaxRate -= TaxRate * 0.03 SELECT TaxRate FROM Payments
/* ** Question: https://leetcode.com/problems/count-student-number-in-departments/ */ -- method 1 SELECT d.dept_name, SUM(CASE WHEN s.student_id IS NOT NULL THEN 1 ELSE 0 END) AS student_number FROM department d LEFT OUTER JOIN student s ON d.dept_id = s.dept_id GROUP BY d.dept_nam...
INSERT INTO USER(id, user_name, email, password) VALUES(1, 'Fırat', 'test@test.test', '$2a$10$kWICiR4K01rwpqEiRHJbRu6fVJ5Benrveh7ngxIjfFlnlK3MQoJCu');
-- 13-abr-2008 19:49:25 CDT -- FIFO/FIFO Management INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,U...
-- 07.07.2009 11:45:51 EEST -- UPDATE AD_Field SET DisplayLength=10, IsReadOnly='N',Updated=TO_TIMESTAMP('2009-07-07 11:45:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=53594 ;
/*set serveroutput on size 200000 set echo off set feedback off set verify off set showmode off -- ACCEPT l_user CHAR PROMPT 'Username: ' ACCEPT l_table CHAR PROMPT 'Tablename: ' */ -- declare l_user varchar2(20) := 'SR_BANK'; l_table varchar2(100) := 'DIVISION'; CURSOR TabCur IS SELECT dt.table_name,dt.owner,dt....
update genre set gType = "Non-Fiction" where gName = "Religion";
-- oracle-data-types.sql -- Jared Still -- jkstill at gmail.com -- use the sys.odci*list data types -- requires 10g+ -- similar to data found in OH/rdbms/admin/cdobj.sql, dbmsany.sql, dbmstf.sql col data_type_name format a60 head 'DATA TYPE' col data_type_id format 99999 head 'DATA|TYPE|ID' set pagesize 100 set l...
-------------------------------- --전화번호부 -------------------------------- --사용자 정의 제약조건을 저장하는 딕셔너리 테이블 desc user_constraints; select CONSTRAINT_NAME from user_constraints; select CONSTRAINT_NAME from user_constraints where table_name='phoneinfo_basic' ; select * from user_constraints;
DROP TABLE IF EXISTS `point_system_invites`; CREATE TABLE `point_system_invites` ( `entry` int(11) NOT NULL auto_increment, `PlayersAccount` char(50) default NULL, `InvitedBy` char(50) default NULL, `InviterAccount` char(50) default NULL, `Treated` int(1) NOT NULL default '0', `Rewarded` int(1) NOT NULL de...
create database javaframework; use javaframework; CREATE TABLE users(id INT PRIMARY KEY AUTO_INCREMENT, NAME VARCHAR(20), age INT); INSERT INTO users(NAME, age) VALUES('xiaoshuai', 23); INSERT INTO users(NAME, age) VALUES('sunms', 24); use javaframework; CREATE TABLE account(id INT PRIMARY KEY AUTO_INCREMENT,NAME VARC...
insert into accounts(account_number,pin,opening_balance,overdraft) values(123456789,1234,800,00); insert into accounts(account_number,pin,opening_balance,overdraft) values(987654321,4321,1230,150); insert into accounts(account_number,pin,opening_balance,overdraft) values(123456710,1234,300,00); insert into atm_mac...
CREATE Procedure sp_acc_UpdateARVContraDetailNew (@ContraSerial INT, @AdjustedFlag INT, @Type INT, @DocumentID INT, @ARVID INT = 0) As /*Update Collections table if CollectionType is CreditCard*/ If @Type = 3 Update Collections Set OtherDepositID = @ARVID Where DocumentID = @DocumentID Else /*Upd...
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 28, 2018 at 06:24 AM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 30 Des 2019 pada 12.02 -- Versi server: 10.4.8-MariaDB -- Versi PHP: 7.2.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
1. CREATE TABLE `countries`( `id` INT AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(45) NOT NULL ); CREATE TABLE `towns`( `id` INT AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(45) NOT NULL, `country_id` INT NOT NULL, FOREIGN KEY (`country_id`) REFERENCES `countries`(`id`) ); CREATE TABLE `stadiums`( `id` INT AUTO_INCREMEN...
-- -- Copyright (c) 2018, Michel Graciano. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- Redistributions of source code must retain the above copyright notice, this -- list of conditio...
create table users( username varchar(255) not null unique, password varchar(255) not null);