text
stringlengths
6
9.38M
--集团服务 --1)新增“集团服务指令表” create table BIS_GROUP_EXC ( ID NUMBER(10) not null, PRENT_ACC VARCHAR2(30), BANK_ACC VARCHAR2(30), BEGIN_DATE DATE, END_DATE DATE, SEARCH_CODE VARCHAR2(20), MIN_MONEY NUM...
DROP TABLE participate; DROP TABLE event_at; DROP TABLE create_event; DROP TABLE event; DROP TABLE photo_tags_IN; DROP TABLE album_contain; DROP TABLE album_belong; DROP TABLE album; DROP TABLE photo; DROP TRIGGER checkDup; DROP TABLE friend; DROP TABLE chat; DROP SEQUENCE message_sequence; DROP TABLE message; DROP...
alter table curso add column useVisorTema boolean not null default 1 after Creador; INSERT INTO curso VALUES('Curso de Segundo Grado','window.open("SegundoGrado/index.jsp","Curso de Segundo Grado","width=800,height=600");','Administrador',0); /*update curso set useVisorTema = 0, Url='window.open("SegundoGrado/index.j...
SHOW DATABASES; CREATE DATABASE pepito; USE pepito; CREATE TABLE trabajadores ( idTrabajador INT PRIMARY KEY AUTO_INCREMENT, nombre VARCHAR(20) NOT NULL, puesto VARCHAR(30) NOT NULL ); INSERT INTO trabajadores (nombre, puesto) VALUES ("felipe", "RH" ), ("carlos", "empleado" ), ("cristian", "gerente" ); SELECT n...
CREATE TABLE `order_attachment` ( `order_attachment_id` int(11) NOT NULL AUTO_INCREMENT, `order_logs_id` int(11) NOT NULL, `path` varchar(100) NOT NULL, PRIMARY KEY (`order_attachment_id`), KEY `order_attachment_order_logs_FK` (`order_logs_id`), CONSTRAINT `order_attachment_order_logs_FK` FOREIGN KEY (`orde...
CREATE TABLE `messages` ( `id_messages` Int AUTO_INCREMENT NOT NULL UNIQUE, `key` LONGTEXT NOT NULL, `message` LONGTEXT NOT NULL, `date` DATETIME NOT NULL, `id_usr` INT NOT NULL, CONSTRAINT messages_PK PRIMARY KEY (`id_messages`), CONSTRAINT messages_users_FK FOREIGN KEY (`id_usr`) REFE...
-- lots of dynamic_insulin and bg values are null. Let's find dates where we can try our predictive model -- this file only looks at BG, not BG and CGM which works better. Look at that. select date(rtime),count(*) as n from insulin_carb_smoothed_2 where dynamic_insulin is not null and bg is not null group by date(rtim...
/* Navicat MySQL Data Transfer Source Server : 192.168.1.12 Source Server Version : 50629 Source Host : 192.168.1.12:3006 Source Database : hxs_challenge Target Server Type : MYSQL Target Server Version : 50629 File Encoding : 65001 Date: 2016-07-22 20:01:00 */ SET FOREIGN_KEY_CHE...
CREATE OR REPLACE PROCEDURE clear_alarm_for_interface ( xtid_id IN tids.id%TYPE, xinterface_id IN interfaces.id%TYPE, status IN OUT tids.flag%TYPE ) AS CURSOR get_alarm_cursor IS SELECT 9 as newstat FROM alarms WHERE tid_id = xtid_id AND interface_id = xinterface_id AND acknowledge_date IS NULL; alarm get_a...
truncate table t1; truncate table t2; exec runstats_pkg.rs_start; insert into t1 select * from big_table.big_table where rownum <= 1000000; commit; exec runstats_pkg.rs_middle; begin for x in (select * from big_table.big_table where rownum <= 1000000) loop insert into t2 values x; end loop commit; end; / ex...
# Host: 172.17.104.22 # Database: tx # Table: 'CHARBASE' # CREATE TABLE `CHARBASE` ( `CHARID` int(10) unsigned NOT NULL auto_increment, `ACCID` int(10) unsigned NOT NULL default '0', `NAME` varchar(33) NOT NULL default '', `TYPE` smallint(5) unsigned NOT NULL default '0', `LEVEL` smallint(5) unsig...
create or replace view v_fs_fszzb as select e.* from (select (case a.jsde955 when '601030' then '601012' else a.jsde955 end) jsde955, a.de001, a.de322, a.jsde662, a.jsde912,...
-- Deliverable 1 -- 1. Create Retriement Titles table and export it to a csv file titled retirement_titles. SELECT e.emp_no, e.first_name, e.last_name, t.title, t.from_date, t.to_date INTO retirement_titles FROM employees as e INNER JOIN titles as t ON e.emp_no = t.emp_no WHERE (e.birth_date BETWEEN...
DROP TABLE IF EXISTS journeys; DROP TABLE IF EXISTS stations; CREATE TABLE stations ( logical_terminal INTEGER NOT NULL, street_name VARCHAR(100), village VARCHAR(100), full_name VARCHAR(200) NOT NULL, latitude FLOAT, longitude FLOAT, PRIMARY KEY (logical_terminal), UNIQUE(full_name) ) DEFAULT CHAR...
DROP DATABASE IF EXISTS bloodtime; CREATE DATABASE IF NOT EXISTS bloodtime; USE bloodtime; CREATE TABLE spielfigur( entityId INT NOT NULL auto_increment, entity_name VARCHAR(255) NOT NULL, title VARCHAR(255) NOT NULL, health INT NOT NULL, delay INT NOT NULL, damage INT NOT NULL, speed INT NOT ...
CREATE TABLE IF NOT EXISTS offense ( uuid integer, game_id integer, player varchar(7), passing_attempts smallint, passing_completions smallint, passing_yardage integer, interceptions smallint, passing_touchdowns smallint, rushing_attempts smallint, successful_rushing_attempts smallint, rushing_yardage intege...
UPDATE professors SET specialization = 'Super cool new specialization' WHERE id IN ( SELECT professor_id FROM thesis WHERE thesis_area = 'Semantic Web' );
select round(propensity_score,2) ps, treatment, count(*) person_count from @resultsTableQualifier.cca_matched_pop where execution_id = @executionId group by round(propensity_score,2), treatment order by round(propensity_score,2) asc
CREATE TABLE [display].[cmn_skill] ( [sys_id_display_value] NVARCHAR(255) NULL, [sys_replace_on_upgrade_display_value] NVARCHAR(255) NULL, [sys_mod_count_display_value] NVARCHAR(255) NULL, [description_display_value] NVARCHAR(255) NULL, [active_display_value] NVARCHAR(255) NULL, [sys_updated_on_display_va...
-- AlterTable ALTER TABLE "assessment" ADD COLUMN "instructions" TEXT;
/* 1. а) Да се направи така, че да не може два филма да имат еднаква дължина. б) Да се направи така, че да не може едно студио да има два филма с еднаква дължина. */ use movies alter table movie add constraint unique_length unique(length) alter table movie add constraint studio_unique_length unique(lengt...
select `p_partkey`, `n_name`, `r_name` from `part` right join `nation` on `n_regionkey` = `p_partkey` left join `region` on `n_nationkey` = `r_regionkey`
/* SQLyog Community Edition- MySQL GUI v6.52 MySQL - 5.1.24-rc-community : Database - eMeetingDB ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!4010...
CREATE Procedure sp_Get_ReconcileDocumentDetail (@ReconcileID Integer) As Select ReconcileDetail.Product_Code, Items.ProductName From ReconcileDetail, Items Where ReconcileID = @ReconcileID and ReconcileDetail.Product_Code = Items.Product_Code Order by ReconcileDetail.Product_Code
insert into produtos (id, nome, quantidade) values (1, 'BMW', 81); insert into produtos (id, nome, quantidade) values (2, 'Jeep', 95); insert into produtos (id, nome, quantidade) values (3, 'Smart', 54); insert into produtos (id, nome, quantidade) values (4, 'Ford', 52); insert into produtos (id, nome, quantidade) valu...
SELECT floor(avg(population)) from city;
CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`localhost` SQL SECURITY DEFINER VIEW `interactions_in_posts_replied` AS SELECT `comments_replied_by_reaction`.`po_fbid` AS `po_fbid`, `comments_replied_by_reaction`.`po_id` AS `po_id`, `comments_replied_by_reaction`.`post_owner` ...
DELIMITER // CREATE PROCEDURE index_salaries(percent DECIMAL(5,2)) BEGIN DECLARE emp_id INTEGER; DECLARE emp_sal DECIMAL(10,2); DECLARE new_sal DECIMAL(10,2); DECLARE done BOOLEAN DEFAULT FALSE; DECLARE emps CURSOR FOR SELECT empno, sal FROM emp; DECLARE CONTINUE HANDLER FOR NOT FOUND SET done :...
-- Todos os funcionários foram promovidos a atores. Monte uma query que exiba -- a união da tabela staff com a tabela actor , exibindo apenas o nome e o -- sobrenome . Seu resultado não deve excluir nenhum funcionário ao unir as tabelas. (SELECT first_name, last_name FROM sakila.staff) UNION ALL (SELECT ...
-- CREATE TABLE user_courses ( -- user_id INT NOT NULL, -- FOREIGN KEY (user_id) REFERENCES users(user_id), -- course_id INT NOT NULL, -- FOREIGN KEY (course_id) REFERENCES courses(course_id), -- ...
# # * Coppermine 1.6.x Plugin - final_extract # * # * @copyright Copyright (c) 2009 Donnovan Bray # * @license GNU General Public License version 3 or later; see LICENSE # * # * @author Donnovan Bray (original) # * @author ron4mac (23 Dec 2018); version for CPG 1.6.x # INSERT INTO `CPG_final_extract_config` VALUES...
use smartcarth; INSERT INTO products (label, name, brand, type_description, packing_type, price, owner_uid, aisle_label, aisle, aisle_order, created_at) VALUES ('rótulo completo', 'Arroz', 'Tio João', 'Agulhinha', '1k', '2.99', 0, 'nome do setor' , -1, -1, now()); INSERT INTO products (label, name, brand, type_descri...
DROP TABLE "bam.hausrat_neugeschaeft"; CREATE TABLE "bam.hausrat_neugeschaeft" ( pid varchar(20), beitrag DECIMAL, tarif varchar(50), vertriebskanal varchar(50), qm INTEGER, state varchar(50), datum TIMESTAMP, haustyp varchar(10) ); INSE...
# --- !Ups ALTER TABLE transactions ADD COLUMN archived boolean NOT NULL DEFAULT(false); # --- !Downs ALTER TABLE transactions DROP COLUMN archived;
--PROBLEM 07 SELECT FlightId ,SUM(Price) AS [TOTAL PRICE] FROM Tickets GROUP BY FlightId ORDER BY [TOTAL PRICE] DESC,FlightId
( SELECT c.`id` AS id, c.`started` AS started, c.`stopped` AS stopped, c.`client` AS client, c.`user` AS user, NULL AS topic, "connect" AS type FROM `connects` c INNER JOIN `clients` cc ON c.`client` = cc.`uuid` WHERE c.`client` = ? ) UNION ( SELECT c.`id` AS id, c....
DROP TABLE IF EXISTS `tenant_data`; DROP TABLE IF EXISTS `tenant_field`; DROP TABLE IF EXISTS `tenant_model_info`; DROP TABLE IF EXISTS `tenant`; DROP TABLE IF EXISTS `user_info`; DROP TABLE IF EXISTS `sdlcmodel`; CREATE TABLE `sdlcmodel` ( `modelId` int(11) NOT NULL AUTO_INCREMENT, `modelType` varchar(45) NOT NUL...
CREATE procedure sp_acc_list_Others_DebitNote(@OthersID Int, @FromDate datetime, @ToDate datetime) as If @OthersID=0 Begin select DocumentID, DocumentDate, AccountsMaster.AccountID, AccountsMaster.AccountName, NoteValue, DebitID, case When Status & 64 <> 0 Then...
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 06, 2020 at 11:58 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
--Find the location of the files currently SELECT name, physical_name AS current_file_location FROM sys.master_files --Move this for all files for the database, mdf, ldf & ndf files USE master; --do this all from the master ALTER DATABASE [tempdb] MODIFY FILE ( name='tempdev', filename='D:\tempdb.mdf' ); --Fi...
INSERT INTO burgers (burger_name, devoured) VALUES ('fat burger', false); INSERT INTO burgers (burger_name, devoured) VALUES ('bacon avo burger', false); INSERT INTO burgers (burger_name, devoured) VALUES ('classic cheese burger', false); INSERT INTO burgers (burger_name, devoured) VALUES ('kimchi burger', false); ...
--[Users]表插入数据 INSERT INTO [Users] ([Name], [UserName], [Password]) VALUES ('admin', '超级无敌大帅哥', 'admin') INSERT INTO [Users] ([Name], [UserName], [Password]) VALUES ...
SELECT DISTINCT state FROM sale.customer X WHERE NOT EXISTS ( SELECT A.product_id, A.product_name, B.product_id, B.order_id, C.order_id, C.customer_id, D.* FROM product.product A, sale.order_item B, sale.orders C, sale.customer D WHERE A.product_id = B.product_id AND B.order_id = C.order_id ...
create table sample.LastName ( LastNameId int identity(1, 1) not null primary key clustered, Name varchar(50) );
■問題文 ユーザテーブル(usr)、アンケート回答テーブル(quest)それぞれに含まれるユーザ氏名を比較し、双方に含まれるデータのみを取り出してみましょう。 ■実行文 # 氏名を取得 SELECT CONCAT(u.l_name, u.f_name) AS 氏名 # ユーザテーブルとアンケート回答テーブルを氏名が一致することを条件に内部結合し、その結果から氏名を取得 FROM usr AS u INNER JOIN quest AS q ON q.name = CONCAT(u.l_name, u.f_name) ; ■返却値 mysql> SELECT -> CONCAT(u.l_name, u.f_name)...
-- -- Update sql for MailWizz EMA from version 1.3.8.4 to 1.3.8.5 --
/*Query the list of CITY names from STATION that either do not start with vowels or do not end with vowels. Your result cannot contain duplicates.*/ select distinct city from station where city not in (select city from station where LEFT(CITY,1) IN ('a','e','i','o','u')) union select distinct city from station wher...
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 12, 2015 at 01:13 PM -- 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 */;...
select DEAL_NO, TX_CODE, DEAL_TYPE, DEAL_STAT, VOL_OK, CUST_NO, CUST_NAME, CUST_BANK_ID, ID_TYPE, ID_NO, BANK_ACCT, BANK_CODE, PRODUCT_CODE, PRODUCT_NAME, APP_DT, APP_TM, APP_AMT, APP_VOL, SYS_T...
CREATE OR REPLACE PUBLIC SYNONYM vehicle_accident_pkg FOR orient.vehicle_accident_pkg;
CREATE PROCEDURE sp_list_SplSchemes AS SELECT SchemeID, SchemeName FROM Schemes WHERE SchemeType IN (18,19,20,21,22,81,82,84,97,98,99,100) AND Active = 1
/* SQLyog - Free MySQL GUI v5.02 Host - 5.0.19-nt : Database - bank ********************************************************************* Server version : 5.0.19-nt */ create database if not exists `bank`; USE `bank`; /*Table structure for table `account_bal` */ DROP TABLE IF EXISTS `account_bal`; ...
USE sust_archive; INSERT INTO department VALUES(1, "Computer Science and Engineering", "CSE"); INSERT INTO department VALUES(2, "Electrical & Electronic Engineering", "EEE"); INSERT INTO department VALUES(3, "Industrial Production and Engineering", "IPE"); INSERT INTO department VALUES(4, "Physics", "PHY"); INSERT INT...
CREATE DATABASE Agenda USE Agenda CREATE TABLE Usuario( id int primary key identity(1,1), usuario varchar(30), password varchar(30) ) CREATE UNIQUE INDEX IDX_Usuario on usuario(usuario) CREATE TABLE Agenda( id int primary key identity, idUsuario int, nombreContacto varchar(50), telefono varchar(15), email varchar(6...
CREATE Procedure sp_save_SchemeAbstract_Pidilite (@SCHEMENAME NVARCHAR (255), @SCHEMETYPE INT, @VALIDFROM DATETIME , @VALIDTO DATETIME, @PROMPTONLY INT, @MESSAGE NVARCHAR(255), @DESCRIPTION NVARCHAR(255), ...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : lun. 28 sep. 2020 à 14:02 -- Version du serveur : 5.7.26 -- Version de PHP : 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
alter session set nls_date_format = 'RR-MM-DD' / alter session set nls_date_language = 'JAPANESE' / SELECT TO_DATE(20110101) FROM dual /
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 24, 2016 at 11:57 AM -- Server version: 5.5.35-1ubuntu1 -- PHP Version: 5.5.9-1ubuntu4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA...
Create procedure FSU_SP_getNodeID @clientid int AS Begin Select top 1 node from tblclientmaster where clientid= @clientid End
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : jeu. 15 avr. 2021 à 18:19 -- Version du serveur : 10.4.17-MariaDB -- Version de PHP : 7.3.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_S...
DROP TABLE Participant CASCADE; DROP TABLE Equipe CASCADE; DROP TABLE Joueur CASCADE; DROP TABLE Ligue CASCADE; DROP TABLE Resultat CASCADE;
CREATE TABLE `{$prefix}customer` ( `userId` varbinary(31) NOT NULL DEFAULT '', `payments` enum('stripe','authnet') NOT NULL DEFAULT 'stripe' COMMENT 'the payment processor for the customer', `customerId` varbinary(255) NOT NULL DEFAULT '' COMMENT 'the customer id in the payments processor', PRIMARY KEY (`userId...
CREATE OR REPLACE FORCE VIEW "AEROFRANCE_LIAO"."VIEW_FOURNIR" ("PRODNUM", "HISTODATE", "PROPRIX", "SEUIL") AS SELECT "PRODNUM","HISTODATE","PROPRIX","SEUIL" FROM CHEF_GUO.FOURNIR WHERE FOURNUM = 4; CREATE OR REPLACE TRIGGER "AEROFRANCE_LIAO"."MODIFIER_FOURNIR" INSTEAD OF UPDATE ON VIEW_FOURNIR REFERENCI...
-- burwood INSERT INTO `s_region` VALUES (null, 45108, 'Albert Crescent', 3, 'A', 0, 1, 0, 0); INSERT INTO `s_region` VALUES (null, 45108, 'Angel Road', 3, 'A', 0, 1, 0, 0); INSERT INTO `s_region` VALUES (null, 45108, 'Angelo Street', 3, 'A', 0, 1, 0, 0); INSERT INTO `s_region` VALUES (null, 45108, 'Appian Way', 3, 'A'...
CREATE DATABASE EntityRelationsDemo USE [EntityRelationsDemo] ----------------------------------- -- Problem 1. One-To-One Relationship CREATE TABLE Passports( PassportID INT PRIMARY KEY IDENTITY(101, 1), PassportNumber CHAR(8) NOT NULL ) CREATE TABLE Persons( PersonID INT PRIMARY KEY IDENTITY, FirstName VARCHAR...
delete from siopened; delete from spropened; delete from siclosed; delete from sprclosed;
DELETE FROM ft_table LIMIT 5;
CREATE TABLE actor( act_id Integer NOT NULL, act_fname Char(20) NOT NULL, act_lname Char(20) NOT NULL, act_gender Char(1) NOT NULL, CONSTRAINT actor_pk primary key(act_id) ); CREATE TABLE director( dir_id Integer NOT NULL, dir_fname char(20) NULL, dir_lname char(20) NULL, CONSTRAINT director_pk primary key(dir_...
①標準偏差(偏差値より母数が不特定の場合、ばらつき度合いを分かる) elect stddev_pop((unix_timestamp(concat(concat(bd, " "), bt)) - unix_timestamp(concat(concat(ed, " "), et))) / 60) from ( select enter.dt as ed, enter.time as et, enter.id as ea, back.dt as bd, min(back.time) as bt from (select * from activity where activity = 3 and dt = "2012-07-1...
insert into codetable values ('未分配人') insert into codetable values ('已分配人') insert into codetable values ('已禁用') insert into codetable values ('男') insert into codetable values ('女') insert into codetable values ('可用') insert into codetable values ('占用') insert into codetable values ('脏台') insert ...
/* Name: Old external clicks Data source: 4 Created By: Admin Last Update At: 2016-03-15T19:35:30.743768+00:00 */ SELECT date(date_time) AS date FROM (TABLE_QUERY(djomniture:cipomniture_djmansionglobal,'CONCAT(REPLACE(table_id,"_","-"),"-01") BETWEEN STRFTIME_UTC_USEC("{{startdate}}", "%Y-%m-01") and STRFTIME_UTC_USEC...
--/////////////////////////////////////////////////////////////////// select * from xml where transcode = '020613' order by exdate desc; --/////////////////////////////////////////////////////////////// select hdde266,hdde124 from ZB054 select * from zb051 where de011 = 2013 and jsde955 = '101003' jsde127 = 1375 ...
CREATE TABLE users ( id BIGINT AUTO_INCREMENT NOT NULL, nickname VARCHAR(128), PRIMARY KEY(id) ) Engine=INNODB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8mb4;
Account Char Type Code Account Char Type Description Account Char Type Name --BILLING LANGUAGE SELECT DISTINCT 'BILLING LANGUAGE' TYPE, CCLANGUAGE "Account Char Type Code", LANG.LNG_DES "Account Char Type Name", LANG.LNG_DES "Account Char Type Description" FROM CCONTACT_ALL CCA, BILLACC_ADDRESS_ASSIGNMENT BAA, ADDR...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Sep 05, 2020 at 02:38 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
CREATE Procedure sp_Get_InvoiceDetailReceived_Items (@InvoiceID Int) As Select Count(*) from GrnAbstract, InvoiceAbstractReceived IAR Where GrnAbstract.RecdInvoiceID = IAR.InvoiceID and IAR.DocumentID = Isnull((Select DocumentId from InvoiceAbstractReceived IAR2 Where IAR2.InvoiceID = @InvoiceID),N'') ...
grant select on YKT_CUR.T_TRANSDTL to YKT_PORTAL; grant select on YKT_CUR.T_POSDTL to YKT_PORTAL; grant select, insert, delete, index on YKT_CUR.T_MSGLIST to YKT_PORTAL; grant select, insert, delete, index on YKT_CUR.T_CARDVER to YKT_PORTAL; grant select on YKT_CUR.T_DICTIONARY to YKT_PORTAL; grant select on YKT_C...
-- -- PostgreSQL database dump -- -- Dumped from database version 11.2 (Debian 11.2-1.pgdg90+1) -- Dumped by pg_dump version 11.2 (Debian 11.2-1.pgdg90+1) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; S...
create table instructor( i_account char(20) not null, name char(40) not null, password char(40) not null, primary key(i_account)); create table student( s_account char(20) not null, name char(40) not null, password char(40) not null, primary key(s_account)); create table course( id char(6) not null, title char(40) n...
SELECT C.cust_id, O.order_num FROM Customers AS C INNER JOIN Orders AS O ON C.cust_id = O.cust_id; SELECT C.cust_id, O.order_num FROM Customers AS C LEFT OUTER JOIN Orders AS O ON C.cust_id = O.cust_id;
CREATE TABLE color_change ( created_server DATETIME DEFAULT CURRENT_TIMESTAMP, latitude REAL NOT NULL, longitude REAL NOT NULL, color INTEGER NOT NULL, accuracy REAL, position_timestamp DATETIME, x INT NOT NULL, y INT NOT NULL ); create table users (username string not null, hashed_password string not...
CREATE DATABASE IF NOT EXISTS yourdb; USE yourdb; CREATE TABLE Order( id INT NOT NULL, name VARCHAR (20) NOT NULL, PRIMARY KEY (id) ); INSERT INTO Order (id,name) VALUES (1, 'IPhone'); INSERT INTO Order (id,name) VALUES (2, 'Book'); INSERT INTO Order (id,name VALUES (3, 'Video'); SELEC...
SELECT m.title FROM movies AS m JOIN stars AS s ON s.movie_id = m.id JOIN people AS p ON p.id = s.person_id WHERE m.id IN ( SELECT m.id FROM movies AS m JOIN stars AS s ON s.movie_id = m.id JOIN people AS p ON p.id = s.person_id WHERE p.name = "Johnny Depp" ) AND p.name = "He...
/* First section of sqlzoo, SELECT basics */ --#1 /* The example shows the population of 'France'. Strings should be in 'single quotes'; Show the population of Germany */ SELECT population FROM world WHERE name = 'Germany' --#2 /* The query shows the population density population/area for each country where the area i...
CREATE TABLE IF NOT EXISTS `parcours` ( `IDPARCOURS` int(20) NOT NULL AUTO_INCREMENT, `NOMPARCOURS` varchar(255) NOT NULL, `DESCRIPTION` varchar(255) NOT NULL, PRIMARY KEY (`IDPARCOURS`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `temoignage` ( `IDTEM` int(20) NOT NULL AUTO_INCREMENT,...
# # phpBB2 - MySQL schema # # $Id: mysql_schema.sql 6749 2006-12-11 23:30:12Z naderman $ # # # Table structure for table 'phpbb_auth_access' # CREATE TABLE phpbb_auth_access ( group_id mediumint(8) DEFAULT '0' NOT NULL, forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL, auth_view tinyint(1) DEFAULT '0' NOT N...
-- ASH report @$ORACLE_HOME/rdbms/admin/ashrpt.sql PRO PRO If you want to preserve script output, execute corresponding scp command below, from a TERM session running on your Mac/PC: HOS echo "scp $HOSTNAME:$PWD/ashrpt_*.* ."
DROP PROCEDURE `MLP_SIGNUP` ; DELIMITER // CREATE DEFINER = `myspac17`@`localhost` PROCEDURE `MLP_SIGNUP` (IN IN_NAME VARCHAR(100), IN IN_EMAIL VARCHAR(50), IN IN_PWD VARCHAR(50), OUT OUT_RTN_CD INT, OUT OUT_RTN_MSG VARCHAR(100), OUT OUT_RTN_ROWS INT ) NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINE...
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; 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 NAMES utf8 */; DROP TABLE IF EXISTS `cale...
select country_id, country from sakila.country WHERE country IN ('Afghanistan', 'Bangladesh', 'China') ;
-- -- DB SCHEMA ------------------------------------------------------------------- --ADD TABLE COUPON_SEARCH_RESULT --CREATE TABLE COUPON_SEARCH_RESULT( -- row_id INTEGER PRIMARY KEY AUTOINCREMENT, -- search_key VARCHAR, -- search_results VARCHAR --);
create user 'twitteruser' identified by 'Pikachu#25'; create user 'twitteradmin' identified by 'RoschdwurschdBud4Ever'; /* In Shell ausführen */ grant select on twitter_monitor.* to 'twitteruser'; grant update, insert on twitter_monitor.users to 'twitteruser'; grant update, insert on twitter_monitor.authorities to 'tw...
ALTER TABLE `logbooks` ADD COLUMN `state` ENUM('Active','Inactive') NOT NULL DEFAULT 'Active' AFTER `status_id`; UPDATE `logbooks` SET `state`='Active' WHERE `status_id`='1'; UPDATE `logbooks` SET `state`='Inactive' WHERE `status_id`='2'; ALTER TABLE `logbooks` DROP COLUMN `status_id`, DROP INDEX `logbooks_st...
CREATE DATABASE IF NOT EXISTS `eshop` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `eshop`;
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 13, 2021 at 08:54 PM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
.output 2i.txt CREATE VIEW frequency_V AS SELECT * FROM frequency UNION SELECT 'q' as docid, 'washington' as term, 1 as count UNION SELECT 'q' as docid, 'taxes' as term, 1 as count UNION SELECT 'q' as docid, 'treasury' as term, 1 as count; SELECT A.docid, SUM(A.count * B.count * C.count) FROM (SELECT * FROM freq...
/* * Calculates the percent of points a student has earned * each day and counts the number of days based on the bins * of percentages. A pivot is performed for display purposes * so bins are now columns/fields instead of row data. */ WITH cte AS ( SELECT Site, StudentID, ServiceCode, CASE WHEN ProgramD...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 02 Jan 2017 pada 03.21 -- Versi Server: 10.1.13-MariaDB -- PHP Version: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT...
CREATE TABLE `acc_account_name` ( `account_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `account_name` varchar(255) NOT NULL, `account_type` int(11) NOT NULL, PRIMARY KEY (`account_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `acn_account_transaction` ( `account_tran_id` int(11) unsigned NOT NULL AUTO_IN...
-- ex28-1_account-test.sql -- 계정을 막 생성하면 table 아무것도 없음. select * from tabs; -- table 생성 권한도 없다. -- 기본적인 권한들을 일일히 부여해주어야 한다. -- system 계정으로 (grant connect, resource to test;)를 이용하여 권한 부여를 한 후 사용 가능. create table tblTest ( seq number primary key );