



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Product_n o Description Profit_perc ent UOM Qty_on_h and Reorder_ lvl Sell_pri ce Cost_ Price P00001 1.44 Floppies 5 Piece 100 20 525 500 P03453 Monitors 6 Piece 10 3 12000 11280 P06734 Mouse 5 Piece 20 5 1050 1000 P07865 1.22 Floppies 5 Piece 100 20 525 500 P07868 Keyboard 2 Piece 10 3 3150 3050 P07885 CD Drive 2.5 Piece 10 3 5250 5100 P07965 540 HDD 4 Piece 10 3 8400 8000 P07975 1.44 Drive 5 Piece 10 3 1050 1000 P08865 1.22 Drive 5 Piece 2 3 1050 1000
Problems:- 1. Find the products with descriptions ‘1.44 Drive’ and ‘1.22 Drive’.
Column Name Data Type Size Attribute Constraints S_order_no Varchar2 6 Primary Key/Foreign Key references s_order_no Of Sales_Order table product_no Varchar2 6 Primary Key/Foreign Key references product_no Of Product_Master table Qty_ordered Number 8 Qty_desp Number 8 Product_rate Number 10,
Column Name Data Type Size Attribute Constraints challan_no Varchar2 6 Primary Key/ First two letter to start with ‘CH’. S_ordert_no Varchar2 6 Foreign Key references s_order_no of sales_order table challan_date (^) Date Not null Billed_yn varchar2 1 ‘Y’ or ‘N’ Default is ‘N’ Challan_Header:- Write the SQL commands for, a) creating the above ‘Challan_Header’ table. b) inserting the values- CH9001,O19001,12-dec-95, Y CH6865,O46865,12-nov-95, Y CH3965,O10008,12-oct-95, N c) Displaying challan numbers more than CH6000 and billed one. Challan_Header