O'Reilly logo

SQL: Visual QuickStart Guide by Chris Fehily

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

Displaying a Table’s Column Definitions

To use INSERT, UPDATE, or DELETE, you’ll need to know the column definitions of the table whose data you’re modifying, including:

  • The order of the columns in the table

  • Each column’s name

  • Each column’s data type

  • Whether a column is a key (or part of a key)

  • Whether a column’s values must be unique within that column

  • Whether a column permits nulls

  • Each column’s default value (if any)

I gave the column definitions of the sample-database tables in Tables 2.2 through 2.6 in “The Sample Database” in Chapter 2, but you can get the same information by using DBMS tools that describe database objects. In this section, I’ll explain how to use those tools to display column definitions.

To display a table’s column definitions ...

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