Delet_Truncate_Drop - How to insert data into the table...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
How to insert data into the table Insert into keyword is followed by the table name. In the first parenthesis you list the names of the table columns, and in the second parenthesis you list the values for each corresponding column. The columns don’t have to be listed in the same order as in the table definition. How to update data For example, let’s change everyone’s grade to A. Update DBST651_Students set grade='A'; If you want to change the grade only for a student with id equal 9. Update DBST651_Students set grade='A' where studentId=9; How to delete data Delete from is a keyword followed by the table name. When you run the first statement, all data from you table will be deleted because the condition is not specified. What is the difference between the following two statements? 1. Delete from DBST651_Students; 2. Delete from DBST651_Students where grade=’B’; How to drop the table Insert into table_name (Column names) values (column values); Update table_name set column_name=’value’;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/22/2009 for the course DBST DBST 651 taught by Professor Yelena - ta during the Spring '09 term at MD University College.

Page1 / 3

Delet_Truncate_Drop - How to insert data into the table...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online