« speakers last thursday! | Main | oracle question »
When creating tables in sql, do you have to designate foreign keys somehow or do you just put them in as regular attributes?
sql question
Posted by: khalid | November 24, 2004 at 09:09 PM
Pls let me know the answer
Table : Salsman
salman_id salsman_name id001 samson id002 christy id003 francis
Table : Product
P_id p_name
P001 pencil P002 pen P003 note book
Table : Sales
Salsman_ID product_id Quanty
id001 p001 100 id002 p002 50 id001 p001 90 id001 p001 50 id003 p002 100 id001 p002 50 id002 p002 50
what is the query to retrive the following resultset
salsman_id P001 p002 p003 .... id001 240 50 0 id002 0 100 0 id003 0 100 0
Pls mail me the query immediately
Posted by: samson | November 27, 2004 at 01:43 AM
The comments to this entry are closed.
sql question
Posted by: khalid | November 24, 2004 at 09:09 PM
Pls let me know the answer
Table : Salsman
salman_id salsman_name
id001 samson
id002 christy
id003 francis
Table : Product
P_id p_name
P001 pencil
P002 pen
P003 note book
Table : Sales
Salsman_ID product_id Quanty
id001 p001 100
id002 p002 50
id001 p001 90
id001 p001 50
id003 p002 100
id001 p002 50
id002 p002 50
what is the query to retrive the following resultset
salsman_id P001 p002 p003 ....
id001 240 50 0
id002 0 100 0
id003 0 100 0
Pls mail me the query immediately
Posted by: samson | November 27, 2004 at 01:43 AM