text
stringlengths
6
9.38M
-- Bill of Material Item Comment SELECT dropIfExists('VIEW', 'bomitemcomment', 'api'); CREATE VIEW api.bomitemcomment AS SELECT bomitem_id AS bomitem_id, cmnttype_name AS type, comment_date AS date, comment_user AS username, comment_text AS text FROM bomitem LEFT OUTER...
# --- !Ups ALTER TABLE product_detail ADD COLUMN feature TEXT; ALTER TABLE product_detail ADD COLUMN specifications TEXT; ALTER TABLE product_detail ADD COLUMN recomended_care TEXT; ALTER TABLE product_detail ADD COLUMN waranty TEXT; # --- !Downs ALTER TABLE product_detail DROP COLUMN feature; ALTER TABLE product_de...
-- Before I start solving the questions, I must clean up the tables -- First: Cleaning runners table .. to be consistent with the information on other tables UPDATE runners SET registration_date = date_sub(registration_date, INTERVAL 1 YEAR); ------------------------------------------------------------ -- Second: C...
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 01-09-2014 a las 04:18:43 -- Versión del servidor: 5.6.20 -- Versión de PHP: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for t_sys_menu -- ---------------------------- DROP TABLE IF EXISTS `t_sys_menu`; CREATE TABLE `t_sys_menu` ( `id` varchar(50) NOT NULL, `createTime` bigint(20) DEFAULT NULL, `cretatePerson` varchar(50) DEFAULT NULL, `isLeaf...
--create the tweets_raw table containing the records as received from Twitter ADD JAR /usr/lib/hive-hcatalog/share/hcatalog/hive-hcatalog-core.jar; CREATE EXTERNAL TABLE IF NOT EXISTS Mytweets_raw ( id BIGINT, created_at STRING, source STRING, favorited BOOLEAN, retweet_count INT, retweeted_...
'/////////////////////////////////////////////////////////////////////////////// '// '// Plik naglowkowy biblioteki generatora kluczy licencyjnych '// '// Wersja : PELock v2.0 '// Jezyk : C/C++ '// Autor : Bartosz Wójcik (support@pelock.com) '// Strona domowa : https://www.pelock.com '// '///...
alter table "public"."permissions" rename column "permissionset_id" to "permissionsetId";
create table ${TABLENAME} (code varchar(20),organ_code INT,value FLOAT,datatype varchar(10), updatetime timestamp,statistime timestamp,dimname varchar(10),dimvalue varchar(50),pos INT IDENTITY(1, 1),FLAG INT DEFAULT 0, PRIMARY KEY(POS))
----总数 (averall.code_type=1) ----地区=本部加县公司和(averall.flag=0) insert into ${TABLENAME}(code,organ_code,value,datatype,updatetime,statistime,dimname,dimvalue) select a.code+'All',substr(a.organ_code,0,5),sum(a.value),a.datatype,sysdate,'${dateStr}','无','无' from (select * from ${TABLENAME} where datatype in('个数...
ALTER TABLE grape.setting ADD COLUMN hidden BOOLEAN DEFAULT FALSE; ALTER TABLE grape.data_import ADD COLUMN result_table TEXT; ALTER TABLE grape.data_import ADD COLUMN result_schema TEXT; ALTER TABLE grape.report ADD COLUMN report_type TEXT; ALTER TABLE grape.report ADD COLUMN active BOOLEAN DEFAULT TRUE; ALTER TABL...
-- ****************** SqlDBM: MySQL ******************; -- ***************************************************; DROP TABLE `OrderItem`; DROP TABLE `Product`; DROP TABLE `Order`; DROP TABLE `Supplier`; DROP TABLE `Customer`; -- ************************************** `Supplier` CREATE TABLE `Supplier` ( `Su...
drop database if exists `chatDB`; create database `chatDB`; use `chatDB`; drop table if exists `users`; create table `users` ( `userID` int(11) primary key not null auto_increment comment "用户ID", `userName` varchar(20) not null comment "用户名", `passWord` varchar(20) not null comment "密码", `sex` varchar(10) not null comm...
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50720 Source Host : localhost:3306 Source Database : djmall Target Server Type : MYSQL Target Server Version : 50720 File Encoding : 65001 Date: 2020-08-30 17:00:44 */ SET FOREIGN_KEY_CHECKS=0; -- --...
-- List the number of records with the same score in the table second_table of the database hbtn_0c_0 in your MySQL server -- The database name will be passed as an argument to the mysql command SELECT score AS 'score', COUNT(score) AS 'number' FROM second_table GROUP by score ORDER by score DESC;
DROP TABLE IF EXISTS `retengcms_space`; CREATE TABLE `retengcms_space` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `userid` mediumint(8) unsigned NOT NULL, `logo` varchar(100) NOT NULL, `banner` varchar(100) NOT NULL, `name` varchar(80) NOT NULL, `meta_keywords` varchar(100) NOT NULL, `meta_desc...
------------------------------------------------------------------- -- 日付部分「20xx/xx/xx」のみを、指定日付に更新して上書き保存する。 ------------------------------------------------------------------- update MASTER_INFO set MASTER_DATE = to_date('2007/05/15', 'YYYY/MM/DD') where MASTER_SHUBETU = '7' ; commit; quit;
DECLARE v_countDeletedRecords INTEGER; v_listNotAllowDelete NVARCHAR2(32767); v_sql VARCHAR2(32767); v_template_delete VARCHAR2(255); v_Id INTEGER; v_Ids NVARCHAR2(4000); v_isDetailedInfo BOOLEAN; v_countCases ...
DROP TABLE IF EXISTS PRODUCT; CREATE TABLE PRODUCT( PRODUCT_ID INT AUTO_INCREMENT PRIMARY KEY, ); DROP TABLE IF EXISTS ANSWER; CREATE TABLE ANSWER( ANSWER_ID INT AUTO_INCREMENT PRIMARY KEY, OFFERED_ANSWER VARCHAR(10) ); DROP TABLE IF EXISTS QUESTION; CREATE TABLE QUESTION( QUESTION_ID INT AUTO_INCREMENT...
-- template data insert into price_list (item_name, item_price) values ('Application-Server',1999), ('Application-DesktopClient',299), ('Application-WebClient',299), ('Application-Import',1299), ('Application-Export',1299) ; -- template localisation data insert into price_list_description (item_description,item...
CREATE TABLE smartycache ( id CHAVE NOT NULL, name CHARACTER VARYING(40) NOT NULL, cache_id CHARACTER VARYING(254), modified TIMESTAMP WITH TIME ZONE NOT NULL, content TEXT NOT NULL, CONSTRAINT pk_smartycache PRIMARY KEY (id) );
USE MYSQL_TRAINING; DROP TABLE SUBJECT; DROP TABLE BOOK; CREATE TABLE SUBJECT ( SUBJECTID int8 NOT NULL AUTO_INCREMENT, SUBTITLE VARCHAR(50) NOT NULL, DURATIONINHOURS INT(100) NOT NULL, BOOKID int8 NOT NULL, PRIMARY KEY (SUBJECTID) ); CREATE TABLE BOOK ( BOOKID int8 NOT NULL AUTO_INCREMENT, TIT...
select count(distinct immigration_id), i94mon from fact_immigration group by i94mon order by i94mon; ##did the data check and it passed select count(1) from fact_immigration where i94yr is null or i94yr != 2016; select cicid, count(cicid) from fact_immigration group by cicid order by count desc; #over 500 cicid...
REM AUDIT TRAIL: 8.5.1 REM 1. Horizon REM AUDIT TRAIL END insert into GURAOBJ (GURAOBJ_OBJECT, GURAOBJ_DEFAULT_ROLE, GURAOBJ_CURRENT_VERSION, GURAOBJ_SYSI_CODE, GURAOBJ_ACTIVITY_DATE) select upper('SELFSERVICE'), upper('BAN_DEFAULT_M'), upper('8.4.0.1'), ...
-- Displays the number of records with id = 89 in the table first_table -- first_table of the database hbtn_0c_0 -- cat 8-count_89.sql | mysql -hlocalhost -uroot -p hbtn_0c_0 | tail -1 SELECT COUNT(*) FROM first_table WHERE id = 89;
SELECT qtdCommitContributions, qtdIssueContributions, qtdPullRequestContributions, qtdPullRequestReviewContributions, qtdRepositoriesWithContributedCommits, qtdRepositoriesWithContributedIssues, qtdRepositoriesWithContributedPullRequestReviews, qtdRepositoryContributions, qtdRepositoriesWithContributedPullRequests FROM...
--select * from Item create table Item2 ( item_id char(6) primary key check(item_id like '[P][0-9][0-9][0-9][0-9][0-9]'), item_name char(12), item_category char(10), item_price float check(item_price>=0), item_qoh int check(item_qoh>=0), item_last_sold date default getdate(), ) insert Item2 (item_id...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 05, 2021 at 12:07 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
use parcial1; insert into Escenario values (1, "miel de oveja"); insert into Escenario values (2, "aceite de ballena"); insert into Escenario values (3, "pisicina"); -- /persona/ insert into Persona values (3,"Sebastian Romero","M", "1994/12/31", null, null, "preso"); insert into Persona values (4,"Maria Mata","F", ...
SELECT * FROM STOCKS WHERE DELETE_FLAG = 0 ORDER BY INSERT_DATETIME %s;
# Write your MySQL query statement below SELECT class FROM (SELECT class, COUNT(DISTINCT student) AS num FROM courses GROUP BY class) AS subquery WHERE num >=5;
create table worker ( w_id int not null primary key, name varchar(6) not null, sex varchar(2) not null, age int not null, worker_degree varchar(6) not null ); create table work_note ( id int not null, w_id int not null ...
DROP DATABASE IF EXISTS accountDB; CREATE DATABASE accountDB; use accountDB; create table account (User_ID int not null primary key AUTO_INCREMENT, Username varchar(255) not null, telehandle varchar(255) not null, telechat_ID varchar(255) not null default "961849285", Paypal_Email varchar(255) not null, password varch...
drop database Customers; -- only run this if you're starting over create database Customers; -- switch to the customers database (It's case sensitive) use Customers; -- Download the customer.csvPreview the document file -- Import the customers file into Workbench.Hint: Right-click on the database name and select tabl...
INSERT INTO MAIL_HOOK_ADD_KNOWLEDGE_TARGETS ( CONDITION_NO , HOOK_ID , TARGET_NO , TARGET_CLASS , TARGET_KIND , TARGET_ID , INSERT_USER , INSERT_DATETIME , UPDATE_USER , UPDATE_DATETIME , DELETE_FLAG ) VALUES ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? );
insert or ignore into `users` values (null, 'admin', 'test', 'Admin Adminowski', 'admin@test.com', 1);
drop index ACT_IDX_ENT_LNK_SCOPE on ACT_RU_ENTITYLINK; drop index ACT_IDX_ENT_LNK_SCOPE_DEF on ACT_RU_ENTITYLINK; drop table if exists ACT_RU_ENTITYLINK;
DROP DATABASE IF EXISTS login_system; CREATE DATABASE login_system;
##KS select la.state,la.lms_customer_id, la.lms_application_id, la.original_lead_id, la.loan_status, bsp.DaysDelinquent, la.emailaddress, concat(ucase(substring(la.customer_firstname,1,1)), lower(substring(la.customer_firstname,2)), ' ', ucase(substring(la.customer_lastname,1,1)), lowe...
-- Buildings ------------------------------ INSERT INTO Buildings (Type, BuildingClass, Happiness, Defense, ExtraCityHitPoints, CityWall, Cost, GoldMaintenance, PrereqTech, ArtDefineTag, XBuiltTriggersIdeologyChoice, SpecialistType, SpecialistCount, MinAreaSize, ConquestProb, HurryCostModifier, Help, Description...
-- Sequence: seq_brand_id -- DROP SEQUENCE seq_brand_id; CREATE SEQUENCE seq_brand_id INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1; ALTER TABLE seq_brand_id OWNER TO af; -- Sequence: seq_category_id -- DROP SEQUENCE seq_category_id; CREATE SEQUENCE seq_category_id INCREMENT ...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Время создания: Авг 20 2020 г., 23:20 -- Версия сервера: 10.4.11-MariaDB -- Версия PHP: 7.3.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@...
use wang_j2; SELECT s.State as State, sum(cp.Population) as StatePopulation2016 from CountyPopulations as cp inner join States as s on s.StateID = cp.StateID Group by s.StateID; SELECT s.State, count(u.MemberID) as UserPop FROM Users as u INNER JOIN States as s on u.stateID= s.stateID WHERE s.State in ('DC','MD','VA...
ALTER TABLE SEGMENT_SELECTION ADD PROGRESSIVE_BONUS INT(11)#
CREATE DATABASE utnphones; SHOW ENGINE INNODB STATUS; use utnphones; SET GLOBAL time_zone = '-3:00'; create table provinces( id int auto_increment not null, province_name varchar (50) not null, active boolean default 1, constraint pk_id_province primary key (id) )ENGINE=InnoDB; create table cities( id int aut...
USE RE7 Select ADDED_BY, AUTO_REMIND, RECORDS_ID, CONTACT_ID, DateAdded, DateChanged, DTE, ID, IMPORT_ID, LAST_CHANGED_BY, LETTER_CODE, NOTES, PRIORITY, PROPOSAL_ID, REMIND_VALUE, SEQUENCE, STATUS, START_TIME, TYPE, CATEGORY, END_TIME, Completed, COMPLETED_DATE, CAMPAIGN_ID, FUND_ID, FOLLOWUPT...
/*use [exam-licenta] insert into firma (id, nume, pagina_web) values (111, 'Pitech+Plus', 'www.pitech+plus.com'), (222, 'Endava', 'www.endava.com'), (333, 'Rodeapps', 'www.rodeapps.com'), (444, 'Softvision', 'www.softvision.com') insert into bursa (id,denumire, firma, locuri, luni, valoare) values ('BM', ...
delete from HtmlLabelIndex where id=24863 / delete from HtmlLabelInfo where indexid=24863 / INSERT INTO HtmlLabelIndex values(24863,'导入类型') / INSERT INTO HtmlLabelInfo VALUES(24863,'导入类型',7) / INSERT INTO HtmlLabelInfo VALUES(24863,'Import Type',8) / INSERT INTO HtmlLabelInfo VALUES(24863,'導入類型',9) /
/* Create Table Comments, Sequences for Autonumber Columns */ COMMENT ON TABLE ADM_TPROC2 IS 'TABLA DE LOS PROCESOS DEL SISTEMA' ; COMMENT ON COLUMN ADM_TPROC2.PROC_PROC IS 'ID DE LA TABLA DE PROCESOS' ; COMMENT ON COLUMN ADM_TPROC2.PROC_NOMB IS 'NOMBRE DEL PROCESO' ; COMMENT ON COLUMN ADM_TPROC2.PROC_NIVE IS...
DROP DATABASE IF EXISTS MovieDB; CREATE DATABASE MovieDB; USE MovieDB; CREATE TABLE Genres( Id BINARY(16) PRIMARY KEY, `Name` VARCHAR(50) UNIQUE NOT NULL ); CREATE TABLE Movies( Id BINARY(16) PRIMARY KEY, Title VARCHAR(255) NOT NULL, Genre_Id BINARY(16) NOT NULL, Quantity INT NOT NULL, Daily_Rate D...
select status, count(1) from common.subscription_d group by status; select status, count(1) from common.daily_status_snapshot where day_timestamp::date = current_date::date group by status; SELECT * FROM common.daily_status_snapshot dss WHERE dss.gcsi_user_id= 14432797 ORDER BY dss.day_timestamp DESC LIMIT 20; ...
/* benjo brito 01.10.2017 SR-5749 */ SET SERVEROUTPUT ON DECLARE v_exists NUMBER := 0; BEGIN SELECT 1 INTO v_exists FROM cpi.giis_parameters WHERE param_type = 'V' AND param_name = 'REQUIRE_LAT_LONG'; IF v_exists = 1 THEN DBMS_OUTPUT.put_line('REQUIRE_LAT_LONG already exists in under...
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tempo de Geração: 30/05/2017 às 01:59:17 -- Versão do Servidor: 10.0.28-MariaDB -- Versão do PHP: 5.2.17 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
/* SELECT cohorts.name AS name, AVG(assistance_requests.completed_at - assistance_requests.started_at) AS average_assistance_time FROM cohorts JOIN students ON students.cohort_id = cohorts.id JOIN assistance_requests ON assistance_requests.student_id = students.id WHERE cohorts.name IN ( SELECT ...
# generated via Exemples/minimal.xml; DROP TABLE IF EXISTS minimal_imc; CREATE TABLE minimal_imc ( id VARCHAR(255) , age VARCHAR(255) , poids VARCHAR(255) , taille VARCHAR(255) , imc VARCHAR(255) , PRIMARY KEY (`id`) ) ; INSERT INTO minimal_imc (id,age,poids,taille,imc) VALUES (1,36,94...
/*alter table base_role_module drop constraint FK_BASE_ROL_REFERENCE_BASE_ROL; alter table base_role_module drop constraint FK_BASE_ROL_REFERENCE_BASE_MOD; alter table base_user_role drop constraint FK_BASE_USE_REFERENCE_BASE_USE; alter table base_user_role drop constraint FK_BASE_USE_REFERENCE...
{% set states_mapping = {'AZ': 'Arizona', 'IN': 'Indiana', 'WV': 'West Virginia', 'MN': 'Minnesota', 'NY': 'New York'}%} with deduplicated as ( select * from {{ re_data.filter_remove_duplicates(ref('user_data'), ['email'], ['created_at DESC']) }} as dedup ), cleaned as ( select *, {{ re_data.c...
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'; CREATE SCHEMA IF NOT EXISTS `beauty_parlour` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ; USE `beauty_parlour` ; -- -----------...
CREATE TABLE books ( title varchar(25), isbn varchar(25) PRIMARY KEY, seller varchar(15), price int, addr varchar(220), contact varchar(40), img longblob );
create database PromocaoQuartosHotel; use PromocaoQuartosHotel; CREATE TABLE Estado ( id BIGINT NOT NULL AUTO_INCREMENT, nome VARCHAR(100) NOT NULL, sigla VARCHAR(3) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE Cidade ( id BIGINT NOT NULL AUTO_INCREMENT, nome VARCHAR(100) NOT NULL, estado_id...
create table sys_auth ( id bigint auto_increment comment '编号' primary key, auth_name varchar(64) null comment '权限名称', perms varchar(100) null comment '权限标识', create_by varchar(64) default '' null comment '创建者', create_time datetime nu...
SELECT p6."ProductId", p6."Price", p7."ProductName", p7."Weight", p7."Depth", p7."Height", p7."UniversalProductCode", p8."ImageHeightThumb", p8."ImageOrigin", p8."ImageThumb", p8."ImageWidthThumb", p8."LongDescription", p7."NetWeight", p6."Sku", p6."SkuId", p8."ShortDescription", ( SELECT p."OptionId" ...
-- INSERT INTO Users (username, is_customer, is_artist, bio) -- VALUES -- ('henri', false, true, 'A French Cubist.'), -- ('trbenn', true, true, 'A strange alien.'), -- ('aluko', true, false, 'A hep ideator.'), -- ('leidich', true, false, 'A young adventuror.'), -- ('schex', true, false, 'A professional genius.'), ...
create table orders ( id int NOT NULL identity , name varchar(255) NULL ); insert into orders (id, name) values (1, '1. Auftrag'); insert into orders (id, name) values (2, '2. Auftrag'); insert into orders (id, name) values (3, '3. Auftrag'); insert into orders (id, name) values (4, '4. Auftrag'); insert i...
# --- !Ups drop table sessions; create table sessions ( session_key binary(16) not null primary key, user_id int null, created_at timestamp default current_timestamp() null, ...
# --- !Ups create table sales_order_address ( id bigint not null, is_deleted boolean, sales_order_id bigint, full_name varchar(255), email varchar(255), phone varchar(255), address TE...
-- create database nemoc_I4C default char set utf8 collate utf8_czech_ci; use nemoc_I4C; CREATE table lekar ( id_l int primary key auto_increment, jmeno varchar(50) NOT NULL, prijmeni varchar(50) NOT NULL, mesto varchar(50) NOT NULL, ulice varchar(50) NOT NULL, rod_c varchar(13) NOT NULL, tele...
-- CreateTable CREATE TABLE "User" ( "id" SERIAL NOT NULL, "userName" TEXT NOT NULL DEFAULT E'null', "email" TEXT NOT NULL, "grade" TEXT NOT NULL DEFAULT E'user', "password" TEXT NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, PR...
USE SpaceReservation; delimiter // create trigger no_overlap before insert on AllReservations for each row begin if exists (select * from AllReservations where start_time <= new.end_time and end_time >= new.start_time) then signal sqlstate '45000' SET MESSAGE_TEXT = 'Overlaps with exist...
SET @CHANCE := 0.5; SET @SUN := 20874; SET @NIGHT := 20875; SET @DEATH := 20876; SET @SAGE := 20877; SET @REBIRTH := 20878; SET @LIFE := 20879; SET @STRIFE := 20881; SET @WAR := 20882; -- --------------------------------- DELETE FROM `creature_loot_template` WHERE `item` I...
CREATE TABLE TNDS_T_RCP_MED_TR ( 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), RCP_NO ...
DROP PROCEDURE IF EXISTS reporting.SP_campaign_list_gen_RTC; CREATE PROCEDURE reporting.`SP_campaign_list_gen_RTC`() BEGIN /********************************************************************************************************************************* --- NAME : SP_RTC_info_daily --- DESCRIPTION: script for gen...
set names utf8; set foreign_key_checks=0; drop database if exists solare; create database solare; use solare; create table customerid_info( customerid_number int(10) primary key auto_increment, customer_id varchar(30), user_uuid varchar(100), insert_date timestamp, delete_date timestamp ); create table reservation_in...
-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Máy chủ: localhost -- Thời gian đã tạo: Th4 13, 2017 lúc 05:36 SA -- Phiên bản máy phục vụ: 5.7.17-log -- Phiên bản PHP: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
CREATE USER user_read IDENTIFIED WITH Sha256_password BY 'Pass_9_10'; GRANT USAGE ON accounts TO user_read; GRANT SELECT ON username TO user_read; select user() user_read;
create database veiculos; use veiculos; drop table if exists opcional; drop table if exists marca; drop table if exists veiculo; drop table if exists veiculo_opcional; CREATE TABLE `opcional` ( `id` int not null auto_increment PRIMARY KEY, `descricao` varchar(100) NOT NULL, INDEX `pk_opcional` (`id`) ) ; ...
SELECT * FROM dbo.Spolecnost SELECT * FROM dbo.Letadlo SELECT * FROM dbo.Trasa SELECT * from dbo.PILOT -- 2 INSERT INTO dbo.Spolecnost VALUES ('Czech airlines', 'Praha', 'Prazska 2', '12000', 'CR', '+420 234 789 111'), ('Delta', 'Detroit', 'Elm street 55', '15122', 'USA', '+100 900 987 000'), ('Emirates',...
CREATE OR REPLACE PROCEDURE sprawdz_czy_wycieczka_jeszcze_sie_nie_odbyla( arg_id_wycieczki wycieczki.id_wycieczki%TYPE ) AS wycieczki_count INTEGER; BEGIN SELECT COUNT(*) INTO wycieczki_count FROM wycieczki WHERE id_wycieczki = arg_id_wycieczki AND data > SYSDATE; IF wycieczki_count = 0 THEN RAISE_APPLICAT...
insert into tbl_events (record_id, originator_id, event_type, event_time, event_param) values (%1, %2, %3, %4, %5)
SET TERM ^ ; CREATE OR ALTER PROCEDURE SP_MODIFICACION_ANIMAL( ID_AUX INTEGER, ID_ANIMAL INTEGER, ID_RP VARCHAR(10) CHARACTER SET NONE, ID_SENASA VARCHAR(9) CHARACTER SET NONE, FECHA_NACIMIENTO DATE, PESO DOUBLE PRECISION, MADRE_BIOLOGICA_EXTERNA INTEGER, ESTADO_LACTACION INTEGER, RODEO IN...
\c playlist INSERT INTO songs( name, artist, album, time, is_favorite) VALUES ('Purple Rain','Prince','Pruple Rain','4:07',true), ('In the End','Linkin Park','Hybrid Theory','3:36',true), ('Chop Suey','System of a Down','Toxicity','3:30',false);
CREATE TRIGGER TR_DeleteVote ON Votes AFTER DELETE AS UPDATE Strategies SET Note -= (SELECT Note FROM deleted) WHERE Id = (SELECT StrategyId FROM deleted)
SELECT * FROM book; SELECT * FROM reader; SELECT * FROM borrow; SELECT * FROM penalty; SELECT * FROM borrow WHERE returndate IS NULL; SELECT * FROM reader WHERE raddress IS NULL; SELECT * FROM reader WHERE rid IN( SELECT reader FROM borrow WHERE raddress IS NULL ) #先查当前没有被借阅的图书 SELECT bname, bid...
CREATE SCHEMA IF NOT EXISTS HIPPO;
INSERT INTO burgers (name) VALUES ('Burger 1'); INSERT INTO burgers (name, devoured) VALUES ('Burger 2', false); INSERT INTO burgers (name, devoured) VALUES ('Spicy Jalapeno Indigestion Overkill Burger', true);
/* modeloLogicoTCC: */ CREATE TABLE Evento ( id INTEGER PRIMARY KEY, nome VARCHAR(200), data DATE, etapa INTEGER, id_coordenador INTEGER ); CREATE TABLE Chamada ( turno VARCHAR(50), local VARCHAR(100), data DATE, id INTEGER PRIMARY KEY, id_evento INTEGER ); CREATE TABLE Usuari...
CREATE USER [akxuDgLjMULogin_CatholicDataFeedUser] FOR LOGIN [akxuDgLjMULogin_CatholicDataFeed] WITH DEFAULT_SCHEMA = [CatholicDataFeed];
create or replace view users_cd_tmp as SELECT ud.drupal_user_id, ud.gcsi_user_id, ud.user_start_date AS date, ud.user_end_date, ud.subscription_id, ud.subscription_start_date AS start_date, ud.paid_through_date, ud.next_review_date, ud.cancel_date, ud.subscription_end_date AS end_d...
select * from account_UserExtend
DROP PROCEDURE IF EXISTS extractAccountActivity# CREATE PROCEDURE extractAccountActivity() begin declare lastAuditCommandAutoId int; declare maxAuditCommandAutoId int; -- update player activity select val into @lastAuditCommandAutoId from rpt_report_status where report_action = 'distinctPlayers'; IF @las...
-- NB! JOINs faster than subqueries SELECT TOP 5 c.CountryName, MAX(p.Elevation) AS HighestPeakElevation, MAX(r.Length) AS LongestRiverLength FROM Countries AS c LEFT JOIN MountainsCountries AS mc ON c.CountryCode = mc.CountryCode LEFT JOIN Peaks AS p ON p.MountainId = mc.MountainId LEFT JOIN CountriesRivers ...
-- Task 3 -- Create table in DB CREATE TABLE IF NOT EXISTS force_name (id INT, name VARCHAR(256) NOT NULL);
SELECT * FROM USER_GROUPS WHERE GROUP_ID = ? ;
INSERT INTO COMPANY VALUES('c1', 'c_add', 'cname', 'cfile', NULL, NULL, NULL); INSERT INTO SKILLS VALUES('skill1', 'type1'); INSERT INTO ADVERTISEMENT VALUES('c1', 'add1', '.com', 1400, FALSE, 8, NULL, NULL); INSERT INTO CV_WORK_INFO_INTRESTS ...
alter table workflow_createdoc add newTextNodes varchar(10) /
SELECT * FROM NOTIFICATION_STATUS ORDER BY INSERT_DATETIME %s;
-- -- Table structure for table `company_integration` -- DROP TABLE IF EXISTS `company_integration`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `company_integration` ( `id` int NOT NULL AUTO_INCREMENT, `company_id` int NOT NULL, `na...
ALTER TABLE Rav RENAME COLUMN name TO ravName
/* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.1 */ /* Created On : 03-feb.-2018 18:36:02 */ /* DBMS : PostgreSQL */ /* ---------------------------------------------------- */ /* Drop Tables */ DROP TABLE IF EXISTS usuario CASCADE ; /...
create table students( stdu_id bigint auto_increment primary key, name varchar(255), email varchar(255), phone varchar(255), dob timestamp ); insert into students (name, email, phone, dob) values ('jerry.hu1', 'jerry.hu1@t.com', '0746-5466-23', now()); insert into students (name, email, phone, dob) values ('jerry...