Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 82 - 2629_Devagiri_C-8
P. 82

    For example, to find the StudentID and FirstName where Age is 16 and FirstName is ‘Saanvi’, use
                      the following SELECT command:

                                                                 Ask
                                                                           AGENT
                                                            OrangeAI
                        Create a Students table in the school database with the fields ID, Name, Class, Percentage and City.
                        Then, find the students who have a percentage above 80.

                               Study

                             UPDATING RECORDS IN A TABLE

                      To modify  existing  records in a table,  use  the UPDATE command.  The basic  syntax  for  the
                      UPDATE command is as follows:

                      UPDATE table_name SET Column = value WHERE condition;
                      To change the LastName and Address of the student having 32 as StudentID, use the following
                      command:

                             DELETING RECORDS FROM A TABLE

                      The DELETE command is used to remove records from a table. It can be used in two ways:

                          Without WHERE clause               With the WHERE clause
                      A specific  record can be  removed  using  the  WHERE clause  with the  DELETE command.  If  the

                      DELETE command is used without the WHERE clause, all the records in the table will be removed.
                      Here is the command to remove the record of a student whose FirstName is Dev:

                       80
                            Premium Edition-VIII

| 77 78 79 80 81 82 83 84 85 86 87 |