CBSE Computer Science - Revision Tour(Solved) CBSE Guess > eBooks > Class XII > CBSE Computer Science Structure Query Language Solved Revision Tour By Mr. Ravi Kiran COMPUTER SCIENCE STRUCTURED QUERY LANGUAGE Warning: include(../../../ads_330x250_middle.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science1/structurequery_language4.php on line 23 Warning: include(): Failed opening '../../../ads_330x250_middle.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science1/structurequery_language4.php on line 23 Delhi 2007: 5.b) Consider the following tables. Write SQL command for the statements (i)to(iv)and give outputs for the SQL quries (v) to (viii). 6 TABLE : SENDER
TABLE :RECIPIENT
(i) To display the names of all senders from Mumbai. Ans: Select * from Sender where SenderCity =’Mumbai’; (ii) To display the recID, senderName, senderAddress, RecName, RecAddress for every recipt. Ans: Select recID, SenderName, SenderAddress, RecName, RecAddress from Sender, Recipient where Sender.Senderid=Recipient.RenderId; (iii) To display the sender details in ascending order of SenderName. Ans: Select * from Sender order by SenderName; (iv) To display number of Recipients from each city. Ans: Select RecCity,Count(*) from Recipient group by RecCity;
(v) SELECT DISTINCT SenderCity FROM
Sender; Ans:
CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( [email protected] ) |
Warning: include(../../../120_60_others.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science1/structurequery_language4.php on line 189 Warning: include(): Failed opening '../../../120_60_others.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science1/structurequery_language4.php on line 189 |