Summary

In today's lesson, you took a quick look at creating and dropping tables. You saw that when creating a table, each column requires a name, a data type, a length (where needed), and an indication of whether it can be NULL.

After you had a table, you saw how to insert data into the table by using different versions of the INSERT statement. Data can be added to a table by specifying the input values directly, or by selecting information from other tables in the database. After adding information to a table, you saw how to use the UPDATE statement to modify that information.

Later, you took a brief look at how to delete one or more rows from a table. Finally, you learned how to use the TRUNCATE TABLE statement to remove all rows from a table ...

Get Sams Teach Yourself Transact-SQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.