O'Reilly logo

Microsoft® SQL Server™ 2000 Programming by Example by Carlos Eduardo Rojas, Fernando G. Guerrero

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required