calculated columns, 135–137
CALL (reserved word), 465
CALLER option, 344
Camel Case naming standard, 112
CASCADE (reserved word), 460, 462
CASCADED (reserved word), 462, 465
CASE command, 382–384, 454–455
CASE (reserved word), 460, 462
CAST() function, 169–171, 473
CAST (reserved word), 462, 465
catalog procedures
sp_column_privileges, 483
sp_column_privileges_ex, 483
sp_columns, 483
sp_columns_ex, 483
sp_databases, 484
sp_fkeys, 484
sp_pkeys, 484
sp_server_info, 484
sp_special_columns, 484
sp_sproc_columns, 484
sp_statistics, 484
sp_stored_procedures, 484
sp_table_privileges, 484
sp_table_privileges_ex, 484
sp_tables, 484
CATALOG (reserved word), 462, 465
CATALOG_NAME view, 516
catalogs, managing and populating, 304–313
categories of application programming models, 398–399
CEILING() function, 193, 475
CHAR() function, 182, 478
CHAR (reserved word), 462, 465
CHARACTER (reserved word), 463, 465
CHARACTER_LENGTH (reserved word), 463
CHARACTER_MAXIMUM_LENGTH view, 510, 512, 514, 515
CHARACTER_OCTET_LENGTH view, 510, 512, 514, 515
CHARACTER_SET_CATALOG view, 511, 512, 514, 515
CHARACTER_SET_NAME view, 511, 512, 514, 515
CHARACTER_SET_SCHEMA view, 511, 512, 514, 515
CHARINDEX() function, 184–185, 478
CHAR_LENGTH (reserved word), 462
check constraints, 324, 333–334
CHECK (reserved word), 460, 463
CHECK_CONSTRAINTS views
CONSTRAINT_CATALOG view, 509
CONSTRAINT_CLAUSE view, 509
CONSTRAINT_NAME view, 509
CONSTRAINT_SCHEMA view, 509
CHECK_OPTION view, 518
checkpoint, 273–274
CHECKPOINT (reserved word), 460
checksum functions
BINARY_CHECKSUM() function, 473
CHECKSUM() function, 473
CHECKSUM_AGG() function, 473
CLASS (reserved word), 465
client/server database solutions
application programming models, 401–404
event-handling code, 403–404
overview, 401–402
user interface, 402–403
client/server processes, 42
CLOB (reserved word), 465
CLOSE (reserved word), 460, 463
clustered index, 324
CLUSTERED (reserved word), 460
COALESCE() function, 200, 202–203, 480
COALESCE (reserved word), 460, 463
Codd, Edger (relational database design), 31
COLLATE (reserved word), 460, 463
COLLATION (reserved word), 463, 465
COLLATION_CATALOG view, 511, 512, 514, 515
COLLATION_NAME view, 511, 512, 514, 515
COLLATIONPROPERTY() function, 200, 480
COLLATION_SCHEMA view, 511, 512, 514, 515
COL_LENGTH() function, 194, 476
COL_NAME() function, 194, 476
column aliasing, 134–135
COLUMN (reserved word), 460, 463
COLUMN_DEFAULT view, 510, 514
COLUMN_DOMAIN_USAGE views
COLUMN_NAME view, 510
DOMAIN_CATALOG view, 509, 510
DOMAIN_NAME view, 509
DOMAIN_SCHEMA view, 509
TABLE_CATALOG view, 509
TABLE_NAME view, 510
TABLE_SCHEMA view, 510
COLUMN_NAME view, 510, 511, 513, 514, 518
COLUMN_PRIVILEGES views
COLUMN_NAME view, 510
GRANTEE view, 510
GRANTOR view, 510
IS_GRANTABLE view, 510
PRIVILEGE_TYPE view, 510
TABLE_CATALOG view, 510
TABLE_NAME view, 510
TABLE_SCHEMA view, 510
COLUMNPROPERTY() function, 194, 476
columns
choosing, 128–132
overview, 5, 8
COLUMNS views
CHARACTER_MAXIMUM_LENGTH view, 510
CHARACTER_OCTET_LENGTH view, 510
CHARACTER_SET_CATALOG view, 511
CHARACTER_SET_NAME view, 511
CHARACTER_SET_SCHEMA view, 511
COLLATION_CATALOG view, 511
COLLATION_NAME view, 511
COLLATION_SCHEMA view, 511
COLUMN_DEFAULT view, 510
DATA_TYPE view, 510
DATETIME_PRECISION view, 511
DOMAIN_CATALOG view, 511
DOMAIN_NAME view, 511
DOMAIN_SCHEMA view, 511
IS_NULLABLE view, 510
NUMERIC_PRECISION view, 510
NUMERIC_PRECISION_RADIX view, 510
NUMERIC_SCALE view, 511
ORDINAL_POSITION view, 510
command syntax reference
ALTER TABLE command, 457
CASE command, 454–455
COMPUTE BY clause, 454
COMPUTE clause, 454
CREATE DATABASE command, 457
CREATE DEFAULT command, 457
CREATE PARTITION FUNCTION command, 459
CREATE PARTITION SCHEME command, 459
CREATE PROCEDURE command, 457
CREATE RULE command, 458
CREATE SCHEMA command, 458–459
CREATE TABLE command, 458
CREATE TRIGGER command, 458
CREATE VIEW command, 458
DECLARE @ local_variable command, 455–456
DELETE command, 455
EXCEPT command, 453
FOR clause, 454
FROM command, 451–452
GROUP BY command, 452–453
HAVING command, 453
INSERT command, 455
INTERSECT command, 453
LIKE operator, 456–457
object reference, 449
ODBC reserved words, 462–464
OPTION clause, 454
ORDER BY command, 454
reserved words, 459–466
script comment conventions, 459
SELECT command, 450–451
SELECT INTO command, 451
SET operator, 456
TOP command, 451
UNION command, 453
UPDATE command, 455
WHERE command, 452
WITH command, 450
command-line scripting, 99–101
comments
comment block, 459
in-line comment, 459
overview, 112–114
single-line comment, 459
COMMIT (reserved word), 460, 463
comparison operators, 140–148
COMPLETION (reserved word), 465
complexity, hiding, 364–365
component transaction management, 409
COMPUTE BY clause, 228, 454
COMPUTE clause, 225–228, 454
COMPUTE (reserved word), 460
conceptual design, 27–28
conditional logic, 380–382
configuration variables
@@DATEFIRST, 467
@@DBTS, 467
@@ERROR, 167–168
@@LANGID, 467
@@LANGUAGE, 468
@@LOCK_TIMEOUT, 468
@@MAX_CONNECTIONS, 468
@@MAX_PRECISION, 468
@@MICROSOFTVERSION, 468
@@NESTLEVEL, 468
@@OPTIONS, 468–469
overview, 167
@@REMSERVER, 469
@@SERVERNAME, 469
@@SERVICENAME, 168, 469
@@TEXTSIZE, 469
@@TOTAL_ERRORS, 168
@@TOTAL_READ, 168
@@VERSION, 169, 469
Configure SQL XML Support in IIS option, 49
CONNECT (reserved word), 463, 465
connection pooling, 408
CONNECTION (reserved word), 463, 465
connections, 16
@@CONNECTIONS, 204, 470
Consensus Soundex (Russell & Odell), 302
CONSTRAINT (reserved word), 461, 463
CONSTRAINT_CATALOG view, 509, 511, 512, 513, 517
CONSTRAINT_CLAUSE view, 509
CONSTRAINT_COLUMN views
COLUMN_NAME view, 511
CONSTRAINT_CATALOG view, 511
CONSTRAINT_NAME view, 511
CONSTRAINT_SCHEMA view, 511
TABLE_CATALOG view, 511
TABLE_NAME view, 511
TABLE_SCHEMA view, 511
CONSTRAINT_COLUMN_USAGE view, 511
CONSTRAINT_NAME view, 509, 511, 512, 513, 517
constraints, 331–336
CONSTRAINTS (reserved word), 463, 465
CONSTRAINT_SCHEMA view, 509, 511, 512, 513, 517
CONSTRAINT_TABLE_USAGE views
CONSTRAINT_CATALOG view, 511
CONSTRAINT_NAME view, 511
CONSTRAINT_SCHEMA view, 511
TABLE_CATALOG view, 511
TABLE_NAME view, 511
TABLE_SCHEMA view, 511
CONSTRAINT_TYPE view, 517
CONSTRUCTOR (reserved word), 465
CONTAINS predicate, 314–317
CONTAINS (reserved word), 461
CONTAINSTABLE predicate, 317–318
CONTAINSTABLE (reserved word), 461
CONTINUE (reserved word), 461, 463
conversion functions
CAST() function, 169–171, 473
CONVERT() function, 161, 172–174, 473
CURSOR_STATUS() function, 474
overview, 169, 473
STR() function, 174–175
CONVERT (reserved word), 461, 463
correlated subqueries, 290–291
CORRESPONDING (reserved word), 463, 465
COS() function, 193, 475
COT() function, 193, 475
COUNT() function, 166, 208, 208–209, 472
COUNT (reserved word), 463
COUNT_BIG() function, 208, 472
@@CPU_BUSY, 204, 470
CREATE DATABASE command, 457
CREATE DEFAULT command, 457
CREATE FUNCTION statement, 344
CREATE PARTITION FUNCTION command, 459
CREATE PARTITION SCHEME command, 459
CREATE PROCEDURE command, 340–343, 457
CREATE (reserved word), 461, 463
CREATE RULE command, 458
CREATE SCHEMA command, 458–459
CREATE statement, 117, 322
CREATE TABLE command, 325–330, 458
CREATE TRIGGER command, 458
CREATE VIEW command, 336–339, 458
CREATED view, 516
cross joins, 243
CROSS (reserved word), 461, 463
CUBE (reserved word), 465
CURRENT (reserved word), 461, 463
CURRENT_DATE (reserved word), 461, 463
currentness of data, 400
CURRENT_PATH (reserved word), 465
CURRENT_ROLE (reserved word), 465
CURRENT_TIME (reserved word), 461, 463
CURRENT_TIMESTAMP() function, 200, 480
CURRENT_TIMESTAMP (reserved word), 461, 463
CURRENT_USER() function, 200, 480
CURRENT_USER (reserved word), 461, 463
cursor functions and variables
@@CURSOR_ROWS, 176
CURSOR_STATUS() function, 176
@@FETCH_STATUS, 176
overview, 175–176, 469, 474
cursor management procedures
sp_add_data_file_recover_suspect_db, 485
sp_addextendedproc, 485
sp_addextendedproperty, 485
sp_add_log_file_recover_suspect_db, 485
sp_add_maintenance_plan, 489
sp_add_maintenance_plan_db, 489
sp_add_maintenance_plan_job, 489
sp_addmessage, 485
sp_addtype, 485
sp_addumpdevice, 485
sp_altermessage, 485
sp_attach_db, 485
sp_attach_single_file_db, 485
sp_autostats, 485
sp_bindefault, 485
sp_bindrule, 485
sp_bindsession, 485
sp_certify_removable, 485
sp_configure, 485
sp_create_removable, 486
sp_createstats, 486
sp_cursor_list, 484
sp_cycle_errorlog, 486
sp_datatype_info, 486
sp_dbcmptlevel, 486
sp_dboption, 486
sp_dbremove, 486
sp_delete_backuphistory, 486
sp_delete_maintenance_plan, 489
sp_delete_maintenance_plan_db, 489
sp_delete_maintenance_plan_job, 489
sp_depends, 486
sp_describe_cursor, 484
sp_describe_cursor_columns, 484
sp_describe_cursor_tables, 484
sp_detach_db, 486
sp_dropdevice, 486
sp_dropextendedproc, 486
sp_dropextendedproperty, 486
sp_dropmessage, 486
sp_droptype, 486
sp_executesql, 486
sp_getapplock, 486
sp_getbindtoken, 487
sp_help, 487
sp_helpconstraint, 487
sp_helpdb, 487
sp_helpdevice, 487
sp_helpextendedproc, 487
sp_helpfile, 487
sp_helpfilegroup, 487
sp_helpindex, 487
sp_helplanguage, 487
sp_help_maintenance_plan, 489
sp_helpserver, 487
sp_helpsort, 487
sp_helpstats, 487
sp_helptext, 487
sp_helptrigger, 487
sp_indexoption, 487
sp_invalidate_textptr, 487
sp_lock, 488
sp_monitor, 488
sp_procoption, 488
sp_recompile, 488
sp_refreshview, 488
sp_releaseapplock, 488
sp_rename, 488
sp_renamedb, 488
sp_resetstatus, 488
sp_serveroption, 488
sp_setnetname, 488
sp_settriggerorder, 488
sp_spaceused, 488
sp_tableoption, 488
sp_unbindefault, 488
sp_unbindrule, 488
sp_updateextendedproperty, 488
sp_updatestats, 488
sp_validname, 488
sp_who, 488
CURSOR (reserved word), 461, 463
cursor variables
@@CURSOR_ROWS, 469
@@FETCH_STATUS, 469
@@CURSOR_ROWS, 176, 469
cursors
creating, 297–298
FETCH NEXT statement, 297–298
INSENSITIVE option, 297
management procedures, 484
navigating, 297–298
overview, 296
rowset versus cursor operations, 296–297
CURSOR_STATUS() function, 176, 474
CYCLE (reserved word), 465