Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Chapter 6 Using and Creating
Datatypes [Table of Contents] Chapter 8 Adding, Changing, and Deleting Data

Transact-SQL User's Guide

[-] Chapter 7 Creating Databases and Tables

Chapter 7

Creating Databases and Tables

This chapter describes how to create databases and tables.

For information on managing databases, see the System Administration Guide.

[-] What are databases and tables?
Enforcing data integrity in databases
Permissions within databases
[-] Using and creating databases
Choosing a database: use
[+] Creating a user database: create database
Altering the sizes of databases
Dropping databases
[-] Creating tables
Maximum number of columns per table
Example of creating a table
Choosing table names
create table syntax
[+] Allowing null values
[+] Using IDENTITY columns
[+] Using temporary tables
Creating tables in different databases
[-] Managing identity gaps in tables
Parameters for controlling identity gaps
[+] Comparison of identity burning set factor and identity_gap
[+] Setting the table-specific identity gap
Changing the table-specific identity gap
Displaying table-specific identity gap information
Gaps due to insertions, deletions, identity grab size, and rollbacks
If table inserts reach the IDENTITY column's maximum value
[-] Defining integrity constraints for tables
Specifying table-level or column-level constraints
Creating error messages for constraints
After creating a check constraint
Specifying default column values
Specifying unique and primary key constraints
[+] Specifying referential integrity constraints
Specifying check constraints
Designing applications that use referential integrity
[-] How to design and create a table
Make a design sketch
Create the user-defined datatypes
Choose the columns that accept null values
Define the table
[-] Creating new tables from query results: select into
Checking for errors
[+] Using select into with IDENTITY columns
[-] Altering existing tables
Objects using select * do not list changes to table
Using alter table on remote tables
[+] Adding columns
[+] Dropping columns
[+] Modifying columns
[+] Adding, dropping, and modifying IDENTITY columns
[+] Data copying
Modifying locking schemes and table schema
[+] Altering columns with user defined datatypes
[+] Errors and warnings from alter table
[+] Renaming tables and other objects
Dropping tables
Assigning permissions to users
[-] Getting information about databases and tables
Getting help on databases
[+] Getting help on database objects


Getting information about
datatypes [Table of Contents] What are databases and tables?