text
stringlengths
6
9.38M
---create sample schema create schema partitions_test_schema; ---create sample tables CREATE TABLE partitions_test_schema.malmrablgmst( cmpcod CHARACTER VARYING(6) NOT NULL, malseqnum NUMERIC(10,0) NOT NULL, malidr CHARACTER VARYING(29), csgdocnum CHARACTER VARYING(35), csgseqnum NUMERIC(5,0) NOT ...
-- -- Table structure for table `pokemon` -- DROP TABLE IF EXISTS `pokemon`; CREATE TABLE pokemon( id INTEGER NOT NULL PRIMARY KEY ,name VARCHAR(11) NOT NULL ,HP INTEGER ,Attack INTEGER NOT NULL ,Def INTEGER NOT NULL ,Speed INTEGER NOT NULL ,Type VARCHAR(9) NOT NULL ); INSERT INTO...
-- create a table CREATE TABLE cars ( manufacturer TEXT NOT NULL, model TEXT NOT NULL, price INTEGER NOT NULL ); -- insert data INSERT INTO cars VALUES ('Toyota', 'Camry', 16000); INSERT INTO cars VALUES ('Toyota', 'Hilander', 22000); INSERT INTO cars VALUES ('Honda', 'Pilot',24000); INSERT INTO cars VALUES ('Hon...
drop database if exists moviedb; create database moviedb; use moviedb; create table movies( id varchar(10) primary key not null, title varchar(100) not null, year int not null, director varchar(100) not null ); create table stars( id varchar(10) primary key not null, name varchar(100) not null, birt...
create table TEAM( team_id varchar(30) primary key, team_rank number(3), team_name varchar(20) not null, country_name varchar(20), no_of_wins number(3), no_of_loses number(3), no_of_draws number(3), no_of_bowlers number(2), no_of_batsmans number(2) ); insert into team values( 'I...
-- Create database/schema if not exists CREATE DATABASE IF NOT EXISTS skills_up CHARACTER SET utf8 COLLATE utf8_general_ci; -- Create table cars if not exists CREATE TABLE IF NOT EXISTS skills_up.cars ( id int(3) PRIMARY KEY, brand varchar(50), title varchar(50), price int(5), max_speed int(3), country var...
PROMPT System Privileges select privilege, admin_option from dba_sys_privs where grantee=upper('&1') order by privilege; PROMPT Role Privileges select granted_role, admin_option, default_role from dba_role_privs where grantee=upper('&1') order by granted_role; PROMPT Tab Privileges select owner, table_name, privielge...
#寄存同步明细 视图 drop view v_eywa_syn_jc_list; create view v_eywa_syn_jc_list as SELECT max(b.basket_id) AS zzzj, b.sub_id AS xsdh, b.ppriceid AS spbm, b.price1 AS lsj, max(b.price) ...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 25-Set-2021 às 20:38 -- Versão do servidor: 10.4.18-MariaDB -- versão do PHP: 8.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CL...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 25, 2016 at 02:30 PM -- Server version: 10.1.10-MariaDB -- PHP Version: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
SELECT `title` FROM `books` WHERE SUBSTRING(`title`, 1, 3) = 'The'; SELECT REPLACE(`title`, 'The', '***') AS `title` FROM `books` WHERE SUBSTRING(`title`, 1, 3) = 'The' ORDER BY `id`; -- SELECT INSERT(`title`, LOCATE('The', `title`, 1), 3, '***') AS `title` FROM `books` -- WHERE SUBSTRING(`title`, 1, 3) = 'The' ORD...
DROP TABLE IF EXISTS module_modules CASCADE; -- CASCADE will drop all references to this table CREATE TABLE module_modules ( id bigserial PRIMARY KEY, creation timestamp WITH TIME ZONE NOT NULL DEFAULT now(), member_id bigint NOT NULL DEFAULT 1 REFERENCE...
REM ------------------------------------------------------------------ REM script: REM create_users.sql REM REM description: REM Creates new users aq_admin and aq_user. The password is fixed and REM can be changed if appropriate. REM REM parameter: REM REM note: REM Have to be run as system admin us...
-- top customer by sales SELECT DISTINCT Customer_email, sum(unit_price) as total_sales FROM OrderDetail GROUP BY Customer_email ORDER BY sum(unit_price) DESC limit 10
-- I am going to adopt the protocol that tables with names ending in a digit are processed versions -- and ones without are the original raw data use janice; -- The first ones just delete bogus rows. -- Another problem is datatypes. If I compute min(mgdl) and max(mgdl) on the following two rows: -- select * fr...
CREATE TABLE accident ( id serial primary key, name varchar(2000), text varchar(2000), address varchar(2000) ); CREATE TABLE rule ( id serial primary key, name varchar(2000) ); CREATE TABLE accidenttype ( id serial primary key, name varchar(2000) ); INSERT INTO accident (id, name, tex...
create table douban_subject( id int(11) primary key, type int(11) default 0, fetch_count int(11) default 0, associated_id longtext ) alter table douban_subject add column json longtext;
INSERT INTO `tb_customer` VALUES ('1', '1', '无名', '男', '1323434', '江西省南昌市南昌航空大学', 1342220000); INSERT INTO `tb_shoppingcart` VALUES ('1', '1'); INSERT INTO `tb_merchant` VALUES ('2', '2', '管理员1', '10086'); INSERT INTO `tb_shop` VALUES ('S001', '品牌数码店', '数码', '江西省南昌市'); INSERT INTO `tb_goods` VALUES ('G001', '小米10',...
ALTER TABLE classes ADD COLUMN published_at datetime AFTER deleted_at;
SELECT player.player_name as bowler_name, bowler_id_and_run_info.total_runs as runs_scored FROM player INNER JOIN ( SELECT * FROM ( SELECT total_runs_table.*, MIN(total_runs_table.total_runs) OVER () as min_runs FROM ( SEL...
-- MySQL Script generated by MySQL Workbench -- Wed Apr 11 11:00:09 2018 -- Model: New Model Version: 1.0 -- 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='TR...
/* Name: External clicks vista Data source: 4 Created By: Admin Last Update At: 2016-03-16T14:02:42.957758+00:00 */ SELECT date(date_time) as date FROM [djomniture:devspark.External_Clicks] where date (date_time) <= date('2016-03-11') and post_page_event='0' order by date
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!50503 SET NAMES utf8mb4 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; DROP DATABASE IF EXISTS `database_...
# THIS IS FOR REFERENCE PURPOSES ONLY, SHARED BY TELADOC WITH USC # Jan 1, 2018 to Dec 31, 2018 # GenMed only # Primary member only # Includes all completed visits, but only prescriptions that are only flagged as antibiotic # There may be cases where two antibiotics were prescribed, in which case there will be two row...
 truncate table purschs; truncate table purords; truncate table purinsts; truncate table purdlvs; truncate table puracts; truncate table inamts; truncate table outamts; truncate table alloctbls cascade; truncate table lotstkhists cascade; truncate table prdschs; truncate table prdords; truncate table prdinsts; trunc...
GRANT ALL PRIVILEGES ON cyface.* TO cyface@localhost IDENTIFIED BY 'cyface';
/* 13. Crie um índice para o atributo sigla da tabela departamento e um índice para o atributo situação da tabela atividade. */ DROP INDEX IF EXISTS index_departamento_sigla; CREATE INDEX index_departamento_sigla ON departamento USING btree(sigla); DROP INDEX IF EXISTS index_atividade_situacao; CREATE INDEX index_ativ...
# Bonus : 가격이 10000원 미만인 책만 조회하기 select * from seojum.bookTable where price < 10000; # 한 줄일 경우에는 세미콜론이 없어도 되지만 # Bonus : 가격이 10000원 초과인 책만 조회하기 select * from seojum.bookTable where price > 10000; # 두 줄 이상일 경우에는 반드시 세미콜론 하셈
INSERT INTO stations ( logical_terminal, full_name ) VALUES( '0', 'NA,NA') ; INSERT INTO stations ( logical_terminal, full_name ) VALUES( '1', 'Test Terminal') ; INSERT INTO stations ( logical_terminal, full_name ) VALUES( '1000', 'Vauxhall Cross, Vauxhall') ; INSERT INTO stations ( logical_terminal, full_name ) VALUES...
SELECT * FROM ap_angajati ORDER BY CASE WHEN varsta < 30 THEN data_angajarii END ASC, CASE WHEN varsta > 30 THEN functia END ASC; CREATE VIEW view_employees AS SELECT first_name, salary FROM employees WHERE department_id = (SELECT department_id FROM departments WHERE departmen...
-- Aug 4, 2008 5:26:52 PM CDT -- DRP Functionality UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2008-08-04 17:26:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53869 ; -- Aug 4, 2008 5:27:00 PM CDT -- DRP Functionality ALTER TABLE DD_Order MODIFY C_BPartner_ID NUMBER(10) DEFAULT NULL ; ...
/* Replace with your SQL commands */ CREATE TABLE notebook( id SERIAL PRIMARY KEY, "notebookName" VARCHAR (255) NOT NULL, "userId" INTEGER NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE, "updatedAt" TIMESTAMP WITH TIME ZONE, FOREIGN KEY ("userId") REFERENCES "user" (id) ON DELETE CASCADE )
select OBJECT_NAME, SUBOBJECT_NAME, TABLESPACE_NAME, OBJECT_TYPE, STATISTIC_NAME, VALUE from v$segment_statistics where statistic_name = 'ITL waits' and value > 0 order by value desc;
CREATE Procedure sp_Insert_OrderAbstract (@OrderName nvarchar(200), @Description nvarchar(255), @CreationDate DateTime) As Insert into OrderAbstract (OrderName, [Description], CreationDate) Values(@OrderName, @Description, @CreationDate) Select @@IDENTITY
select a.*, b.product_category_name from ecommerce_db.order_items a join ecommerce_db.products b on a.product_id = b.product_id WHERE DATE_SUB("2018-09-31",INTERVAL 180 DAY) <= a.shipping_limit_date;
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: May 04, 2019 at 06:44 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
DROP TABLE #__fcblank_tbl;
SELECT e.EmployeeID, e.LastName, e.AddressID, a.AddressID, a.AddressText AS [Address] FROM Employees e, Addresses a WHERE e.AddressID = a.AddressID
------------------------------------ --Author: Jeffrey Yu --RevisedDate: 2016-5-27 ------------------------------------ select distinct f1.FilingId,f1.CIK,dim1.InvestmentId,count(distinct d1.DocumentId) as [DocCount],ss.SecurityName, case ss.Status when 0 then 'Obsolete' when 1 then 'Activ...
-- 07-mar-2008 20:37:34 ECT -- New Event Model Validator UPDATE AD_Column SET FieldLength=2000,Updated=TO_DATE('2008-03-07 20:37:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=54257 ; -- 07-mar-2008 20:37:34 ECT -- New Event Model Validator UPDATE AD_Field SET Name='Script', Description='Dynamic ...
copy pobjects (id, remark, persons_id_upd, update_ip, created_at, expiredate, updated_at, code, contents, objecttype ) FROM '/mnt/c/ubuntu/RRRP/init/bv10data/POBJECTS.csv' CSV HEADER ; copy screens(ID,STRSELECT,STRWHERE,STRGROUPORDER,YMLCODE,CDRFLAYOUT,EXPIREDATE,REMARK,PERSONS_ID_UPD,UPDATE_IP,CREATED_AT,UPDATE...
-- gv$sga_target_advice -- display if more than min_pct set linesize 200 trimspool on set pagesize 100 set verify off def min_pct_gain=5 @@legacy-exclude clear break break on inst_id skip 1 set linesize 200 trimspool on set pagesize 100 col inst_id format 9999 head 'INST|ID' col con_id format 999 head 'CON|ID' c...
SELECT DISTINCT p.id, p.nombre, p.marca, p.presentacion, p.codigobarras, p.unidadmedida, p.categoria, p.tipo FROM a_producto p, a_sucursal s, a_vende v WHERE p.id = v.idproducto AND s.ciudad = 'Bogotá';
CREATE DATABASE delivery; USE delivery; CREATE TABLE tipo_usuario ( id_tipoUsuario int NOT NULL PRIMARY KEY AUTO_INCREMENT, tipo_usuario VARCHAR(15) NOT NULL )engine = InnoDB; CREATE TABLE tipo_cuenta ( id_tipoCuenta int NOT NULL PRIMARY KEY AUTO_INCREMENT, tipo_cuenta VARCHAR(15) NOT NULL ) engine = ...
create database impression; use impression; grant all on impression.* to testuser@localhost identified by "1234"; create table posts( id int primary key auto_increment, name varchar(32), impression varchar(32), created_at datetime ); alter table posts add image blob; alter table posts add mime-type ;
CREATE OR REPLACE FUNCTION qmeduat.SP_CLM_FACILITY ( P_PRIMARY_ID IN VARCHAR2, P_PROG_CODE IN VARCHAR2, P_REG_CODE IN VARCHAR2, P_ZIP_CODE IN VARCHAR2, P_CLAIM_TYPE IN VARCHAR2, P_PROV_TYPE IN VARCHAR2, P_SPEC1 IN VARCHAR2, P_FILE_TYPE IN VARCHAR2, P_FACILITY_ST IN VARCHAR2, P_DOS IN VARCHAR2 ) RE...
select * from employee cross join department; select e.fName,e.salary,e.deptId,d.id,d.name from employee e cross join department d; select * from employee e inner join department d on e.deptId=d.id; select * from employee e left join department d on e.deptId=d.id; select * from employee e right join department d on...
-- Drops the poddler_db if it exists currently -- DROP DATABASE IF EXISTS poddler_db; -- Creates the "poddler_db" database -- CREATE DATABASE poddler_db;
/* Replace with your SQL commands */ CREATE TABLE "user" ( id SERIAL PRIMARY KEY, "firstName" VARCHAR (50) NOT NULL, "lastName" VARCHAR (50) NOT NULL, "username" VARCHAR (50) NOT NULL UNIQUE, email VARCHAR (355) NOT NULL UNIQUE, password TEXT NOT NULL, role VARCHAR (50) CHECK (role in ('use...
with `ct` as (select * from `region`) (select `n_name` from `nation` where `n_nationkey` = 0)
INSERT INTO department(name) VALUES('Production'), ('Research and Development'), ('Marketing'), ('Human Resources'), ('Accounting and Finance'); -- production roles INSERT INTO role(title, salary, department_id) VALUES('Production Manager', 130550, 1), ('Quality Control', 95000, 1), ('Planning & Scheduling', 110500, 1...
-- 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='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema practica2...
use bnb_hive_db; CREATE TABLE bnb_user_distribution( cid string COMMENT '用户的cid' , uid string COMMENT '用户的uid' , homeFlag string COMMENT '宫格首页UV' , listFlag string COMMENT '宫格列表页UV' , detailFlag string COMMENT '宫格详情页UV' , fillFlag string COMMENT '宫格填写页UV' )COMMENT '无线民宿订单表' PARTITIONED BY (`d` string COMMENT 'd...
create or replace view v_gzrytb as select CARD_NO as id, gz_type, company_num, company_name, pzdw, worker_code, worker_name, card_no, worker_name_modi, card_no_modi, worker_status, datazt_flag, zx_zjmc, 0 as gz_syq, 0 as ...
/* SQLyog Professional v12.08 (64 bit) MySQL - 5.6.13 : Database - smartwall_6.0 ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=...
SELECT timeslots.id AS [timeslot_id], roles.name AS [owner_role], weekdays.id AS [weekday_id], weekdays.name AS [day], reservations.id AS [res_id], reservations.start_date AS [start_date], reservations.end_date AS [end_date], ...
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 20, 2016 at 06:32 AM -- Server version: 5.6.12-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 ...
-- Intro to PL/SQL -- Lab Assignment 7, Practice 09 -- Wolfgang C. Strack -- Student ID#: ****7355 -- Due Date: 22 October 2015 -- Date Handed In: 22 October 2015 ----- ----- 1. Create and invoke the ADD_JOB procedure and consider the results. --- a. Create a procedure called ADD_JOB to insert a new job into the JOB...
ALTER TABLE public.degree ADD COLUMN admission_foreign_requirements character varying(255), ADD COLUMN admission_foreign_requirements_eng character varying(255), ADD COLUMN admission_shortened_requirements character varying(255), ADD COLUMN admission_shortened_requirements_eng character varying(255); ALTER TAB...
CREATE procedure sp_acc_update_Collections(@DocumentID int, @DepositDate datetime, @BankID int, @DepositID Int) as update Collections set Status = 1, DepositDate = @DepositDate, Deposit_to = @BankID,DepositID=@DepositID where DocumentID = @DocumentID
SELECT employee_id, TO_CHAR(hire_date, 'MM/YY') Month_Hired FROM employees WHERE last_name = 'Higgins'; SELECT last_name, TO_CHAR(hire_date, 'fmDD Month YYYY') AS HIREDATE FROM employees; SELECT last_name, TO_CHAR(hire_date, 'fmDdspth "of" Month YYYY fmHH:MI:SS AM') AS HIREDATE FROM employees; SELECT last_name, TO_CHAR...
/* Navicat Premium Data Transfer Source Server : root Source Server Type : MySQL Source Server Version : 50614 Source Host : localhost:3306 Source Schema : oadb Target Server Type : MySQL Target Server Version : 50614 File Encoding : 65001 Date: 26/10/2018 11:10:51 *...
USE h792dlrl7zl3m3dc; SELECT * FROM burgers;
 select WH.WHID ,WH.WHNAME from WH order by WH.WHID
-- -- Table structure for table `wallets` -- CREATE TABLE `wallets` ( `id` bigint(50) NOT NULL, `owner_id` bigint(50) NOT NULL, `owner_fname` varchar(30) NOT NULL, `owner_lname` varchar(30) NOT NULL, `wallet_id` varchar(10) NOT NULL, `wallet_type` varchar(20) NOT NULL, `balance` bigint(50) NOT NULL, `...
# patch_42_43_b # # title: Add probe2transcript to type enum in unmapped_object # # description: # Add probe2transcript to type enum in unmapped_object ALTER TABLE unmapped_object CHANGE COLUMN type type ENUM('xref','cDNA','Marker', 'probe2transcript') NOT NULL; # patch identifier INSERT INTO meta (meta_key, meta_va...
SELECT idStudentInfo, name, subname, age, sregnumber,user_name, password FROM `Database`.`StudentInfo`;
INSERT INTO meiosis_products (name, price) VALUES (${name}, ${price}); SELECT * FROM meiosis_products;
drop table def_answer; drop table def_relation; alter table def_relitem add type_target_id bigint; update def_relitem r set type_target_id = (select i.type_id from def_item i where i.id =r.item_target_id); alter table def_relitem alter column type_target_id set not null; alter table def_relitem add CONSTRAINT fk_def_r...
-- ============================================= -- Author: chrisbauer.career@gmail.com -- Create date: 2017-12-21 -- Description: Get server record -- ============================================= CREATE PROCEDURE ServerGet @ServerID int AS BEGIN SET NOCOUNT ON; select ServerID, Name, [Description] from [S...
drop table user_role; create table user_role ( id int auto_increment primary key, uid int null, rid int null, gmt_create_time datetime default CURRENT_TIMESTAMP, gmt_update_time datetime ); INSERT INTO zkr.user_role (id, uid, rid) VALUES (1, 1, 1); INSER...
//lastTouch MATCH (:contacts)-[m1:mrk_message]-(:marketing) WITH count(m1) as touches, COLLECT(m1.date_sent) AS mkColl CALL apoc.coll.sort(mkColl) YIELD value AS touchSeq MATCH (c:contacts)-[mk:mrk_message]-(m:marketing) WHERE mk.date_sent = touchSeq[touches-1] MERGE (m)-[at:ATTRIBUTED_TO {attributionModel:'lastTouch',...
-- Mar 30, 2009 1:20:12 PM MYT -- [ adempiere-Bugs-2721746 ] GW MM Vendor Return DocType Have Wrong IsSoTrx Value UPDATE C_DocType SET IsSOTrx='N',Updated=TO_DATE('2009-03-30 13:20:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_DocType_ID=151 ; COMMIT ;
-- sample SQL statements for the change_insert_link CREATE TABLE change_insert_link ( id int not null PRIMARY KEY, activityid int, typeid int, userid int, objid int, )
-- Boards Are Not Visible After the Filter is Deleted -- https://confluence.atlassian.com/jirakb/boards-are-not-visible-after-the-filter-is-deleted-779158656.html -- you can do it on instance and then clean cache SELECT * FROM "AO_60DB71_RAPIDVIEW" WHERE "SAVED_FILTER_ID" NOT IN (SELECT id FROM searchrequest); -- MyS...
/* Navicat MySQL Data Transfer Source Server : etaotest Source Server Version : 50616 Source Host : 10.125.1.58:3306 Source Database : test Target Server Type : MYSQL Target Server Version : 50616 File Encoding : 65001 Date: 2014-05-27 18:11:11 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
CREATE DATABASE M_Roman; USE M_Roman; CREATE TABLE Professores( IdProfessor INT PRIMARY KEY IDENTITY, Nome VARCHAR(255) NOT NULL, Email VARCHAR(255) UNIQUE NOT NULL, Senha VARCHAR(255) NOT NULL, ); CREATE TABLE Temas( IdTema INT PRIMARY KEY IDENTITY, Nome VARCHAR(255) NOT NULL UNIQUE, ); CREATE TABLE Projeto...
DROP TABLE IF EXISTS event_store; CREATE TABLE event_store ( id int PRIMARY KEY AUTO_INCREMENT, stream_id varchar(255) NOT NULL, stream_version int NOT NULL, event_name varchar(255) NOT NULL, event_data text, meta_data text, raised_at datetime );
-- phpMyAdmin SQL Dump -- version 4.1.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 2014-03-07 21:21:31 -- 服务器版本: 5.5.20 -- PHP Version: 5.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @O...
-- MySQL Script generated by MySQL Workbench -- Wed Nov 25 21:18:29 2020 -- Model: New Model Version: 1.0 -- 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='ON...
create database blog; use blog; create table users( id int unsigned not null auto_increment, userType enum('public','author','admin'), username varchar(30) not null, email varchar(40) not null, pass char(40) not null, dateAdded timestamp default current_timestamp, primary key (id), unique (username), unique (...
create table if not exists mytable1 (id uuid primary key, column1 text);
insert into `{prefix}ix_files_types` (extension) values ('dvi');
ALTER TABLE `app_polyglot_course` ADD COLUMN `course_path` VARCHAR(200) NULL AFTER `attr_placement_assistance`, ADD COLUMN `video_path` VARCHAR(200) NULL AFTER `course_path`; ALTER TABLE `app_users` ADD COLUMN `wall_message` VARCHAR(512) NULL AFTER `about_us`;
-- CREATE DATABASE distributionnetworkdb WITH OWNER postgres; -- USE distributionnetworkdb; \c distributionnetworkdb; DROP TABLE IF EXISTS users CASCADE; DROP TABLE IF EXISTS companies CASCADE; DROP TABLE IF EXISTS systems CASCADE; DROP TABLE IF EXISTS is_admin_of_com CASCADE; DROP TABLE IF EXISTS is_admin_of_sys CAS...
#set autocommit=off; #set sql_safe_updates=off; #show session variables; /*insertion of roles data into roles table start transaction; insert into roles(roleID,rolename,description) values(1,"line worker","maintain operation of the productionlines."); insert into roles(roleID,rolename,description) values(2,"inspector",...
DROP VIEW EAADMIN.v_schedule_f; create view EAADMIN.v_schedule_f(installed_software_id,schedule_f_id ) as select isw.id , COALESCE ( ( select ssf.id from eaadmin.schedule_f ssf where sl.customer_id = ssf.customer_id and ((sw.software_name = ssf.software_name and ssf.level='HOSTNAME' and ssf.hostname = sl.name ) ...
DROP DATABASE IF EXISTS carrent; CREATE DATABASE carrent CHARACTER SET utf8; USE carrent; CREATE TABLE Customer ( customer_id INT AUTO_INCREMENT ,firstname VARCHAR(42) NOT NULL ,surname VARCHAR(42) NOT NULL ,street VARCHAR(255) NOT NULL ,zip VARCHAR(10) NOT NULL ,town VARCHAR(42) NOT NULL ...
DROP TABLE IF EXISTS `backup_subscription`; CREATE TABLE `backup_subscription` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `open_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `inviter_id` bigint(20) unsigned NOT NULL default 0 COMMENT '0: unknown', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMEN...
-- reverse_role_lookup.sql -- lookup who is granted role(s) -- wildcards accepted -- linked to rrl.sql @clears set pagesize 60 col crole noprint new_value urole prompt prompt Reverse Role Lookups prompt prompt Find Grantees for which Role(s): prompt ( wildcards OK ) set term off feed off select upper('&1') crole ...
# patch_59_60_f.sql # # title: bm.frequencies_pf_index_mods # # description: # Make some minor modifications to the binding_matric frequences column # and probe_feature indexes to increase performance alter table binding_matrix modify `frequencies` varchar(1000) NOT NULL; alter table probe_feature add index `seq_regi...
# All products that almost out of stock from a specific country. select product.barcode, product.name, M.name as manufaurer_name, M.country_name, product_in_branch.amount_in_stock from product join product_in_branch on product.barcode = product_in_branch.product_barcode join (se...
DROP DATABASE IF EXISTS CardData; CREATE DATABASE CardData; DROP DATABASE IF EXISTS testdb; CREATE DATABASE testdb; SELECT * FROM carddata;
select count(id) as kolvo from titles WHERE auth NOT IN (SELECT ignor FROM ignor WHERE user = ? AND end > now()) AND id NOT IN (select title from fdtranzit where folder NOT IN (SELECT folder FROM fdvtranzit WHERE (user = ? OR user = 0) AND view = ?) and user = ?)
CREATE TABLE user ( id BIGINT NOT NULL, # unique id, primary key name VARCHAR(31), # max length is 31 password VARCHAR(31), email VARCHAR(31), gender BOOL, # male true, female false is_business BOOL, # if manage a loc phone ...
/* Name: Top 10 most clicked articles Data source: 4 Created By: Admin Last Update At: 2015-10-16T14:29:35.221278+00:00 */ SELECT NVL(TOP(replace(post_prop65,'MG_article_',''), 10),'empty') as Article , count(*) AS Amount FROM (TABLE_QUERY(djomniture:cipomniture_djmansionglobal, " month(TIMESTAMP(CONCAT(REPLACE(...
-- -------------------------------------------------------- -- Host: 103.1.210.201 -- Server version: 5.6.38-log - MySQL Community Server (GPL), wsrep_25.21 -- Server OS: Linux -- HeidiSQL Version: 11.2.0.6250 -- --------------------------------------...
drop database if exists guestbook; create database guestbook; use guestbook; create table message ( id int primary key auto_increment, content text not null, saved timestamp default current_timestamp ); insert into message (content) values ('This is a test message.'); insert into message (content) valu...
-- Nov 17, 2010 10:04:25 PM CST -- BF3110938-Mandatory Incorrectly Spelled UPDATE AD_Ref_List SET Name='Not Mandatory',Updated=TO_DATE('2010-11-17 22:04:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=681 ;
if OBJECT_ID('complementos') is not null drop table complementos; create table complementos( id_complemento int, descripcion varchar(30), id_producto int, numero_personas int, primary key(id_complemento)); --HOTDOG COMBO INDIVIDUAL insert into complementos(id_complemento, descripcion, id_producto, numero_pe...