Question
Write Insert Statements following the suggested format (including NULLS and Default Values) that will insert the following entries into the Criminals table. Copy and paste
Write Insert Statements following the suggested format (including NULLS and Default Values) that will insert the following entries into the Criminals table. Copy and paste you Insert statements to your Word Document. Confirm that the new rows have been added by doing a select of the Criminals table and taking a screen shot of the rows in the table and pasting that to the Word Document and each statement must work in oracle sql do not insert them in multiply each statement must be three seperate.
table diffinition: CityJail_5.SQL
DROP TABLE criminals CASCADE CONSTRAINTS; DROP TABLE crimes CASCADE CONSTRAINTS; CREATE TABLE criminals (criminal_id NUMBER(6), last VARCHAR2(15), first VARCHAR2(10), street VARCHAR2(30), city VARCHAR2(20), state CHAR(2), zip CHAR(5), phone CHAR(10), v_status CHAR(1) DEFAULT 'N', p_status CHAR(1) DEFAULT 'N' ); CREATE TABLE crimes (crime_id NUMBER(9), criminal_id NUMBER(6), classification CHAR(1), date_charged DATE, status CHAR(2), hearing_date DATE, appeal_cut_date DATE); ALTER TABLE crimes MODIFY (classification DEFAULT 'U'); ALTER TABLE crimes ADD (date_recorded DATE DEFAULT SYSDATE); ALTER TABLE criminals ADD CONSTRAINT criminals_id_pk PRIMARY KEY (criminal_id); ALTER TABLE criminals ADD CONSTRAINT criminals_vstatus_ck CHECK (v_status IN('Y','N')); ALTER TABLE criminals ADD CONSTRAINT criminals_pstatus_ck CHECK (p_status IN('Y','N')); ALTER TABLE crimes ADD CONSTRAINT crimes_id_pk PRIMARY KEY (crime_id); ALTER TABLE crimes ADD CONSTRAINT crimes_class_ck CHECK (classification IN('F','M','O','U')); ALTER TABLE crimes ADD CONSTRAINT crimes_status_ck CHECK (status IN('CL','CA','IA')); ALTER TABLE crimes ADD CONSTRAINT crimes_criminalid_fk FOREIGN KEY (criminal_id) REFERENCES criminals(criminal_id); ALTER TABLE crimes MODIFY (criminal_id NOT NULL);
Crimnal ID LastFirst Street City State Zip Phone V Status P Status 1015 Fender James Chesapeake VA23320 12 Orange Virginia 1016 Saunder William Rd Beach 23455 7675557443N 78 Boat 1017 PainterJoy PlaceNorfolk VA 22093 7675555454 NStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started