Working with Tables
A database is nothing but an empty file that will contain the tables our programs will actually use to store data. The data will be stored in the tables as columns and rows that you have been using up to this point in our queries. To put the information in the database, you need objects such as tables and columns to house the data. Table 8.3 lists the information that would be needed for a pet store database.
Pet Name | Tags | Animal | Breed | Favorite Food |
---|---|---|---|---|
Calvin | 1325 | Dog | Dalmatian | Eats Anything |
Sarah | 9526 | Dog | Steak | |
Spike | A256 | Cat | Fussy | Tuna |
Rex | 1 | Dinosaur | T-Rex | Triceratops (tastes like chicken) |
Just as you have to create our databases, you have to create your tables within that database. After ...
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.