{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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’; Update
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern