The student table will have the following data: Admno Name Gender Age Place Ashish M Chennai Adarsh M Delhi Akshith M Bangalore Ayush M Delhi Abinandh M Chennai The fields that are not given in the INSERT command will take default values, if it is defined for them, otherwise NULL value will be stored. In the INSERT command the fields that are omitted will have either default value defined or NULL value. . .
. DELETE COMMAND The DELETE command permanently removes one or more records from the table. It removes the entire row, not individual fields of the row, so no field argument is needed. The DELETE command is used as follows : DELETE FROM table-name WHERE condition; For example to delete the record whose admission number is the command is given as follows: DELETE FROM Student WHERE Admno= ; Abinandh M Chennai The following record is deleted from the Student table.
To delete all the rows of the table, the command is used as : DELETE FROM Student; The table will be empty now and could be destroyed using the DROP command (Discussed in section . . . ).
12th Computer Chapter - - . . . UPDATE COMMAND The UPDATE command updates some or all data values in a database.
It can update one or more records in a table. The UPDATE command specifies the rows to be changed using the WHERE clause and the new data using the SET keyword. The command is used as follows: UPDATE <table-name> SET column-name = value, column-name = value,… WHERE condition; For example to update the following fields: UPDATE Student SET Age = WHERE Place = ῾Bangalore᾿; The above command will change the age to for those students whose place is “Bangalore”. The table will be as updated as below: Admno Name Gender Age Place Ashish M Chennai Adarsh M Delhi Akshith M Bangalore Ayush M Delhi To update multiple fields, multiple field assignment can be specified with the SET clause