Page 331 - IT 402 v2.0 class 10
P. 331

Ans.  CRE AT E  T AB L E  E M P L O Y E E
                 (
                  EMPID Char (4),
                  EMPNAME Varchar (15),
                  DESIGN Varchar (20),
                 SAL ARY  D ecimal
                 ) ;
               5.  ............................. command is used to create a new table in a database.
                   a   New                                         b    reate
                   c    lter                                       d   Select

              ns.   b
               6.  Write SQL query to create the Table Flight with the following structure :                   [2018]








             Ans.  CRE AT E  T AB L E  F L I G H T
                 (
                  Flight_ID Char (4),
                  Flight_ID Varchar (25),
                  Source Varchar (30),
                  Destination Varchar (30)
                 ) ;
               7.  Consider the following table and answer the following :                                     [2018]








                  a   Identify suitable  rimary  ey from the above table.
                  b    dd a new record with the following data :
                                ardiology      S     inita  ahi
                  c    rite a select  uery to display records of those  octors whose O      S are  M F .
              ns.   a   I
                    b   I NSE RT  I NT O  D O CT O R ( I D ,  D ep ar tment,  O P D _ D AY S,  D octor _ Name)
                     VALUES ('H608', 'Cardiology', 'TTS', 'Vinita Wapi');
                    c   SE L E CT  *  F RO M  D O CT O R W H E RE  O P D _ D AY S = ' M W F ' ,
               8.  What is DDL ? Mention any two DDL statements.                                               [2018]
             Ans.  A   D a t a   D e f in it io n   L a n g u a g e   o r   D a t a   D e s c r ip t io n   L a n g u a g e   (D D L )  is   a   s t a n d a r d   f o r   c o m m a n d s   t h a t   d e f in e   t h e
                 d if f e r e n t   s t r u c t u r e s   in   a   d a t a b a s e .   D D L   s t a t e m e n t s   c r e a t e ,   m o d if y   a n d   r e m o ve   d a t a b a s e   o b j e c t s   s u c h   a s   t a b l e s ,
                 in d e xe s   a n d   u s e r s .   T w o   D D L   s t a t e m e n t s   a r e   C R E A T E   a n d   A L T E R .
               9.  What do you mean by DDL and DML commands?                                                   [2017]
             Ans.     ata   efinition   anguage       :      ata   efinition   anguage  or   ata   escription   anguage         is  a
                    standard for commands that define the different structures in a database.     statements create  modify and
                    remove database objects such as tables, indexes and users. Common DDL statements are CREATE, ALTER,
                    TRUNCATE, RENAME and DROP.
                      ata Mani ulation  anguage   M  :    ata Manipulation language   M   is a language that enables users
                    to retrieve, update, insert and delete data in a database. Common DML statements are SELECT, UPDATE, INSERT
                    INTO and DELETE.


                                                                                       More on Database        329
   326   327   328   329   330   331   332   333   334   335   336