Advanced SQL - AdvancedSQL About the relational set...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Advanced SQL About the relational set operators UNION, UNION ALL, INTERSECT, and MINUS How to use the advanced SQL JOIN operator syntax About the different types of subqueries and correlated queries How to use SQL functions to manipulate dates, strings, and other data How to create and use updatable views How to create and use triggers and stored procedures How to create embedded SQL Setup DROP TABLE PRODUCT; DROP TABLE VENDOR; CREATE TABLE VENDOR LIKE CH07_SALES.VENDOR; INSERT INTO VENDOR SELECT * FROM CH07_SALES.VENDOR; ALTER TABLE VENDOR ADD PRIMARY KEY (V_CODE); CREATE TABLE PRODUCT LIKE CH07_SALES.PRODUCT; INSERT INTO PRODUCT SELECT * FROM CH07_SALES.PRODUCT; ALTER TABLE PRODUCT ADD PRIMARY KEY (P_CODE); ALTER TABLE PRODUCT ADD FOREIGN KEY (V_CODE) REFERENCES VENDOR ON DELETE SET NULL ON UPDATE RESTRICT; CREATE TABLE CUSTOMER LIKE CH07_SALES.CUSTOMER; INSERT INTO CUSTOMER SELECT * FROM CH07_SALES.CUSTOMER; ALTER TABLE CUSTOMER ADD PRIMARY KEY (CUS_CODE); CREATE TABLE CUSTOMER_2 LIKE CH07_SALES.CUSTOMER_2; INSERT INTO CUSTOMER_2 SELECT * FROM CH07_SALES.CUSTOMER_2; ALTER TABLE CUSTOMER_2 ADD PRIMARY KEY (CUS_CODE); Setup (cont) CREATE TABLE INVOICE LIKE CH07_SALES.INVOICE; INSERT INTO INVOICE SELECT * FROM CH07_SALES.INVOICE;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Advanced SQL - AdvancedSQL About the relational set...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online