text
stringlengths
6
9.38M
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: Feb 05, 2020 at 03:23 PM -- Server version: 5.7.26 -- PHP Version: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
/* Formatted on 15/02/2013 08:54:07 a.m. (QP5 v5.163.1008.3004) */ SELECT TABLAORIGEN, COUNT (*) FROM terceros_migracion GROUP BY TABLAORIGEN; SELECT TABLAORIGEN, COUNT (*) FROM terceros_migracion_existente GROUP BY TABLAORIGEN;
-- AlterTable ALTER TABLE "User" ALTER COLUMN "birthdate" SET DATA TYPE TEXT;
------------------CREATE SCHEMA ------------------------------ CREATE SCHEMA sis_demo; CREATE SCHEMA sis_other; -- ------------ Write CREATE-SEQUENCE-stage scripts ----------- CREATE SEQUENCE sis_demo.student_seq INCREMENT BY 1 MAXVALUE 9223372036854775807 MINVALUE 1000 NO CYCLE; CREATE SEQUENCE sis_demo.semester_...
-- Fill with data -- TRUNCATE tas; LOAD DATA LOCAL INFILE 'data/tas.csv' INTO TABLE tas ( netid, name, email, class_year, credentials ); -- LOAD DATA LOCAL INFILE 'data/courses.csv' INTO TABLE courses (crn,year,semester,department,course_number,name,description,parent_crn,position_count); -- LOAD DATA LOCAL INFILE 'd...
SELECT * FROM SYSTEM_CONFIGS WHERE SYSTEM_NAME = ? AND DELETE_FLAG = 0;
--Checklist 2 selecionar o cpf do gestor que fez vistoria entre essas datas Select cpf_gestor From esp_vistoria_ges where data_vistoria between to_date( '26/06/2019', 'dd/mm/yyyy') and to_date( '26/07/2019', 'dd/mm/yyyy');
-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64) -- -- Host: 192.168.56.101 Database: covid_db -- ------------------------------------------------------ -- Server version 8.0.17-8 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS...
/* Write a query with FULL OUTER JOIN to see: - each account who has a sales rep and each sales rep that has an account (all of the columns in these returned rows will be full) - but also each account that does not have a sales rep and each sales rep that does not have an account (some of the columns in these retur...
use master use Company_SD select * from Employee select * from Departments select * from Project select * from Dependent select * from Works_for -- 1. Display (Using Union Function) -- a. The name and the gender of the dependence that's gender is Female and depending -- on Female Employee. -- b. And th...
-- CREATE DATABASE tor_DB; CREATE TABLE tor_DB.Users ( UserID int, FirstName varchar(255) NOT NULL, LastName varchar(255) NOT NULL, UserName varchar(255) NOT NULL, Password varchar(255) NOT NULL, IsAdmin boolean DEFAULT 0 ); /* CREATE TABLE AdminUsers ( UserID int, FirstName varchar(25...
DROP PROCEDURE IF EXISTS get_user_post_count; DELIMITER ;; CREATE DEFINER=web@localhost PROCEDURE get_user_post_count(IN $uid INT) COMMENT 'get recent post count for a given user' BEGIN SELECT (SELECT count(*) FROM nodes WHERE uid = $uid) + (SELECT count(*) FROM comments WHERE uid = $uid) + ...
use fifa; select count(personal_details.player_id) as jugadores from personal_details inner join other_details on personal_details.player_id=other_details.player_id where personal_details.age>25 && other_details.club='FC Bayern Munich';
1. perintah dasar update 2. update multiple 3. update low_priority 4. update ignore create table token ( id int auto_increment primary key not null, serial varchar(5) ); alter table token add column note varchar(50); insert into token (serial) values ('12345'); -- update multip;e update token set serial='123',n...
# SQL 명령어를 실행할 대상인 기본 데이터베이스를 univDB로 지정 use univDB; # safe mode 해제 SET SQL_SAFE_UPDATES =0; /* 트랜잭션 - 관련 SQL 문장들을 묶어서 하나의 처리 단위로 다룸 - 한 묶음으로 처리되어야 하는 SQL 명령문들의 집합 - 전체 SQL 완료시 처리, 하나라도 실패시 전체 실패 커밋 commit 트랜잭션의 실행 결과를 데이터베이스에 최종적으로 반영하는 것 임시로 시행 처리한 트랜잭션의 실행 결과를 실제 데이터베이스에 반영한 명령 롤백 rollback 실행 결과를 반영하지 않고 취소해 원래 ...
DROP SCHEMA IF EXISTS BOOK_STORE; CREATE SCHEMA BOOK_STORE; USE BOOK_STORE; CREATE TABLE PUBLISHER ( PUBLISHER_NAME VARCHAR (30) PRIMARY KEY NOT NULL UNIQUE, ADDRESS VARCHAR(30), PHONE VARCHAR(30) );
set client_min_messages to warning; drop view if exists perfilamientov ; create or replace view perfilamientov as select null id_holding ,'--' holding ,null id_empresa ,'--' empresa ,perf.id id_perfil ,perf.des...
INSERT INTO folders(ID,name,parentID,favorited,static) VALUES (0,'root',0,NULL,1), (1,'downloads',0,NULL,1), (2,'favorites',0,NULL,1);
/***********************************I-DAT-GSS-CONTA-48-20/02/2013*****************************************/ /* * Author: Gonzalo Sarmiento Sejas GSS * Date: 20/02/2013 * Description: Build the menu definition and the composition */ /* Para definir la la metadata, menus, roles, etc 1) sincronize ls funcio...
SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'WIN1252'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; SET ...
SELECT * FROM Movie WHERE categoryID = 2
use mpis; DROP TABLE users IF EXISTS; CREATE TABLE `users` ( `id` INTEGER(5) NOT NULL AUTO_INCREMENT, `name` VARCHAR(30) NOT NULL, `surname` VARCHAR(30) NOT NULL, `address` VARCHAR(100) NOT NULL, `psc` INTEGER(5) NOT NULL, `city` VARCHAR(30) NOT NULL, `phone` INTEGER(10) NOT NULL, `email` VARCHAR(40) ...
alter table financeoption drop foreign key FK3E460CCFDAF8BC25; alter table financeoption drop foreign key FK3E460CCF6834D8DE; drop table if exists financeoption; drop table if exists institution; drop table if exists interestrate; create table financeoption (id integer not null auto_increment, name varchar(255), instit...
-- Request to put hold on a boook by a user -- procedure definition delimiter // create procedure requestHold( in userID int, in ISBN varchar(15), out status int ) begin -- Declare Variables declare cid int; declare size1 int; declare size2 int; declare holdLimit1 int; declare holdLimit2 int; declare unpaid...
-- Table definitions for the tournament project. -- -- Put your SQL 'create table' statements in this file; also 'create view' -- statements if you choose to use it. -- -- You can write comments in this file by starting them with two dashes, like -- these lines here. CREATE SCHEMA swiss_tournament; CREATE TABLE swiss...
DROP PROCEDURE CPI.PROCESS_ENDT_CANCELLATION; CREATE OR REPLACE PROCEDURE CPI.Process_Endt_Cancellation ( p_par_id IN GIPI_WPOLBAS.par_id%TYPE, p_policy_id IN GIPI_POLBASIC.policy_id%TYPE, p_line_cd IN GIPI_WPOLBAS.line_cd%TYPE, p_subline_cd IN GIPI_WPOLBAS.subline_cd%TYPE, p_iss_cd IN GIPI_WPOLBAS.iss_c...
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Mar 01, 2019 at 01:21 PM -- Server version: 5.7.25-0ubuntu0.18.04.2 -- PHP Version: 7.2.15-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
Use IFoodBanco insert into Usuarios(email, senha, datacriacao) values('administrador@administrador.com.br', '123456', GETDATE()), ('restaurante@restaurante.com.br', '123456', GETDATE()), ('cliente@liente.com.br'...
-- Converts hbtn_0c_0 database to UTF8 --ALTER DATABASE hbtn_0c_0 -- CHARACTER SET utf8mb4 -- COLLATE utf8mb4_unicode_ci; --ALTER TABLE hbtn_0c_0.first_table -- CONVERT TO CHARACTER SET utf8mb4 -- COLLATE ut8mb4_unicode_ci; --ALTER TABLE hbtn_0c_0.first_table -- CHANGE name name -- VARCHAR(256) -- CHARACTER SET utf8mb4...
CREATE DATABASE ONLINESHOP; CREATE TABLE ORDERS(orderid int not null auto_increment PRIMARY KEY,itemid int(10),expected_date date, foreign key(itemid) references product(itemid) On DELETE CASCADE); CREATE TABLE PRODUCT (itemid int(10) not null primary key,category varchar(20) not null,Brand varchar(20),price int(10),si...
drop table manager_1 insert into program(pro_id,cost,duration,mem_id) values(next value for program_sq,8000,'1H 30M',200) insert into program(pro_id,cost,duration,mem_id) values(next value for program_sq,9000,'2H',201) insert into program(pro_id,cost,duration,mem_id) values(next value for program_sq,9500,'2H 30M',20...
CREATE DATABASE dungeoncrawler WITH ENCODING = 'UTF8'; CREATE TABLE game ( game_id bigint NOT NULL, created_at datetime NOT NULL, updated_at datetime NOT NULL, PRIMARY KEY (game_id) ); CREATE TABLE `attribute` ( `attribute_id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(64) NOT NULL...
SELECT DISTINCT A.Login FROM Involved A CROSS JOIN Involved B WHERE (A.Login = B.Login) AND (A.ProjectId != B.ProjectId);
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: Dec 06, 2019 at 04:21 AM -- Server version: 5.7.26 -- PHP Version: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
drop table holidays; create table holidays ( holiday_date date primary key, holiday_name varchar(50), holiday_dow varchar(10) ); insert into holidays(holiday_date, holiday_name) values ('2014-01-01', 'Año Nuevo'); insert into holidays(holiday_date, holiday_name) values ('2014-01-06', 'Día de los Reyes Magos'); in...
/**/ CREATE TABLE IF NOT EXISTS Tb1_AppOpWI ( id int(2) NOT NULL AUTO_INCREMENT PRIMARY KEY, Name VARCHAR(16) NOT NULL, Dscp VARCHAR(16) NOT NULL, Vale VARCHAR(8) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*Row 01*/ INSERT INTO Tb1_AppOpWI VALUES (NULL,'Tb1_ClRwA1','Description','11'); IN...
CREATE DATABASE IF NOT EXISTS `newdataservicelayer_db` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `newdataservicelayer_db`; -- MySQL dump 10.13 Distrib 5.6.23, for Win64 (x86_64) -- -- Host: localhost Database: newdataservicelayer_db -- ------------------------------------------------------ -- Server version 5....
SELECT BillingCountry, COUNT(*) FROM Invoice GROUP BY BillingCountry
-- Script that creates the table unique_id on your MySQL server. -- id = INT with default value of 1 and must be unique. -- name = VARCHAR of length: 256. CREATE TABLE IF NOT EXISTS unique_id (id INT DEFAULT '1' UNIQUE, name VARCHAR(256));
drop table if exists RslHourly; create table RslHourly (ls_id TEXT, hour TEXT, event_date TEXT, cnt INTEGER); insert into RslHourly select ls_id ,strftime('%d.%m.%Y', datetime(event_time_stamp/1000, 'unixepoch', 'localtime')) || ' ' || strftime('%H', datetime(event_time_stamp/1000, 'unixepoch', 'localtime')) a...
--ABUBAKAR PASSUM ABDUL GAFFAR --DATABASE ASSIGNMENT --QUESTION 1 --How Many User does wave have? SELECT COUNT(u_id) FROM users --QUESTION 2 --How many transfers have been sent in the currency CFA? SELECT COUNT(transfer_id) FROM transfers WHERE send_amount_currency = 'CFA' --QUESTION 3 --How many different users h...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Servidor: mariadb -- Tiempo de generación: 21-01-2021 a las 11:39:50 -- Versión del servidor: 10.4.17-MariaDB-1:10.4.17+maria~focal -- Versión de PHP: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00";...
/*******************************************PUNTO 1*****************************************************/ /* 1) Generar las estructuras necesarias para dar soporte a 4 sistemas diferentes : a) BACKOFFICE, que permitirá el manejo de clientes, medidores y tarifas. b) CLIENTES, que permitirá consultas de mediciones y fact...
DECLARE v_Id Number; v_ErrorCode NUMBER; v_ErrorMessage NVARCHAR2(255); v_caseExist Number; BEGIN v_ErrorCode := 0; v_ErrorMessage := ''; :affectedRows := 0; v_Id := :Id; ---Input params check IF v_Id IS NULL THEN v_ErrorMessage := 'Id can not be empty'; v_ErrorCode := 101; GOTO clea...
CREATE SCHEMA IF NOT EXISTS pe_2021; USE pe_2021; DROP TABLE IF EXISTS `ORDERS`; CREATE TABLE `ORDERS` ( `Order_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `Product_ID` int(10) unsigned NOT NULL, `Quantity` int(10) unsigned NOT NULL, `Price` int(10) unsigned NOT NULL, `Order_date` date NOT NULL, `User_I...
USE zillow; #Count how many transactions in 2017 SELECT COUNT(*) FROM predictions_2017; #77,614 #Count the number of unique properties sold in 2017 SELECT count(DISTINCT parcelid) FROM predictions_2017; #77,414 #Join all tables, count is 77,614 - 200 hundred dups will need to be removed in Python SELECT * FROM predi...
-- Create the Reference Habitat Type Publication table create table FIA.REF_HABTYP_PUBLICATION( CN varchar(34), PUB_CD varchar(10), TITLE varchar(200), AUTHOR varchar(200), TYPE varchar(10), VALID varchar(1), CREATED_BY varchar(30), CREATED_DATE date, CREATED_IN_INSTANCE varchar(6), MODIFIED_BY varchar(30), ...
############## # TASK 3 # ############## # Imagine that you have a database table, defined as follows: # TABLE geo_point # COLUMN id SERIAL (primary_key) # COLUMN location_city TEXT # COLUMN location_country TEXT # COLUMN latitude NUMERIC # COLUMN longitude NUMERIC # Write an SQL query which returns the...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 04, 2017 at 05:31 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.5.37 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
Select MONTHNAME(orderDate) Month, Extract(YEAR FROM orderDate) Year, format(ord2.priceEach*ord2.quantityOrdered, 2) Payment_Received from classicmodels.orders ord1 join classicmodels.orderdetails ord2 on ord1.orderNumber=ord2.orderNumber
INSERT INTO Exercise_Type (name) VALUES ('bodyWeight'), ('compound'), ('isolation');
-- phpMyAdmin SQL Dump -- version 4.0.8 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generato il: Nov 07, 2013 alle 08:21 -- Versione del server: 5.5.34-0ubuntu0.13.04.1 -- Versione PHP: 5.4.9-4ubuntu2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
--USE amazon ; -- User Schema Drop TABLE User1; Drop TABLE Buyer; Drop TABLE Seller; Drop TABLE Address; Drop TABLE Product; Drop TABLE Shopping_Cart; Drop TABLE Wishlist; Drop TABLE Reviews; Drop TABLE Discount; Drop TABLE Offer; Drop TABLE Wishlist_Product; Drop TABLE Order_Product; DROP TABLE Cart_Product; Dro...
update codedetail set showtype=3 where showname=18807 and codemainid!=1 /
CREATE TABLE public.t_chamado ( codigo serial NOT NULL, data date, codigo_funcionario integer, status integer, titulo_problema character varying(100), descricao_problema text, codigo_chave integer, exclusao integer, CONSTRAINT t_chamado_pkey PRIMARY KEY (codigo) ) WITH ( OIDS=FALSE );...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : ven. 01 mai 2020 à 11:15 -- Version du serveur : 5.7.26 -- Version de PHP : 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
USE SpotifyClone; DELIMITER $$ CREATE PROCEDURE albuns_do_artista(IN nome_param VARCHAR(50)) BEGIN SELECT CONCAT(a.nome_artista, ' ', a.sobrenome_artista) AS `artista`, b.nome_album AS `album` FROM artista AS `a` INNER JOIN album AS `b` ON a.artista_id = b.artista_id WHERE CONCAT(a.nome_artista, ' ', a.sobrenome_artis...
create table breed_dogs(dog_no serial primary key , dog_age int not null , dog_name varchar(25) not null , dog_gender varchar(25) not null , dog_place varchar(25) not null , dog_price int not null , dog_insurance varchar(25) not null , sold_status boolean default false , dog_image bytea) ...
-- AlterTable ALTER TABLE `EmailSubscription` ADD PRIMARY KEY (`email`);
----------------------------------------------------- -- Export file for user SETTLEMENT -- -- Created by Administrator on 2017/9/25, 17:34:31 -- ----------------------------------------------------- spool VIEW.log CREATE OR REPLACE VIEW CHARGE_ALLOT_REPORT AS SELECT "SETT_DATE","TRANS_DATE","TRAN...
-- point 2 -- create database user only select privilege CREATE DATABASE IF NOT EXISTS hbtn_0d_2; CREATE USER IF NOT EXISTS user_0d_2@localhost; GRANT USAGE ON *.* TO user_0d_2@localhost; GRANT SELECT ON hbtn_0d_2.* TO user_0d_2@localhost; SET PASSWORD FOR user_0d_2@localhost = 'user_0d_2_pwd';
# 已更新到企业正式 CREATE TABLE `ims_superdesk_shop_goods_similar` ( `id` int(11) NOT NULL COMMENT '对应商品表的id', `uniacid` int(11) DEFAULT '0', `similar_id` varchar(255) DEFAULT NULL, `createtime` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE TNDS_T_RCP_DPC_CO ( SEQ1_NO VARCHAR2 (10) NOT NULL ENABLE, SEQ2_NO VARCHAR2 (51) NOT NULL ENABLE, VLD_FLG NUMBER (1,0), KO_FLG NUMBER (1,0), REC_IDENT_INFO VARCHAR2 (2), PRAC_IDENT ...
-- Create table create table APP_WORKFLOW_DICTIONARY ( id number generated by default on null as identity, dictionary_name varchar2(100) not null, entry_text varchar2(100) not null, create_user varchar2(100) not null, create_date date default SYSDATE not null, update_user varch...
CREATE TABLE CMS_DESC_LONG_DX ( code VARCHAR2 (8) NOT NULL, name VARCHAR2 (256) NOT NULL, PRIMARY KEY (code) ); CREATE TABLE CMS_DESC_SHORT_DX ( code VARCHAR2 (8) NOT NULL, name VARCHAR2 (256) NOT NULL, PRIMARY KEY (code) );
/*!40101 SET NAMES utf8 */; # 模块列表 CREATE TABLE IF NOT EXISTS `module_list` ( `m_id` int(11) DEFAULT NULL comment '模块id', `m_name` varchar(255) DEFAULT NULL comment '模块名称', `git_address` varchar(255) DEFAULT NULL comment 'git仓库地址', `server_address` varchar(255) DEFAULT NULL comment '服务器地址', `server_...
INSERT INTO HtmlLabelIndex values(18866,'请选中你要添加子任务的位置!') / INSERT INTO HtmlLabelIndex values(18865,'其子任务也将被删除,是否继续?') / INSERT INTO HtmlLabelInfo VALUES(18865,'其子任务也将被删除,是否继续?',7) / INSERT INTO HtmlLabelInfo VALUES(18865,'Its children task will be deleted yet,are you sure?',8) / INSERT INTO HtmlLabelInfo VALUES(18...
-------------------------------------------------------- -- DDL for Procedure GETNEWREP -------------------------------------------------------- set define off; CREATE OR REPLACE PROCEDURE "GETNEWREP" ( P_QUEUEID IN QUEUE_DETAILS.QUEUEID%TYPE, P_REPNAME IN QUEUE_DETAILS.SALES_REP_ASSIGNED%TYPE ) IS V_REP...
DECLARE v_fromid NUMBER; v_toid NUMBER; v_position NVARCHAR2(255); v_order NUMBER; v_toorder NUMBER; v_categoryId NUMBER; v_count INTEGER; v_result NUMBER; v_errorcode INTEGER; v_errormessage NVARCHAR2(255); BEGIN v_fromid := :FromID; ...
ALTER TABLE `banner` DROP `description` , DROP `link` ; ALTER TABLE `work` ADD `gravity` INT( 11 ) NOT NULL AFTER `list` ;
DROP TABLE `mc_t_rs_instance_monitor_log`; CREATE TABLE `mc_t_rs_instance_monitor_log` ( `ID` bigint(11) NOT NULL AUTO_INCREMENT, `OWNER_ID` varchar(128) NOT NULL DEFAULT '', `INSTANCE_ID` varchar(36) NOT NULL, `MONITOR_ID` bigint(20) NOT NULL, `MONITOR_NM` varchar(128) NOT NULL, `NOTIFY_ID` varchar(36) NO...
-- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you ma...
declare v_procedureid Integer; begin v_procedureid := :ProcedureId; delete from tbl_taskeventtmpl where col_taskeventtptaskstinittp in (select col_id from tbl_map_taskstateinittmpl where col_map_taskstinittpltasktpl in (select col_id from tbl_tasktemplate where col_proceduretasktemplate = v_procedure...
INSERT INTO user (username, email, created) VALUES ('Jan Kowalski', 'email@onet.pl', current_timestamp); INSERT INTO user (username, email, created) VALUES ('Adam Nowak', 'email@gazeta.pl', current_timestamp); INSERT INTO user (username, email, created) VALUES ('Adam Kowalski', 'email@gmail.com', current_timestamp);
DROP TABLE IF EXISTS apartment_location_deltas; CREATE TABLE apartment_location_deltas ( id BIGINT, location geometry (POINT, 4326), created_dt TIMESTAMP WITH TIME ZONE, updated_dt TIMESTAMP WITH TIME ZONE, apartment_id BIGINT NOT NULL, formatted_address TEX...
-- 16 SELECT ARTNR, COUNT(*) FROM TEILESTRUKTUR GROUP BY ARTNR HAVING COUNT(*) > 3
COL username FOR A25 COL account_status FOR A16 HEAD 'ACCOUNT|STATUS' COL lock_date HEAD 'LOCK|DATE' COL expiry_date HEAD 'EXPIRY|DATE' COL default_tablespace FOR A21 HEAD 'DEFAULT|TABLESPACE' COL temporary_tablespace FOR A16 HEAD 'TEMPORARY|TABLESPACE' COL profile ...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost -- Généré le : jeu. 19 déc. 2019 à 13:06 -- Version du serveur : 10.2.6-MariaDB -- Version de PHP : 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 13, 2017 at 01:09 PM -- Server version: 5.7.14 -- PHP Version: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
-- UC1: creare a AddressBook database create database AdressBookDB; -- UC2: creare a AddressBook Table create table AddressBook ( firstName varchar(25) not null, lastName varChar(25) not null, address varchar(100) not null, city varchar(25) not null, state varchar(25) not null, zip int not null, phoneNumber varch...
-- phpMyAdmin SQL Dump -- version 2.7.0-pl2 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generaci�n: 20-05-2008 a las 05:30:59 -- Versi�n del servidor: 5.0.18 -- Versi�n de PHP: 5.1.2 -- -- Base de datos: `dblibreria` -- -- -------------------------------------------------------- -- -- Estruc...
-- Connexion a la BDD -- mysql -u root -p -- afficher les BDD -- SHOW DATABASES; --créer une BDD -- CREATE DATABASE nom_de_BDD; -- sléctionner une BDD -- USE nom-de_BDD; -- créer d'une TABLE dans la BDD -- -- Type de données(INT, VARCHAR, TEXT, FLOAT, ..) -- fruit INT(3), nom VARCHAR(60), origine VARCHAR(60), calib...
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 28, 2018 at 07:53 AM -- Server version: 10.1.26-MariaDB -- PHP Version: 7.1.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
-- phpMyAdmin SQL Dump -- version 4.1.4 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Mer 17 Octobre 2018 à 08:09 -- 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=@@CHARACT...
insert into product(product_id,media,price,product_title,number_of_products)values(1,"cd",50.56,"deluxe",5); insert into product(product_id,media,price,product_title,number_of_products)values(2,"dvd",35.5,"so good",10); insert into product(product_id,media,price,product_title,number_of_products)values(3,"record",20,"...
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Dec 07, 2018 at 05:21 PM -- Server version: 5.7.21 -- PHP Version: 5.6.35 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
INSERT INTO people VALUES('21329522646', 'Atakan', 'Kaya', '1991-05-03', 'ODTÜ 9. Yurt Oda:205 Ankara', '05057143895', 'akaya@outlook.com', '100200300'); INSERT INTO employees VALUES ('21329522646', 'Branch Manager', 'Full-Time', '4000', '2014-05-10'); INSERT INTO managers VALUES ('21329522646'); INSERT INTO Rates Val...
/* - Dan Coleman - - Clears and re-initializes system database tables. */ use dac3251; drop table courses; drop table tutors; drop table course_for_tutor; drop table available; create table courses( title varchar(255) not null, sun varchar(255), mon varchar(255), tue varchar(255), wed varchar(255), thu ...
CREATE TABLE topic_word ( topic_id integer REFERENCES topic, word_id integer REFERENCES word, phi stan_parameter_simplex_constrained, beta stan_data_real, PRIMARY KEY (topic_id, word_id), CONSTRAINT stan_SimplexConstraint__data_sums_to_one_in_col CHECK (argument_column('phi')), CONSTRAINT stan_SimplexConstr...
delete from ns_load_vendor_bills; delete from ns_load_vendor_bill_expenses; insert into ns_load_vendor_bills("externalId", "currencyInternalId", "memo", "classInternalId", "locationInternalId", "entityInternalId") values ('1237', '1', 'Courtesy db connector', '1', '1', '46'); insert into ns_load_vendor_bill_expenses(...
create table Visite_Medicale( ID_Visite_Med varchar(10) primary key (ID_Visite_Med), Date_Visite_Med date, Code_type_Visite varchar(06) foreign key references Type_Visite_Medicale(Code_type_Visite), Mat_emp varchar(05) foreign key references Employé(Mat_emp), Code_congé varchar(10)foreign key references Con...
select * from authors select * from titleauthor select * from titles select * from publishers select title,au_lname,pub_name from authors inner join titleauthor on authors.au_id=titleauthor.au_id inner join titles on titleauthor.title_id=titles.title_id inner join publishers on titles.pub_id=publishers.pub_id
DROP TABLE STG_FACEBOOK_AD_STATS; CREATE TABLE STG_FACEBOOK_AD_STATS( TRACKING_DATE date DISTKEY NOT NULL, SOURCE varchar(255) NOT NULL, CLICKS int DEFAULT 0 NOT NULL, IMPRESSIONS int DEFAULT 0 NOT NULL, SPENT bigint DEFAULT 0 NOT NULL, PRIMARY KEY (TRACKING_DATE,SOURCE) )SORTKEY(TRACKING_DATE,SOURC...
drop trigger if exists halfenroll; drop table if exists flag; create table flag(signal0 int); delimiter \\ create trigger halfenroll before update on uosoffering for each row begin if new.enrollment<old.MaxEnrollment*0.5 then insert into flag values(1); else delete from flag where signal0=1...
use keenanknights; LOCK TABLES `dorms` WRITE; INSERT INTO `dorms` VALUES (1,'alumni'),(2,'badin'),(3,'breen-phillips'),(4,'carroll'),(5,'cavanaugh'),(6,'dillon'),(7,'duncan'),(8,'dunne'),(9,'farley'),(10,'fisher'),(11,'flaherty'),(12,'howard'),(13,'keenan'),(14,'keough'),(15,'knott'),(16,'lewis'),(17,'lyons'),(18,'mcg...
CREATE TABLE [Transform].[DimPromotionChanges] ( [PromotionKey] INT NOT NULL, [ExecutionID] BIGINT NOT NULL, [SCDBitmap] INT NOT NULL, [StartDate] DATETIME NOT NULL, [EndDate] ...
CREATE DEFINER=`ut00kmma`@`%` PROCEDURE `update_ffl_table_dates`() BEGIN UPDATE ffl SET issued_date = (select from_unixtime(unix_timestamp('2005-1-1') + floor(rand() * (unix_timestamp('2015-12-31') - unix_timestamp('2000-1-1') + 1)))); UPDATE ffl SET expires_date = date_add(issued_date, interval 10 ye...
CREATE DATABASE IF NOT EXISTS `reserva_db` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `reserva_db`; -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: reserva_db -- ------------------------------------------------------ -- Server version 8.0.15 /*!40101 SET @OLD_CHARACTER_SET_...
INSERT INTO bank VALUES(1, 'SBI bank'); INSERT INTO bank VALUES(2, 'PNB bank'); INSERT INTO bankinfo VALUES(1, 'Government', 1, 10000); INSERT INTO bankproduct VALUES(1, 'Home loan', 1); INSERT INTO bankproduct VALUES(2, 'Eduction loan', 1);
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,ALLOW_INVALID_DATES'; CREATE TABLE IF NOT EXISTS `testgenerator`.`Disciplina` ( `ID` INT(11) NOT NULL AUTO_INCREMENT, `DisciplinaNome`...