Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CREATE SEQUENCE customer_seq START WITH 1021 INCREMENT BY 1 NOCYCLE NOCACHENOMINVALUE NOMAXVALUE;Sequence created.2.Insert into CUSTOMERS (customer#, lastname, frstname, zip) Values (customer_seq.NEXTVAL,'SHOULDERS', 'FRANK', '23567');1 row(s) inserted.3.CREATE

CREATE SEQUENCE customer_seq START WITH 1021 INCREMENT BY 1 NOCYCLE NOCACHENOMINVALUE NOMAXVALUE;Sequence created.2.Insert into CUSTOMERS (customer#, lastname, frstname, zip) Values (customer_seq.NEXTVAL,'SHOULDERS', 'FRANK', '23567');1 row(s) inserted.3.CREATE SEQUENCE MY_FIRST_SEQ INCREMENT BY -3 START WITH 5 MAXVALUE 5 MINVALUE 0NOCYCLE;Sequence created.4.select MY_FIRST_SEQ.NEXTVAL rom dual;5select MY_FIRST_SEQ.NEXTVAL rom dual;2select MY_FIRST_SEQ.NEXTVAL rom dual;ORA-08004 (goes below MINVALUE)5.ALTER SEQUENCE my_frst_seq MINVALUE -1000;Sequence altered.6.CREATE TABLE Email_Log (emailid NUMBER (10), emaildate DATE, customer# NUMBER (10),CONSTRAINT emailid_pk PRIMARY KEY (emailid));Table created.CREATE SEQUENCE idnumber_seq INCREMENT BY 1 START WITH 1000 NOMINVALUENOMAXVALUE NOCACHE NOCYCLE;Sequence created.INSERT INTO Email_Log (emailid, emaildate, customer#) VALUES (idnumber_seq.NEXTVAL,SYSDATE, 1007);1 row(s) inserted.INSERT INTO Email_Log (emailid, emaildate, customer#) VALUES (DEFAULT, SYSDATE, 1008);

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

List the functions that are served by short-term memory.

Answered: 1 week ago