HW6 - 2 values ('TL92','Edge Trimmer',11,'HW',29.95); 1 row...

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

View Full Document Right Arrow Icon
IS 158 HW #6 1.) SQL> edit Wrote file afiedt.buf 1 CREATE TABLE nonappliance 2 (part_num CHAR(4) PRIMARY KEY NOT NULL, 3 description CHAR(15), 4 on_hand DECIMAL(4,0), 5 class CHAR(2), 6* price DECIMAL(6,2)) SQL> / Table created. 2.) SQL> insert into nonappliance 2 select part_num, description, on_hand,
Background image of page 1

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

View Full DocumentRight Arrow Icon
3 class, price 4 from part 5 where class != 'AP'; 5 rows created. 3.) SQL> update nonappliance 2 set description = 'Steam Iron' 3 where part_num = 'AT94'; 1 row updated. 4.) SQL> update nonappliance 2 set price = price * 1.03 3 where class = 'SG'; 2 rows updated.
Background image of page 2
5.) SQL> insert into nonappliance
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2 values ('TL92','Edge Trimmer',11,'HW',29.95); 1 row created. 8.) SQL> alter table nonappliance 2 add ON_HAND_VALUE DECIMAL(7,2); Table altered. SQL> update nonappliance 2 set on_hand_value = on_hand * price; 6 rows updated. 9.) SQL> create table nonappliance_2 2 as select * from nonappliance; Table created. SQL> delete nonappliance; 6 rows deleted. SQL> alter table nonappliance 2 modify description CHAR(30); Table altered. SQL> insert into nonappliance 2 select * from nonappliance_2; 6 rows created....
View Full Document

This note was uploaded on 12/03/2009 for the course INFORMATIO IS 158 taught by Professor Dr.moffitt during the Spring '09 term at CSU Fresno.

Page1 / 5

HW6 - 2 values ('TL92','Edge Trimmer',11,'HW',29.95); 1 row...

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

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