Using DDL Statements

Data-definition-language statements (DDL) are a subset of SQL that let you create, modify, and delete database objects. Although most modern databases allow you to do this through a graphical interface, there are times when you might have to do it programmatically, such as within a stored procedure or script. Although a comprehensive discussion of DDL is beyond the scope of this book, we will introduce some of the more-frequently used statements.

Note

The DDL syntax presented in this section does notwork with Microsoft Access but has been tested successfully on SQL Server.

Defining Tables with DDL Statements

Three DDL statements are available to define database tables:

  • CREATE TABLE— Defines a new table in a database

Get Special Edition Using Microsoft® Visual Basic® .NET 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.