text
stringlengths
6
9.38M
CREATE VIEW top_3_artistas AS ( SELECT CONCAT(a.nome_artista,' ', a.sobrenome_artista) AS `artista`, COUNT(u.usuario_id) AS `seguidores` FROM artista AS `a` INNER JOIN usuario_artista AS `u` ON a.artista_id = u.artista_id GROUP BY u.artista_id ORDER BY `seguidores` DESC, `artista` LIMIT 3 );
SELECT reservations.*, properties.*, avg(property_reviews.rating) as average_rating FROM reservations JOIN properties ON reservations.property_id = properties.id JOIN property_reviews ON properties.id = property_reviews.property_id WHERE reservations.guest_id = 1 GROUP BY properties.id, reservations.id HAVING end_date...
-- Select rows from columns first_name and last_name in table employees, who were born in 1952 SELECT first_name, last_name FROM employees WHERE (birth_date BETWEEN '1952-01-01' AND '1955-12-31' -- Select those that are eligible for retirement by combining two conditional statements SELECT first_name, last_name FR...
CREATE SEQUENCE seq_vouchers INCREMENT BY 1 MINVALUE 1 NO CYCLE; CREATE TABLE vouchers ( id BIGINT DEFAULT nextval('seq_vouchers') PRIMARY KEY, title VARCHAR UNIQUE, start_date TIMESTAMP, end_date TIMESTAMP, price DOUBLE PRECISION );
SELECT * FROM users; -- INSERT INTO users (full_name, created_at, updated_at) -- VALUES ("Nick", NOW(), NOW())
INSERT INTO HtmlLabelIndex values(18030,'我的收藏') / INSERT INTO HtmlLabelIndex values(18031,'外部情报') / INSERT INTO HtmlLabelIndex values(18027,'目标绩效') / INSERT INTO HtmlLabelIndex values(18029,'我的考核') / INSERT INTO HtmlLabelIndex values(18033,'我的通信') / INSERT INTO HtmlLabelIndex values(18028,'我的目标') / INSERT INTO Ht...
create schema calculator; CREATE TABLE calculator.calculatons ( id serial primary key, num1 varchar(256), num2 varchar(256), operation varchar(256), ...
create table Camera ( Manufacturer varchar(30) not null, ModelNumber integer not null, ReleaseDate date not null, SensorSize integer not null, PixelNumber integer not null, RetailPrice float not null NumberStock integer not null, primary key ( Manufact...
-- Calculate the average total duration of assistance requests for each cohort. -- Use the previous query as a sub query to determine the duration per cohort. -- Return a single row average_total_duration -- SELECT cohorts.name, SUM(completed_at - started_at) as total_duration -- FROM assistance_requests -- JOIN stud...
-- depends: 01.users /* This file is a cheat-code for signing up. There's probably a better way to do this re-using the users table, but I like to think of users as having two-steps (registered and un-registered) */ CREATE TABLE unregistered_users ( username VARCHAR(64) NOT NULL, full_name VARCHAR(64) NOT NUL...
Use mansoureh Select Emp_no,lname,fname,birthdate,marry from spec Where birthdate<='1990.04.01' or marry='true'
DELETE FROM Query2; INSERT INTO Query2 SELECT cid, cname FROM country WHERE cid NOT IN( SELECT cid FROM oceanAccess) ORDER BY cname ASC;
CREATE SEQUENCE HELPME_REPLY_SEQ INCREMENT BY 1 START WITH 1 MINVALUE 1 MAXVALUE 10000; DROP SEQUENCE HELPME_REPLY_SEQ; CREATE TABLE HELPME_BOARD_REPLY( REPLY_NUM NUMBER(8), BOARD_NUM NUMBER(5), CLIENT_NO NUMBER(10), REPLY_CONTENTS VARCHAR2(4000), CONSTRAINT HELPME_REPLY_PK PRIMARY KEY(REPLY_NUM), CONSTRAINT HE...
ALTER TABLE cashrcpt ADD COLUMN cashrcpt_curr_rate NUMERIC; UPDATE cashrcpt SET cashrcpt_curr_rate = curr_rate FROM curr_rate WHERE ( (cashrcpt_curr_id = curr_rate.curr_id) AND (cashrcpt_distdate BETWEEN curr_effective AND curr_expires) ); ALTER TABLE cashrcpt ALTER COLUMN cashrcpt_curr_rate SET NOT NULL;
-- +migrate Up -- SQL in section 'Up' is executed when this migration is applied CREATE TABLE public.users ( id BIGSERIAL NOT NULL PRIMARY KEY, user_name TEXT NOT NULL UNIQUE, password_hash TEXT NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT 'now()', updated_at TIMES...
-- MySQL dump 10.13 Distrib 5.6.23, for osx10.9 (x86_64) -- -- Host: 10.0.0.78 Database: boxzs -- ------------------------------------------------------ -- Server version 5.5.25-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
Rem Copyright (c) 1991 by Oracle Corporation Rem NAME Rem ulcase3.sql - <one-line expansion of the name> Rem DESCRIPTION Rem <short description of component this file declares/defines> Rem RETURNS Rem Rem NOTES Rem <other useful comments, qualifications, etc.> Rem MODIFIED (M...
/* * Napoleon-Christos Oikonomou AEM:7952 * Aggelos Vasileiadis AEM:8010 * Alexandros-Charalampos Kyprianidis AEM:8012 */ GRANT ALL ON TABLE public."Advertisement" TO "Administrator"; GRANT SELECT ON TABLE public."Advertisement" TO "Radio_Producer"; GRANT ALL ON TABLE public."Advertisement-RadioShow" TO "Admin...
/* Copyright 2021 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software ...
delete from HtmlLabelIndex where id=27910 / delete from HtmlLabelInfo where indexid=27910 / INSERT INTO HtmlLabelIndex values(27910,'所有日程') / INSERT INTO HtmlLabelInfo VALUES(27910,'所有日程',7) / INSERT INTO HtmlLabelInfo VALUES(27910,'All Calendar',8) / INSERT INTO HtmlLabelInfo VALUES(27910,'所有日程',9) / delete fro...
DELETE FROM HtmlLabelIndex WHERE id = 20248 / DELETE FROM HtmlLabelInfo WHERE indexId = 20248 / INSERT INTO HtmlLabelIndex values(20248,'区域设置') / INSERT INTO HtmlLabelInfo VALUES(20248,'区域设置',7) / INSERT INTO HtmlLabelInfo VALUES(20248,'Region Setting',8) / DELETE FROM HtmlLabelIndex WHERE id = 20268 / DELETE FROM ...
CREATE PROCEDURE InsertTrJualHead @idTransaksi int, @Tgl date, @idCustomer int, @idUser int, @Keterangan varchar(50) AS BEGIN INSERT INTO TrJualHead(idTransaksi, Tgl, idCustomer, idUser, Keterangan) VALUES ( @idTransaksi, @Tgl, @idCustomer, @idUser, @Keterangan) END
with NoEmployeeContracts as--有合同没雇员 ( select EmployeeId,personalid,AgreementId from employee_Contract as a where not exists( select 1 from employee_Employee as b where (a.EmployeeId = b.EmployeeId) ) ), NContractEmpolyees as --有雇员没合同 ( select * from employee_employee a where not exists(select 1 from employee_...
CREATE TABLE `multimenu_counter` ( `conf_key` varchar(255) NOT NULL default '', `conf_value` varchar(255) NOT NULL default '' ) TYPE=MyISAM; # # Dumping data for table `multimenu_counter` # INSERT INTO `multimenu_counter` VALUES ('multimenu_index', '0'); INSERT INTO `multimenu_counter` VALUES ('multimenu_01', '0'...
Select resortName from Resort where starRating between 4 and 5 order by starRating;
WITH TableInfo AS ( SELECT s.Name AS SchemaName, t.Name AS TableName, p.rows AS RowCounts, CAST(ROUND((SUM(a.used_pages) / 128.00), 2) AS NUMERIC(36, 2)) AS Used_MB, CAST(ROUND((SUM(a.total_pages) - SUM(a.used_pages)) / 128.00, 2) AS NUMERIC(36, 2)) AS Unused_MB, CAST(ROUND((SUM(a.total_page...
ALTER TABLE training_sessions ADD COLUMN user_id INTEGER; UPDATE training_sessions SET user_id = 1; ALTER TABLE training_sessions ALTER COLUMN user_id SET NOT NULL; ALTER TABLE training_sessions ADD CONSTRAINT training_sessions_users_fkey FOREIGN KEY (user_id) REFERENCES users (id) MATCH SIMPLE ON UPDAT...
SELECT * FROM flight_2way NATURAL JOIN flight where source = 'California' and destination = 'Texas' and departureDateTime > '2018-01-09 00:00:00' and departureDateTime < '2018-01-15 00:00:00' and ID = flightID;
CREATE TABLE CARDS ( CARD_ID int auto_increment PRIMARY KEY NOT NULL, PAN TINYTEXT NOT NULL, AMOUNT VARCHAR(10) NOT NULL, HOLDER_ID int NOT NULL, CREATION_DATE VARCHAR(10) NOT NULL, CVC int NOT NULL, EXPIRY VARCHAR(4) NOT NULL, CURRENCY int NOT NULL, CARD_STATUS varchar(20) NOT NULL ); CREATE UNIQUE I...
-- +migrate Up CREATE TABLE recurring_groups ( id VARCHAR NOT NULL DEFAULT '', name VARCHAR NOT NULL DEFAULT '', account_ids VARCHAR[] NOT NULL DEFAULT '{}', PRIMARY KEY(id) ); -- +migrate Down DROP TABLE recurring_groups;
CREATE OR REPLACE FUNCTION FUNC_FULLCHARTNOTES(f_petid IN ANIMAL_FACTS.PETID%TYPE) RETURN clob AS --begin the notes builders lv_clob_builder clob:= NULL; --lv_encounter_notes clob:= NULL; --lv_radiol_notes clob:= NULL; --v_rxhist_notes clob:= NULL; --lv_prochist_notes clob:= NULL; --lv_path_notes clob := NULL; ...
DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_servicio_DELETE`(p_idServicio Varchar(10)) BEGIN DELETE FROM servicio WHERE idServicio =p_idServicio; END $$ DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_servicio_INSERT`( p_idServicio varchar(10), p_nombre varchar(100), p_grado varchar(2...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 08 أغسطس 2021 الساعة 02:52 -- إصدار الخادم: 8.0.17 -- PHP Version: 8.0.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
# 使用说明: 版本号用 "###" 作为标记头, "###" 后为实际更新的版本号, 需前后一致 # 备注使用 "#" 或者"-- " ###update_20160817_1 truncate table updatesql; ###update_20160817_1 ###update_20160908_1 update globaldata set data = NULL where name = 'tower'; update globaldata set data = NULL where name = 'quest'; ###update_20160908_1 ###update_20160928_1...
SELECT DISTINCT index_name, COLUMN_NAME FROM INFORMATION_SCHEMA.STATISTICS WHERE (table_schema , TABLE_NAME) = (? , ?) AND index_type = 'FULLTEXT';
####################################################### ####################################################### ############ COPYRIGHT - DATA SOCIETY ############ ####################################################### ####################################################### ## INTRODUCTION TO SQL PART1 ## ## NOT...
CREATE TABLE Employees ( EmployeeID UUID UNIQUE DEFAULT uuid_generate_v4(), UserID UUID REFERENCES Users(UserID) ON DELETE CASCADE, DepartmentID UUID REFERENCES Departments(DepartmentID) ON DELETE RESTRICT, PositionID UUID REFERENCES Positions(PositionID) ON DELETE RESTRICT, BirthDate ...
DROP DATABASE IF EXISTS employee; CREATE DATABASE employee; USE employee; CREATE TABLE department ( id INTEGER PRIMARY KEY AUTO_INCREMENT, name_of_department VARCHAR(30) ); CREATE TABLE roles ( id INTEGER PRIMARY KEY AUTO_INCREMENT, salary DECIMAL, department_id INTEGER, FOREIGN KEY (departme...
create table nts_dict_device_vendor ( device_vendor_id int(5) auto_increment comment '编号' primary key, name varchar(100) default '' null comment '设备制造商名称', descr varchar(500) default '' null comment '设备制造商描述', delete_flag tinyint(1) default 1 null comment '删除标志 1-正...
--Mason Veljan 101722004 /* TOUR (TourName, Description) PK (TourName) CLIENT (ClientId, Surname, GivenName, Gender) PK (ClientID) EVENT(TourName, EventYear, EventMonth, EventDay, Fee) PK (TourName, EventYear, EventMonth, EventDay) FK (TourName) References TOUR BOOKING(TourName, ClientId, EventYear, EventMonth, Even...
/*!40101 SET NAMES utf8 */; # 部署列表 CREATE TABLE IF NOT EXISTS `deploy_list` ( `id` int(11) NOT NULL AUTO_INCREMENT comment 'id', `m_id` int(11) DEFAULT NULL comment '模块id', `git_log_hash` varchar(255) DEFAULT NULL comment 'git commit hash', `apply_u_id` int(11) DEFAULT NULL comment '提交申请人员id', `deplo...
-- phpMyAdmin SQL Dump -- version 3.4.5 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Mar 23, 2013 at 04:44 PM -- Server version: 5.5.16 -- PHP Version: 5.3.8 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
delete from task_logg where task_id in (select id from task where type = 'G-omregning'); delete from task where type = 'G-omregning';
delete from HtmlLabelIndex where id=28579 / delete from HtmlLabelInfo where indexid=28579 / INSERT INTO HtmlLabelIndex values(28579,'配置SAP连接') / INSERT INTO HtmlLabelInfo VALUES(28579,'配置SAP连接',7) / INSERT INTO HtmlLabelInfo VALUES(28579,'Config SAP Connection',8) / INSERT INTO HtmlLabelInfo VALUES(28579,'配置SAP連接'...
/* Formatted on 18/03/2013 02:19:07 p.m. (QP5 v5.163.1008.3004) */ SELECT 'EQ_HJPF01', COUNT (*) FROM EQ_HJPF01 WHERE TRIM (TIPOID) IS NULL OR TRIM (NUMID) IS NULL OR TRIM (DVID) IS NULL OR TRIM (CODCLI) IS NULL OR TRIM (INDNACIONAL) IS NULL UNION ALL SELECT 'EQ_HJPF205', COUNT (*) F...
select * from restaurant join server on (server.restaurant_id = restaurant.id) join server_data on (server_data.server_id = server.id) join manager on (manager.restaurant_id = restaurant.id) where restaurant.id = 1;
SELECT * FROM TOKENS ORDER BY INSERT_DATETIME %s;
CREATE DATABASE @@DATABASE@@ WITH TEMPLATE = template1 ENCODING = 'UTF8'; ALTER DATABASE @@DATABASE@@ OWNER TO @@USERNAME@@;
-- CREATE DATABASE ApexRestaurantDB; USE ApexRestaurantDB; CREATE TABLE Meals( Meal_Id INT PRIMARY KEY IDENTITY(1,1), Customer_Id INT FOREIGN KEY REFERENCES Meals(Customer_Id), Staff_Id INT FOREIGN KEY REFERENCES Meals(Staff_Id), Date_Of_Meal DATETIME, Cost_Of_Meal INT(200), CreatedBy NVARCHAR(200), CreatedOn DATETIME,...
TRUNCATE TABLE shards; DROP TABLE shards;
CREATE DATABASE IF NOT EXISTS `conmed` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `conmed`; -- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64) -- -- Host: localhost Database: conmed -- ------------------------------------------------------ -- Server version 8.0.19 /*!40101 ...
insert into rodrigoscheuer (ID_PESSOA, NM_PESSOA) values (1, 'Rodrigo'); insert into rodrigoscheuer (ID_PESSOA, NM_PESSOA) values (2, 'Lucas'); CREATE TABLE RODRIGO( ID_PESSOA NUMBER(19,0) NOT NULL, NM_PESSOA VARCHAR2(50) NOT NULL, PRIMARY KEY (ID_PESSOA)); drop table RODRIGO; CREATE TABLESPACE TBS_CRESCER_DATA DA...
CREATE TABLE User ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL ); CREATE TABLE Plan ( id INT PRIMARY KEY AUTO_INCREMENT, summary VARCHAR(255) NOT NULL, details VARCHAR(255) NULL, creator_id INT NOT NULL, FOREIGN KEY(creator_id) REFERENCES...
SELECT war_name, count(fights.id) AS 'Number of wins' FROM warriors LEFT JOIN fights ON warriors.id = fights.winner_id GROUP BY warriors.id ORDER BY count(fights.id) DESC; SELECT concat(war_name, ' won ', count(fights.id), ' times') AS 'Top 3' FROM warriors LEFT JOIN fights ON warriors.id = fights.winner_id GR...
select first_name,last_name,salary from employees where salary < 10000 or salary > 15000
SELECT id, userName, positionX, positionY, fontSize, entryTime FROM sub ORDER BY entryTime DESC
select i_item_id ,i_item_desc ,i_current_price from item, inventory, date_dim, catalog_sales where i_current_price between 35 and 35 + 30 and inv_item_sk = i_item_sk and d_date_sk=inv_date_sk and d_date between cast('2000-05-23' as date) and cast('2000-07-23' as date) and i_manufact_id in (9...
ALTER TABLE attribute ALTER COLUMN data TYPE VARCHAR(255);
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 11, 2012 at 10:13 PM -- Server version: 5.5.24-log -- PHP Version: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
/** * 自动标签 * 标签GMAT720+:考试时间<5年 and 英语成绩>=720分 * TZ_APP_FORM_STA:S 保存; U 提交; P 预提交 * TZ_FORM_SP_STA:A 审批通过; B 拒绝; N 待审核 * 考试类型、考试分数、考试日期 利用宽泛的条件进行初筛(英语水平有GMAT and 存在分数大于等于720 and 存在考试日期为5年内(考试日期大于等于班级入学日期的年份减去5年的日期)) */ SELECT X.TZ_APP_INS_ID FROM PS_TZ_FORM_WRK_T Y, PS_TZ_APP_INS_T X WHERE Y.TZ_APP_INS...
select ma.lead_sequence_id, ma.insert_date, ma.decision, ma.decision_detail, ma.campaign_name, if(ma.decision='ACCEPT',1,0) as is_accept, la.lms_code, la.state, la.product, if(la2.origination_time>0, la2.isoriginated,la.isoriginated) as Is_originated, if(la2.origination_time>0, la2.approved_amount,null) as Origination_...
SELECT pa.loan_portfolio_id, convert(p.transaction_at,date) as transaction_at, sum(p.amount_subunit)/100 as "Payment_Amount" FROM payments p inner join payment_accounts pa on p.payment_account_id=pa.id where convert(transaction_at,date)>='2018-12-12' and pa.loan_portfolio_id is not null group by pa.loan_portfolio_id, ...
CREATE USER vscode CREATEDB; CREATE DATABASE vscode WITH OWNER vscode;
CREATE DATABASE practice DEFAULT CHARACTER SET utf8; CREATE USER 'ming'@'localhost' IDENTIFIED BY 'ming'; GRANT ALL PRIVILEGES ON practice.* TO 'ming'@'host';
CREATE TABLE [login] ( [username] VARCHAR(20) NOT NULL PRIMARY KEY, [password] NCHAR(20) NOT NULL, [fname] VARCHAR(20) NOT NULL, [lname] VARCHAR(20) NOT NULL )
select a.album_id, a.name as album_name, b.band_id, b.name as band_name, (case when a.name = b.name then 1 else 0 end) as e from album as a inner join band as b on a.band_id = b.band_id; select sum(case when a.name = b.name then 1 else 0 end) as album_sum from album as a inner join band as b on a.band_id = b.band_...
CREATE TABLE `Messages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `content` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL, `author` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL, `isDeleted` tinyint(1) NOT NULL DEFANOULT 0, `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, PRIMARY KEY (`id`) ) E...
CREATE VIEW [stage].[vCredit] AS SELECT DISTINCT CreditScore = ISNULL(CreditScore, 0) ,CreditCategory = CASE WHEN CreditScore >= 750 THEN 'Excellent' WHEN CreditScore BETWEEN 700 AND 749 THEN 'Good' WHEN CreditScore BETWEEN 650 AND 699 THEN 'Fair' WHEN CreditScore BETWEEN 550 AND 649 THEN 'Poor' ...
drop table if exists calculator; create table calculator ( id integer not null primary key autoincrement, name char(255), rules text );
DROP TABLE IMAGE CREATE TABLE IMAGE( BOARD_NO NUMBER NOT NULL, BOARD_NAME VARCHAR2(20) NOT NULL, IMAGE_URL VARCHAR2(150) ); select * from image;
/* Getting INFO out of the Magento DB can be a task in itself . Below is the SQL you can use to get out the customer info from Magento DB. */ select ce.entity_id, concat(cevf.value, ' ', cevl.value) fullname, ce.email from customer_entity ce inner join customer_entity_varchar cevf on ce.entity_id = cevf.entity_id...
SELECT BUSINESS_ID, COUNT(*) AS NO_OF_CHECKINS FROM YELP_CHECKIN WHERE BUSINESS_ID IN (SELECT TAB1.BUSINESS_ID FROM (SELECT BUSINESS_ID , AVG(NO_OF_STARS) AS AVERAGEPREV FROM YELP_REVIEWS WHERE TRUNC(PUBLISH_DATE) >= TO_DATE('05/01/2015','MM/dd/yyyy') AND TRUNC(PUBLISH_DATE) < TO_DATE('06/01/2015','MM/d...
CREATE TABLE sales ( prod_id NUMBER NOT NULL, cust_id NUMBER NOT NULL, time_id DATE NOT NULL, channel_id NUMBER NOT NULL, promo_id NUMBER NOT NULL, quantity_sold NUMBER(10,2) NOT NULL, amount_sold NUMBER(10,2) NOT NULL); CREATE TABLE salestemp ( prod_id NUMBER NOT NULL, cust_id NUMBER NOT ...
alter table APP_WORKFLOW_DICTIONARY add constraint APP_WORKFLOW_DICTIONARY_FK foreign key (APP_WORKFLOW_ID) references app_workflow (ID) on delete cascade;
use greenbook; -- publishers drop table if exists publishers; create table publishers( pub_id integer primary key auto_increment, pub_name varchar(20), city varchar(20), country varchar(20), book_id integer references books(book_id)); create table publishers( pub_id integer primary key auto_increment, pub...
DECLARE v_queueid INT := NVL(:QUEUEID, 0); v_xmlid INT := NVL(:XMLID, 0); v_queuestatus INT; --1=pending, 2=executing, 4/16=processing, 8=processed v_queueerror INT; --1=no error, 2=error v_xmlstatus VARCHAR2(20); v_status INT; -- 0=no started, 1=working, 2=success, 3=fail v_message ...
-- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64) -- -- Host: localhost Database: garitsdb -- ------------------------------------------------------ -- Server version 8.0.15 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*...
USE hamburgers_db; INSERT INTO hamburgers (burger_name) VALUES ("Clamburger"); INSERT INTO hamburgers (burger_name) VALUES ("Yamburger"); INSERT INTO hamburgers (burger_name) VALUES ("Spamburger");
-- Your SQL goes here CREATE TABLE skills ( id integer primary key AUTOINCREMENT not null, skill text not null UNIQUE )
-- Connect to Postgres Database CREATE DATABASE viewpointdb WITH OWNER = twadmin ENCODING = 'UTF8' TEMPLATE = template0 LC_COLLATE = 'en_GB.UTF-8' LC_CTYPE = 'en_GB.UTF-8' CONNECTION LIMIT = -1; GRANT CONNECT, TEMPORARY ON DATABASE viewpointdb TO public; GRANT ALL ON DATABASE viewpoin...
-- 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...
--use bid2007 --go set statistics io on set statistics time on SELECT schemas.name AS table_schema, tbls.name ...
CREATE OR REPLACE PROCEDURE CPI.POPULATE_PERIL_GRP( v_item_no IN NUMBER, v_grouped_item_no IN NUMBER, p_old_pol_id IN gipi_pack_polbasic.pack_policy_id%TYPE, p_proc_summary_sw IN VARCHAR2, p_new_par_id IN gipi_wopen_policy.par_id%TYPE, p_msg OUT VARCHAR2 ...
DROP PROCEDURE CPI.COMPUTE_DOCSTAMPS; CREATE OR REPLACE PROCEDURE CPI.COMPUTE_DOCSTAMPS (p_par_id IN NUMBER) IS /* /* last modified by bhev 9/12/2011 ** modification : include effectivity and expiry date condition for tax_charges */ /**/ /* last modified by jhing 01/19/2012 ** modification : include parameter 'ALLO...
CREATE OR REPLACE VIEW grape.v_process_definitions AS SELECT p.*, (SELECT json_agg(a.s) FROM (SELECT (to_jsonb(b) || jsonb_build_object('run_as_user', grape.username(run_as_user_id))) s FROM grape.auto_scheduler b WHERE process_id=p.process_id) a) AS auto_scheduler, (SELECT json_agg(process_role) FR...
drop database if exists test; create database test; use test; create table user( id int not null primary key auto_increment, username varchar(50) not null, password varchar(50) not null ); create table content( id int not null primary key auto_increment, title varchar(50) not null, content varchar(50) not ...
CREATE DATABASE IF NOT EXISTS `DatamartIngresos` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; USE `DatamartIngresos`; -- MySQL dump 10.13 Distrib 5.6.17, for debian-linux-gnu (i686) -- -- Host: localhost Database: DatamartIngresos -- ------------------------------------------------------ -- Serv...
INSERT INTO GARES VALUES ('CODE_LIGNE', 'NOM', 'NATURE', LATITUDE (WGS84), LONGITUDE (WGS84)); INSERT INTO GARES VALUES ('420000', 'La Forest', 'Desserte Voyageur', 48.4265, -4.30731); INSERT INTO GARES VALUES ('420000', 'Kerhuon', 'Desserte Fret-Desserte Voyageur-Infrastructure', 48.40931, -4.3882); INSERT INTO GARES ...
-- script that lists all Comedy shows in the database hbtn_0d_tvshows -- table contains only one record where name = Comedy (but the id can be different) SELECT sh.title FROM tv_shows AS sh JOIN tv_show_genres AS shgr ON sh.id=shgr.show_id JOIN tv_genres AS gr ON shgr.genre_id=gr.id WHERE gr.name = "Comedy" ORDER BY sh...
/* Navicat SQLite Data Transfer Source Server : treeView Source Server Version : 31202 Source Host : :0 Target Server Type : SQLite Target Server Version : 31202 File Encoding : 65001 Date: 2016-08-13 14:16:51 */ PRAGMA foreign_keys = OFF; -- ---------------------------- -- Table struc...
SELECT FirstName, LastName From Employee where Title like '%Sales%'
Set Names utf8; -- ---------------------------- -- Table structure for messagetable -- ---------------------------- DROP TABLE IF EXISTS `messagetable`; CREATE TABLE IF NOT EXISTS `messagetable` ( `mid` int(3) NOT NULL DEFAULT '0', `language` varchar(2) NOT NULL DEFAULT 'en', `message` text NOT NULL, `extraMess...
-- $Header: /u999/cvsadmin/cms_rep/repository/local_acc/usr/sql/eos_sec_secure_email.sql,v 1.1 2019/02/28 02:07:53 cvsadmin Exp $ -- ---------------------------------------------------------------------------------------------- -- Script : eos_sec_secure_email -- Purpose : -- Changes : -- Seq Name D...
CREATE TABLE cartruleproductrulegroup ( id CHAVE NOT NULL, id_product_rule_group CHAVE NOT NULL, id_cart_rule CHAVE NOT NULL, quantity INTEGER NOT NULL, CONSTRAINT pk_cartruleproductrulegroup PRIMARY KEY (id) );
REM e_tables.sql REM Version 1.0, last updated 4/8/97 REM This file creates the tables for the "PL/SQL at Work" example in REM Chapter 10 of _Oracle8 PL/SQL Programming_ by Scott Urman. DROP TABLE errors CASCADE CONSTRAINTS; CREATE TABLE errors ( module VARCHAR2(50), seq_number NUMBER, error_n...
DROP TABLE IF EXISTS animals CASCADE; CREATE TABLE animals ( id INTEGER PRIMARY KEY NOT NULL, name VARCHAR(255) NOT NULL )
create table if not exists comer_tbl( id bigint not null auto_increment, uin bigint not null comment 'comunion comer unique identifier', address varchar(50) not null default '' comment 'comunion comer could save some useful info on block chain with this address', comer_id varchar(35) not null default ''...
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Hoszt: localhost -- Létrehozás ideje: 2016. Már 19. 18:50 -- Szerver verzió: 5.5.47-0ubuntu0.14.04.1 -- PHP verzió: 5.5.9-1ubuntu4.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
delimiter $ -- Teste si la valeur de p_Obtenu est égale à p_Attendu et insert le résultat -- dans la table temporaire resultatsBesoins. create procedure tester(p_Cas varchar(255), p_Test text, p_Attendu int, p_Obtenu int) begin declare v_Resultat varchar(255) default if(p_Attendu = p_Obtenu, 'RÉUSSITE', 'ÉCHEC'); ...
INSERT INTO CUSTOMER (id, first_name, last_name, username) VALUES (1, 'Rebekah', 'Barry', 'Vivamus.rhoncus.Donec@convallis.net'), (2, 'Chloe', 'Hawkins', 'quam.Pellentesque@liberoet.org'), (3, 'Lyle', 'Ross', 'amet.ornare.lectus@pede.edu'), (4, 'Orson', 'Hicks', 'mollis.vitae.posuere@nonmassanon.ca...