Data Definition Language (DDL)
The Data DefinitionLanguage is used to create and manage databases and database objects, such as tables, stored procedures, user-defined functions, triggers, views, defaults, indexes, rules, and statistics. Transact-SQL provides a CREATEand a DROP statement for all these elements. Listing 2.1 shows the creation and removal of a table in the Northwind database.
Code Listing 2.1. Creating a Table Using the CREATE TABLE Statement
USE Northwind CREATE TABLE Employeedependents ( dependentid INT IDENTITY(1,1), lastname VARCHAR(20), firstname VARCHAR(20), ) GO The command(s) completed successfully. |
In addition to
Get Microsoft® SQL Server™ 2000 Programming by Example 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.