Tables
Tables are database objects that contain all the data in a database. In tables, data is logically organized in a row-and-column format similar to a spreadsheet. Each row represents a unique record, and each column represents a field in the record. For example, a table that contains employee data for a company might contain a row for each employee and columns representing employee information such as employee number, name, address, job title, and home telephone number.
-
The number of tables in a database is limited only by the number of objects allowed in a database (2,147,483,647). A standard user-defined table can have up to 1,024 columns. The number of rows in the table is limited only by the storage capacity of the server.
-
You can assign properties to the table and to each column in the table to control the data that is allowed and other properties. For example, you can create constraints on a column to disallow null values or provide a default value if a value is not specified, or you can assign a key constraint on the table that enforces uniqueness or defines a relationship between tables.
-
The data in the table can be compressed either by row or by page. Data compression can allow more rows to be stored on a page. For more information, see Data Compression.
The following table provides links to common tasks associated with creating or modifying a table.
|
Table Tasks |
Topic |
|---|---|
|
Describes how to create a table. |
|
|
Describes how to delete a table. |
|
|
Describes how to create a new table that contains some or all of the columns in an existing table. |
|
|
Describes how to rename a table. |
|
|
Describes how to view the properties of the table. |
|
|
Describes how to determine whether other objects such as a view or stored procedure depend on a table. |
The following table provides links to common tasks associated with creating or modifying columns in a table.
|
Column Tasks |
Topic |
|---|---|
|
Describes how to add columns to an existing table. |
|
|
Describes how to delete columns from a table. |
|
|
Describes how to change the name of a column. |
|
|
Describes how to copy columns from one table to another, copying either just the column definition, or the definition and data. |
|
|
Describes how to modify a column definition, by changing the data type or other property. |
|
|
Describes how to change the order in which the columns appear. |
|
|
Describes how to create a computed column in a table. |
|
|
Describes how to specify a default value for a column. This value is used if another value is not supplied. |