Chapter 5. Creating, Populating, and Deleting Tables
5.1 | Introduction 138 |
5.2 | Creating Tables 138 |
| 5.2.1 Creating a Table Using Column-Definition Lists 139 |
| 5.2.2 Creating a Table Using the LIKE Clause 143 |
| 5.2.3 Deriving a Table and Data from an Existing Table 145 |
5.3 | Populating Tables 147 |
| 5.3.1 Adding Data to All the Columns in a Row 148 |
| 5.3.2 Adding Data to Some of the Columns in a Row 151 |
| 5.3.3 Adding Data with a SELECT Query 155 |
5.4 | Integrity Constraints 156 |
| 5.4.1 Defining Integrity Constraints 156 |
| 5.4.2 Types of Integrity Constraints 156 |
| 5.4.3 Preventing Null Values with a NOT NULL Constraint 157 |
| 5.4.4 Enforcing Unique Values with a UNIQUE Constraint 160 |
| 5.4.5 Validating Column Values with a CHECK Constraint 162 |
| 5.4.6 Referential Integrity Constraints 164 |
| 5.4.7 Establishing a Primary Key 165 |
| 5.4.8 Establishing a Foreign Key 166 |
| 5.4.9 Displaying Integrity Constraints 170 |
5.5 | Deleting Rows in a Table 171 |
| 5.5.1 Deleting a Single Row in a Table 172 |
| 5.5.2 Deleting More Than One Row in a Table 172 |
| 5.5.3 Deleting All Rows in a Table 173 |
5.6 | Deleting Tables 174 |
| 5.6.1 Deleting a Single Table 174 |
| 5.6.2 Deleting Multiple Tables 175 |
| 5.6.3 Deleting Tables Containing Integrity Constraints 176 |
5.7 | Summary 178 |
..................Content has been hidden....................
You can't read the all page of ebook, please click
here login for view all page.