From the course: SQL Server 2008 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Creating tables - SQL Server Tutorial
From the course: SQL Server 2008 Essential Training
Creating tables
To create new tables, we need to drill into the database. We want to add those tables too, then expand the Tables folder and just right-click it and select New Table. Now you would expect to first say what the table is called but in fact your cursor is blinking away now at a column name. That's because it's giving you this temporary title for the table here, Table_1. We will get the chance to change that in just a minute but I'm going to describe a few columns because apparently that's what I have to do here. Let's say what I wanted to do was create a table to hold employee information. So I have got things like employee first name, employee last name, date joined, birth date, phone, that kind of thing. So I'm going to just create a few simple columns here. The first would be FirstName. Again I'm splitting this up into first name and last name rather than just having a whole name. Then when I hit Tab, it gives me a drop-down of Data Type. This is, again, the type of data that this is…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Planning your database9m 39s
-
(Locked)
Creating a SQL Server database4m 7s
-
(Locked)
Creating tables7m 50s
-
Data types in SQL Server12m 25s
-
(Locked)
Defining keys8m 9s
-
(Locked)
Creating default values4m 39s
-
(Locked)
Creating check constraints2m 25s
-
(Locked)
Creating unique constraints4m 34s
-
Introduction to relationships and foreign keys9m 51s
-
(Locked)
Creating relationships in SQL Server Management Studio8m 14s
-
(Locked)
Database normalization11m 47s
-
(Locked)
Creating computed columns3m 10s
-
-
-
-
-
-
-
-
-
-
-
-