Prev | Current Page 402 | Next

Carl Reynolds and Paul Tymann

"Schaum's Outline of Principles of Computer Science"

Following the table name, you must type an open
parenthesis, followed by one or more sets of specifications for the name of each column, the data type of each column,
and attributes of each column (such as allowing nulls or not). After the list of column names, you may optionally
provide one or more table constraints by typing CONSTRAINT, an optional constraint name, and a constraint
type (such as PRIMARY KEY or UNIQUE values). Finally, you must type a close parenthesis and a semicolon.
The database designer is free to specify any name for a table, column, or constraint. The SQL standard
specifies rules for names, but each database vendor has its own rules that vary somewhat from the standard. For
instance, the SQL2003 standard says that names may be up to 128 characters long, but MySQL limits the
designer to 64 characters, and Oracle limits the designer to 30 characters.
The data types for SQL also vary with the vendor of the database management system. In general, these
types are available:
?—? Integer
?—? Number/Numeric (decimal floating point)
?—? Varchar (variable length character strings)
?—? Date/DateTime
?—? Char (character string of fixed length)
You must consult the documentation for your DBMS to determine correct choices for data types.


Pages:
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414
drukarki fiskalne kraków willa karmazyn międzyzdroje www.books61.hobbitstory.com terapia magnetyczna Informacje o hostingu