text
stringlengths
6
9.38M
--1 select * from authors select * from titleauthor select au_lname,title_id from authors join titleauthor on authors.au_id=titleauthor.au_id
update ACT_GE_PROPERTY set VALUE_ = '6.5.0.2' where NAME_ = 'entitylink.schema.version';
-- -------------------------------------------------------- -- Хост: 127.0.0.1 -- Версия сервера: 5.7.29 - MySQL Community Server (GPL) -- Операционная система: Win64 -- HeidiSQL Версия: 11.0.0.5944 -- ------------------------------------------------------...
show databases; create table member( id varchar(50) not null primary key, password varchar(16) not null, name varchar(10) not null, reg_date datetime not null); show databases; create table test( num_id int not null primary key, title varchar(50) not null, content text not null); desc member desc test ...
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Feb 02, 2020 at 07:31 PM -- Server version: 5.7.21 -- PHP Version: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
CREATE PROCEDURE [etl].[CreditLoad] AS IF NOT EXISTS (SELECT CreditKey FROM dim.Credit WHERE CreditKey < 0) BEGIN SET IDENTITY_INSERT dim.Credit ON; INSERT INTO dim.Credit ( CreditKey ,CreditScore ,CreditCategory ,CreatedDate ) VALUES (-1, -1, 'Unknown', GETDATE()) SET IDENTITY_INSERT dim.Credit OFF...
drop sequence if exists reporting_org_seq; create sequence reporting_org_seq; SELECT setval('reporting_org_seq', (SELECT MAX(id) FROM reporting_organization));
-- Creating Users DROP DATABASE iF EXISTS USERS_LAB5; CREATE DATABASE USERS_LAB5; USE USERS_LAB5; CREATE TABLE Users ( fName VARCHAR(30) NOT NULL, lName VARCHAR(30) NOT NULL, username VARCHAR(50) NOT NULL PRIMARY KEY, passwrd VARCHAR(50) NOT NULL, mail VARCHAR(50) NOT NULL, gender VARCHAR(50) NOT ...
-- test.sql -- The MIT License (MIT) -- -- Copyright (c) 2016 Michael J. Forster -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the r...
WITH RECURSIVE cte (n, fact) AS (SELECT 0, 1 -- Initial Subquery UNION ALL SELECT n+1, (n+1)*fact FROM cte -- Recursive Subquery WHERE n < 9) SELECT * FROM cte;
-- SELECT * -- FROM customers -- WHERE points BETWEEN 1000 AND 3000 SELECT * FROM customers WHERE birth_date BETWEEN '1990-01-01' and '2000-01-01'
-- name: find-user-info-sql -- Returns all of the user fields associated with the provided email. SELECT id, email AS identity, password, role, reset_key FROM mapcha.users WHERE email = :email; -- name: add-user-sql -- Adds a new user to the database. INSERT INTO mapcha.users (email, password, role) VALUES (:ema...
SELECT ue.col_id AS id, ue.col_uielementdashboard AS dashboardid, ue.col_uielementwidget AS widgetid, ue.col_jsondata AS jsondata, ue.col_positionindex AS positionindex, ue.col_description AS description, ue.col_iseditable AS iseditable, ue.col_rulevisibility AS rulevisi...
 -- All bibliographic records which have a -- bib-level hold SELECT concat ('b', bib_view.record_num, 'a') AS bibrecnum, Min (hold.placed_gmt) AS MIN_HOLD_PLACED_DATE, -- hold.placed_gmt AS HOLD_PLACED_DATE, count (hold.patron_RECORD_id) AS NUM_HOLDS FROM sierra_view.bib_view, sierra_view.hold where hold.recor...
<?php /** * @file EditApprovalCondition.sql * updates an specified approval condition from %ApprovalCondition table * @author Till Uhlig * @param int \$apid a %ApprovalCondition identifier * @param string $values the input data, e.g. 'a=1, b=2' * @result - */ ?> UPDATE ApprovalCondition SET <?php echo $values;...
/******************************************************** * Ryan Halter Assignment 3 Number 5 *********************************************************/ SELECT DISTINCT category_name FROM categories c WHERE EXISTS (SELECT category_name FROM products p WHERE p.category_id = c.category_id) ORDER BY category_name
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Erstellungszeit: 08. Mrz 2018 um 09:00 -- Server-Version: 10.1.30-MariaDB -- PHP-Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
-- script that creates the table unique_id on your MySQL server. -- QUERY CREATE TABLE IF NOT EXISTS `unique_id` (id INT DEFAULT 1, name VARCHAR(256), PRIMARY KEY(id));
select a.file_file_name, b.first_name, b.last_name, c.kind, c.date_modifier, c.day, c.month, c.year, c.location from gedcom_documents a, gedcom_people b, gedcom_facts c where a.id = b.gedcom_document_id and b.id = c.gedcom_person_id order by a.file_file_name, b.last_name, b.first_name
delete from HtmlLabelIndex where id=26982 / delete from HtmlLabelInfo where indexid=26982 / INSERT INTO HtmlLabelIndex values(26982,'单点登录内网网段设置') / INSERT INTO HtmlLabelInfo VALUES(26982,'单点登录内网网段设置',7) / INSERT INTO HtmlLabelInfo VALUES(26982,'Single sign-on within the network gateway set',8) / INSERT INTO HtmlLa...
--------mod_nwayacd --------nwaycc.sql --------座席排队数据表 --------许可协议:Apache-2.0 --------开发团队:上海宁卫信息技术有限公司 --------联系Email:lihao@nway.com.cn --------开始开发时间:2020-8-1 中华人民共和国建军节 --------分机表 CREATE SEQUENCE public.call_extension_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CA...
-- Add columns to configure multi-member districts in the legislative body SET search_path to publicmapping; ALTER TABLE redistricting_legislativebody ADD COLUMN multi_members_allowed boolean; UPDATE redistricting_legislativebody SET multi_members_allowed = false; ALTER TABLE redistricting_legislativebody ALTER COLUMN...
CREATE OR REPLACE VIEW generator AS SELECT 0 n UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10 UNION ALL SELECT 11 UNION ALL SELECT 12 UNION ALL SELECT 13 UNION ALL SELECT 14 UN...
-- WEB-4173 - drop MAXIMILES_ID (aka USER_ID, aka PLAYER_PROFILE_ID) DROP VIEW IF EXISTS YAZINO_LOGIN# CREATE VIEW YAZINO_LOGIN AS SELECT lu.PLAYER_ID AS PLAYER_ID, lu.EMAIL_ADDRESS AS EMAIL_ADDRESS FROM LOBBY_USER lu#
ALTER TABLE "public"."projects" DROP COLUMN "filesCount";
with duplicate_content as ( select ARRAY_AGG( RECORD_num) as record_num_array , content from sierra_view.subfield_view where marc_tag = '856' and tag = 'u' and content ilike '%freading%' group by content having count(*) > 1 ), duplicate_bibs as ( select row_number() over ( partition by content order by content)...
CREATE DATABASE IF NOT EXISTS `ejercicio3` DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;
create or replace view raw_sales as select f.title, f.description, f.length, f.rating, p.amount, p.payment_date, date_part('quarter', p.payment_date) as quarter, date_part('month', p.payment_date) as month, date_part('year', p.payment_date) as year, concat('Q', date_part('quarter', p.payment_date)::text, '-',...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : lun. 21 déc. 2020 à 06:45 -- Version du serveur : 5.7.31 -- Version de PHP : 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
-- Marissa Gonçalves -- Amy Yip -- Database Tools -- Assignment 5 - PL/SQL (1) -- 1) Create a PL/SQL program block that uses a cursor FOR loop to output information for -- each of the employees in the HR database. Show the last names, first name, department -- names, emails, and phone numbers. Include column heading...
-- MySQL Script generated by MySQL Workbench -- Sat Feb 23 17:48:51 2019 -- 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...
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 03, 2014 at 12:41 AM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
\set ON_ERROR_STOP on DROP SEQUENCE IF EXISTS retacubeseq CASCADE; CREATE SEQUENCE retacubeseq; CREATE TABLE reta_cube_rollup AS SELECT NEXTVAL('retacubeseq') AS reta_month_offense_subcat_summary_id, GROUPING(year, month, state_name, state, classification, offense_category, offense, offense_code, ...
DROP TABLE IF EXISTS CAMPAIGN_CONTENT# CREATE TABLE IF NOT EXISTS CAMPAIGN_CONTENT ( CAMPAIGN_ID int(11), CONTENT_KEY varchar(255), CONTENT_VALUE blob, PRIMARY KEY (CAMPAIGN_ID, CONTENT_KEY), FOREIGN KEY (CAMPAIGN_ID) REFERENCES CAMPAIGN_DEFINITION(ID) )#
INSERT INTO HtmlLabelIndex values(19734,'注意:规则的格式必须为 结果=公式(例如:Z=X+Y)') / INSERT INTO HtmlLabelInfo VALUES(19734,'注意:规则的格式必须为 结果=公式(例如:Z=X+Y)',7) / INSERT INTO HtmlLabelInfo VALUES(19734,'Notice:The Format of The Rule must be: result = expressions(eg:Z=X+Y)',8) /
declare v_output nclob; v_ProcessorName nvarchar2(255); v_functionName nvarchar2(255); v_ErrorCode number; v_ErrorMessage nvarchar2(255); v_query varchar(2000); v_result number; v_TaskId number; begin v_Output := EMPTY_CLOB(); v_TaskId := :TaskId; v_ProcessorName := :ProcessorCode; v_errorCode :...
-- phpMyAdmin SQL Dump -- version 4.9.3 -- https://www.phpmyadmin.net/ -- -- 主机: localhost:8889 -- 生成日期: 2020-08-12 19:08:20 -- 服务器版本: 5.7.26 -- PHP 版本: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- 数据库: `quevote_db` -- -- -------------------------------------------------------- -- -...
DROP TABLE IF EXISTS users; CREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(250) NOT NULL, password VARCHAR(513) NOT NULL, UNIQUE(name,password) ); INSERT INTO users(name, password) VALUES ('transbank', 'R/4tXNKwvOtgKWdeuBQaeI/LxxJQGyCjqakVIQ4itOCCn5mP9AF5lrpzo3P9SKD1f5txQ/5n4shJdkDbY...
-- Tables are created below with their respective details -- Table: Candidates -- List of candidates candidate for job opennings. CREATE TABLE Candidates ( candidateId INT PRIMARY KEY IDENTITY, statusId INT NOT NULL, firstName VARCHAR(100) NOT NULL, lastName VARCHAR(100) NOT NULL, candidateAddress ...
insert into fgo_material (id, name, type, box, description, location) values (1, '鳳凰の羽根', 0, 1, '东洋某种灵鸟的羽毛', 'f_秘密航路(オケアノス),e1_剣の修行場上级,e1_剣の修行場超级,e2_弓の修行場中级,e2_弓の修行場上级,e2_弓の修行場超级,e3_槍の修行場上级,e3_槍の修行場超级'); insert into fgo_material (id, name, type, box, description, location) values (2, '虚影の塵', 0, 1, '虚幻的影子消失时飞散的尘', 'f_骸...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 28, 2019 at 01:00 PM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
create table ACT_GE_PROPERTY ( NAME_ nvarchar(64), VALUE_ nvarchar(300), REV_ int, primary key (NAME_) ); create table ACT_GE_BYTEARRAY ( ID_ nvarchar(64), REV_ int, NAME_ nvarchar(255), DEPLOYMENT_ID_ nvarchar(64), BYTES_ varbinary(max), GENERATED_ tinyint, primary key (ID...
CREATE TABLE `Department` ( DepartmentID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, DepartmentName VARCHAR(50) NOT NULL ); CREATE TABLE `Position` ( PositionID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, PositionName VARCHAR(50) NOT NULL ); CREATE TABLE `Account` ( AccountID INT NOT NULL PRIMARY KEY AUT...
SELECT * FROM ITEM_CHOICES WHERE DELETE_FLAG = 0 ORDER BY INSERT_DATETIME %s LIMIT ? OFFSET ?;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET N...
-- https://carlos-sierra.net/tag/plan-hash-value/ ---------------------------------------------------------------------------------------- -- -- File name: one_sql_time_series.sql -- -- Purpose: Performance History for one SQL -- -- Author: Carlos Sierra -- -- Version: 2014/10/31 -- -- Usage: Scri...
######################################## # 创建金融金融数据库indicator # # Example table creation scripts ######################################## CREATE TABLE close ( date DATE NOT NULL , sec_id CHAR(50) NOT NULL , close DOUBLE NOT NULL , PRIMARY KEY (date, sec_id) ) ENGINE=InnoDB; CREATE TA...
create database ADCDB; CREATE TABLE ADCDB.dbo.Pessoa( [id] bigint PRIMARY KEY IDENTITY(1,1) NOT NULL, [cpf] nvarchar(16) NOT NULL, [email] nvarchar(80) NOT NULL, [senha] nvarchar(30) DEFAULT '12345678', [nome] nvarchar(max) NOT NULL, [saldo] float default 0 ) insert into ADCDB.dbo.Pessoa ([cpf],[email],[nome]...
ALTER TABLE expenses MODIFY `repeat` TINYTEXT; ALTER TABLE incomes MODIFY `repeat` TINYTEXT;
drop table if exists datosCliente create table datosCliente (idCliente int primary key not null, nombreCliente varchar(300), direccionCliente varchar (500) ) select * from datosCliente order by nombreCliente select a.nombreCliente,a.direccionCliente, b.productoNombre, b.costo from datosCliente a inner join compra...
create table employees(id integer,name varchar(20)); insert into employees values(1,'kajal'); insert into employees values(2,'kajal2'); insert into employees values(3,'kajal3'); insert into employees values(4,'kajal4'); insert into employees values(5,'kajal5');
-- Drops the ese if it exists currently -- --DROP DATABASE IF EXISTS ese; -- Creates the "ese" database -- CREATE DATABASE ese;
create table TEACHERINFO( teacherid CHAR(15) not null primary key, /** 员工编号 */ teachername VARCHAR(10) not null, /** 员工姓名 */ teacherbirthday VARCHAR(20), /** 出生日期 */ teachersex ENUM("男","女") not null default '男', /** 性别 */ teacherschool VARCHAR(20), /** 毕业院校 */ teachertech VARCHAR(20), /** ...
DROP DATABASE IF EXISTS event_db;
SELECT setMetric('ServerVersion', '3.7.4');
DELETE FROM `character_aura`; ALTER TABLE `character_aura` DROP COLUMN `effect_index`, DROP COLUMN `amount`, DROP COLUMN `maxduration`, DROP COLUMN `remaintime`; ALTER TABLE `character_aura` ADD COLUMN `basepoints0` INT(11) NOT NULL DEFAULT '0', ADD COLUMN `basepoints1` INT(11) NOT NULL DEFAULT '0', ADD COLUMN `b...
-- Unfriend -- procedure definition delimiter // create procedure unfriend( in userID int, in friendID int ) begin delete from friendUser where friendUser.userID = userID and friendUser.friendID = friendID; delete from friendUser where friendUser.userID = friendID and friendUser.friendID = userID; end // delimi...
create or replace PROCEDURE systemright_Srightsbygroup (id_1 integer, flag out integer, msg out varchar2, thecursor IN OUT cursor_define.weavercursor) as begin open thecursor for select a.rightid,b.detachable from systemrighttogroup a,SystemRights b where a.groupid= id_1 and a.rightid=b.id order by b.righttype asc,a....
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 03, 2017 at 08:46 AM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
CREATE OR REPLACE PROCEDURE DW.SPW_T_BMS_PENALTY_TRACKER (iCommit IN NUMBER DEFAULT 2000 ) is /*********************************************************************************** || QUERY INFORMATION || || Department: Data Warehouse || Programmer: Luis Fuentes || Date: 04/04/2018 || Categor...
select userid from users order by userid desc limit 1
INSERT IGNORE INTO badge_message_view (user_id, badge_content_id, mtime) SELECT user_id, badge_content_id, ctime FROM social_connections_badge
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 18, 2021 at 11:08 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
create role uport login password 'uport' nosuperuser inherit nocreatedb nocreaterole noreplication; alter role uport encrypted password 'uport'; create schema uport authorization uport; grant all on schema uport to uport; grant usage on schema uport to public; alter default privileges in schema uport grant select ...
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 13, 2019 at 03:20 PM -- Server version: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
DROP PROCEDURE IF EXISTS Funcion_SignUp_Cliente; DELIMITER $$ CREATE PROCEDURE Funcion_SignUp_Cliente( IN pc_userPassword VARCHAR(50), IN pc_nombre VARCHAR(50), IN pc_apellido VARCHAR(50), IN pc_telefono VARCHAR(50), IN pc_correo VARCHAR(50), OUT pcMensaje VARCHAR(2000), OUT pbOcurreError BOOLEA...
ALTER TABLE groups ADD CONSTRAINT check_name_length CHECK (length(name) >= 3 and length(name) <= 64);
CREATE or alter PROCEDURE SP_PLANO_MENSAL ( diapgto integer, emissao date, vencimento date, geroumes varchar(10), parcelas integer) as declare variable codsocio integer; declare variable valor double precision; declare variable gp char(1); declare variable codfaixa integer; declare variable codcob i...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : jeu. 16 nov. 2017 à 22:13 -- Version du serveur : 5.7.19 -- Version de PHP : 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
create table tama_reports.monitoring_agent ( id serial PRIMARY KEY, monitoring_agent_Id varchar(100) UNIQUE, monitoring_agent_name varchar(100), contact_number varchar(20), type varchar(2) ); ALTER TABLE tama_reports.clinic ADD COLUMN monitoring_agent_id varchar(100);
use KAILUA -- Inserciones INSERT INTO K_ESPECIALIDADES VALUES ('ASP.NET') INSERT INTO K_ESPECIALIDADES VALUES ('Ajax') INSERT INTO K_ESPECIALIDADES VALUES ('JScript') INSERT INTO K_ESPECIALIDADES VALUES ('Delphi') INSERT INTO K_ESPECIALIDADES VALUES ('JAVA') INSERT INTO K_ESPECIALIDADES VALUES ('PHP'...
-- phpMyAdmin SQL Dump -- version 4.0.4.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 20, 2015 at 03:13 AM -- Server version: 5.6.11 -- PHP Version: 5.5.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
USE `challengedb`; DROP TABLE IF EXISTS `exads_test`; CREATE TABLE `exads_test` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `age` int NOT NULL, `job_title` varchar(100) NOT NULL, PRIMARY KEY (`id`) ); DROP TABLE IF EXISTS `exads_design_test`; CREATE TABLE `exads_design_test` ( `desig...
-- Exercicio 1: SELECT M.title, B.domestic_sales, B.international_sales FROM Pixar.Movies AS M INNER JOIN Pixar.BoxOffice AS B ON M.id = B.movie_id; -- Exercicio 2: SELECT M.title, (B.international_sales + B.domestic_sales) FROM Pixar.Movies AS M INNER JOIN Pixar.BoxOffice AS B ON M.id = B.movie_id WHERE B.internati...
CREATE TABLE flyway_test ( key VARCHAR(64), value VARCHAR(255), PRIMARY KEY(key) ); ALTER TABLE flyway_test OWNER TO postgres; insert INTO flyway_test values ('1','test'); insert INTO flyway_test values ('2','test2'); insert INTO flyway_test values ('3','test3'); insert INTO flyway_test values ('4','test4'); in...
USE mealcreave_db; CREATE TABLE users( users_id int AUTO_INCREMENT, login varchar(30) not null, alias varchar(30) not null, password varchar(30) not null, location varchar(30) not null, preferences varchar(30) not null, primary key (users_id) ); CREATE TABLE food( food_id int AUTO_INCREMENT, food_name varchar(...
CREATE TABLE translation ( id CHAVE NOT NULL, id_lang CHAVE NOT NULL, key TEXT NOT NULL, translation TEXT NOT NULL, domain CHARACTER VARYING(80) NOT NULL, theme CHARACTER VARYING(32), CONSTRAINT pk_translatio...
DROP TABLE IF EXISTS user; DROP TABLE IF EXISTS team; CREATE TABLE user ( id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT UNIQUE NOT NULL, password TEXT NOT NULL ); CREATE TABLE team ( teamkey TEXT PRIMARY KEY, teamname TEXT NOT NULL, leader_id INTEGER NOT NULL, --members list is strin...
delete from HtmlLabelIndex where id=26254 / delete from HtmlLabelInfo where indexid=26254 / INSERT INTO HtmlLabelIndex values(26254,'允许创建节点导入明细') / INSERT INTO HtmlLabelInfo VALUES(26254,'允许创建节点导入明细',7) / INSERT INTO HtmlLabelInfo VALUES(26254,'Allows you to create node import detail',8) / INSERT INTO HtmlLabelInf...
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 09, 2017 at 03:58 AM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
delete from HtmlLabelIndex where id=23158 / delete from HtmlLabelInfo where indexid=23158 / INSERT INTO HtmlLabelIndex values(23158,'申请支付佣金额') / INSERT INTO HtmlLabelInfo VALUES(23158,'申请支付佣金额',7) / INSERT INTO HtmlLabelInfo VALUES(23158,'apply money',8) / INSERT INTO HtmlLabelInfo VALUES(23158,'申請支付傭金額',9) / del...
DROP TABLE NOTIFICATION; DROP TABLE MEDIA_ATTACHMENT; DROP TABLE MESSAGE; DROP TABLE CHAT_LIST; DROP TABLE CHAT; DROP TABLE USER_LIST_CONTAINS; DROP TABLE USR; DROP TABLE USER_LIST; CREATE TABLE USER_LIST( list_id serial, list_type char(10) NOT NULL, PRIMARY KEY(list_id)); CREATE TABLE USR( login char(50), pho...
LOAD DATA INFILE 'H:/Sources/Php/test_gac/dump/tickets_appels_201202.csv' IGNORE INTO TABLE tickets FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY "'" LINES TERMINATED BY '\r\n' (compte,num_facture, num_abonne,@date_time_variable,heure_ticket,duree_volume_reel,duree_volume_facture,type_donnees) -- read one of the f...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 06, 2020 at 01:54 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
INSERT INTO folders (folder_name) VALUES ('People'), ('Places'), ('Things') ;
CREATE DATABASE hive DEFAULT CHARACTER SET utf8; SHOW DATABASES; CREATE USER 'hive'@'localhost' IDENTIFIED BY 'hive'; GRANT ALL PRIVILEGES ON *.* TO 'hive'@'localhost'; CREATE USER 'hive'@'%' IDENTIFIED BY 'hive'; GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%'; FLUSH PRIVILEGES; select Host,User,Password from mysql.user w...
/* Deletes all the database content. For debugging purposes only. Delete this file after production. */ DELETE FROM total; DELETE FROM users; DELETE FROM walks;
-- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64) -- -- Host: localhost Database: gestin -- ------------------------------------------------------ -- Server version 5.7.26 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!4...
CREATE OR REPLACE FUNCTION public.dblink_connect(text, text) RETURNS text LANGUAGE c STRICT AS '$libdir/dblink', $function$dblink_connect$function$
/* Navicat Premium Data Transfer Source Server : local Source Server Type : MySQL Source Server Version : 50733 Source Host : localhost:3306 Source Schema : uavserver Target Server Type : MySQL Target Server Version : 50733 File Encoding : 65001 Date: 12...
-- Sript that deletes the database 'hbtn_0c_0' DROP DATABASE IF EXISTS hbtn_0c_0;
INSERT INTO STATISTIC(telegram_user_id_fk, category, amount_of_money, type_of_currency, day_, month_, year_) VALUES(?,?,?,?,?,?,?)
/* Restricting and Sorting Data - Limiting Rows Returned in a SQL statement - Applying Rules of Precedence for operators in an expression - Sorting Data - Using Substitution Variables - Using the DEFINE and VERIFY commands */ --1 to select all the rows and columns in a table SELECT * FROM employees; --2 to limit t...
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Máquina: localhost -- Data de Criação: 08-Jul-2016 às 09:09 -- Versão do servidor: 5.5.47-0ubuntu0.14.04.1 -- versão do PHP: 5.5.9-1ubuntu4.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_...
-- phpMyAdmin SQL Dump -- version 4.4.10 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Feb 06, 2017 at 01:42 PM -- Server version: 5.5.42 -- PHP Version: 5.6.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `oop-blog` -- -- ---------------------------...
SET IDENTITY_INSERT tCat ON; INSERT INTO tCat(CategoryID, CategoryName) VALUES (1,'guitar'), (2,'drums'), (3,'base'), (4,'sax'), (5,'electric Guitar'); SET IDENTITY_INSERT tCat OFF;
declare v_sysdate date; v_DebugSession nvarchar2(255); v_CaseId Integer; v_twTargetActivity nvarchar2(255); v_TaskId Integer; v_Message nclob; v_IsValid number; v_TaskStateInitId Integer; v_stateCode nvarchar2(255); v_state nvarchar2(255); v_TaskStateInitAssignProc nvarchar2(...
CREATE or REPLACE PROCEDURE DocImageFile_Insert (docid_1 integer, imagefileid_2 integer, imagefilename_3 Varchar2, imagefiledesc_4 Varchar2, imagefilewidth_5 integer,imagefileheight_6 integer, imagefielsize_7 integer,docfiletype_8 char,versionId_9 integer, versionDetail_10 Varchar2,docImageId_11 integer, flag out integ...
####################################################### ####################################################### ############ COPYRIGHT - DATA SOCIETY ############ ####################################################### ####################################################### ## INTRODUCTION TO SQL PART1 EXERCISE A...
DROP TABLE IF EXISTS ACCOUNTS ; CREATE TABLE ACCOUNTS ( ACCOUNT VARCHAR(250) PRIMARY KEY, BALANCE NUMERIC, CREATED DATE, USER_ID NUMERIC); DROP TABLE IF EXISTS DEBIT_CARDS; CREATE TABLE DEBIT_CARDS ( CARD_NUMBER INT PRIMARY KEY, ATM_LIMIT NUMERIC, ATM_PERIOD_UNIT VARCHAR(10), CONTACTLESS ...