Table 7-1 provides a brief description of the commands in this chapter.
Command |
Description |
---|---|
Increases the amount of space allocated to a database. |
|
Defines mutually exclusive relationships between roles and adds, drops, and changes passwords for roles. |
|
Adds new columns; adds, changes, or drops constraints, changes constraints; partitions or unpartitions an existing table. |
|
Encloses a series of SQL statements so that control-of-flow language, such as if...else, can affect the performance of the whole group. |
|
Marks the starting point of a user-defined transaction. |
|
Causes an exit from a while loop. break is often activated by an if test. |
|
Allows SQL expressions to be written for conditional values. case expressions can be used anywhere a value expression can be used. |
|
Writes all dirty pages (pages that have been updated since they were last written) to the database device. |
|
Deactivates a cursor. |
|
Allows SQL expressions to be written for conditional values. coalesce expressions can be used anywhere a value expression can be used; alternative for a case expression. |
|
Marks the ending point of a user-defined transaction. |
|
Generates summary values that appear as additional rows in the query results. |
|
Specifies the server to which a passthrough connection is required. |
|
Causes the while loop to restart. continue is often activated by an if test. |
|
Creates a new database. |
|
Specifies a value to insert in a column (or in all columns of a user-defined datatype) if no value is explicitly supplied at insert time. |
|
Confirms that the current remote table information matches the information that is stored in column_list, and verifies the existence of the underlying object. |
|
Creates an index on one or more columns in a table. |
|
Creates an abstract query plan. |
|
Creates a stored procedure that can take one or more user-supplied parameters. |
|
Creates a proxy table without specifying a column list. Component Integration Services derives the column list from the metadata it obtains from the remote table. |
|
Creates a user-defined role. |
|
Specifies the domain of acceptable values for a particular column or for any column of a user-defined datatype. |
|
Creates a new collection of tables, views and permissions for a database user. |
|
Creates new tables and optional integrity constraints. |
|
Creates a trigger, a type of stored procedure often used for enforcing integrity constraints. A trigger executes automatically when a user attempts a specified data modification statement on a specified table. |
|
Creates a view, which is an alternative way of looking at the data in one or more tables. |
|
Database Consistency Checker (dbcc) checks the logical and physical consistency of a database. Use dbcc regularly as a periodic check or if you suspect any damage. |
|
Makes a cursor inaccessible and releases all memory resources committed to that cursor. |
|
Declares the name and type of local variables for a batch or procedure. |
|
Defines a cursor. |
|
Removes rows from a table. |
|
Removes statistics from the sysstatistics system table. |
|
Makes a physical device or file usable by Adaptive Server. |
|
Creates a software mirror that immediately takes over when the primary device fails. |
|
Rebuilds the master database’s sysusages and sysdatabases system tables from information contained in sysdevices. Use disk refit after disk reinit as part of the procedure to restore the master database. |
|
Rebuilds the master database’s sysdevices system table. Use disk reinit as part of the procedure to restore the master database. |
|
Reenables disk mirroring after it is stopped by failure of a mirrored device or temporarily disabled by the disk unmirror command. |
|
Disables either the original device or its mirror, allowing hardware maintenance or the changing of a hardware device. |
|
Removes one or more databases from a Adaptive Server. |
|
Removes a user-defined default. |
|
Removes an index from a table in the current database. |
|
Removes user-defined stored procedures. |
|
Removes a user-defined role. |
|
Removes a user-defined rule. |
|
Removes a table definition and all of its data, indexes, triggers, and permission specifications from the database. |
|
Removes a trigger. |
|
Removes one or more views from the current database. |
|
Makes a backup copy of the entire database, including the transaction log, in a form that can be read in with load database. Dumps and loads are performed through Backup Server. |
|
Makes a copy of a transaction log and removes the inactive portion. |
|
Runs a system procedure, a user-defined stored procedure, or a dynamically constructed Transact-SQL command. |
|
Returns a row or a set of rows from a cursor result set. |
|
Branches to a user-defined label. |
|
Assigns permissions to users or to user-defined roles. |
|
Used in select statements to divide a table into groups and to return only groups that match conditions in the having clause. |
|
Imposes conditions on the execution of a SQL statement. |
|
Adds new rows to a table or view. |
|
Kills a process. |
|
Loads a backup copy of a user database, including its transaction log. |
|
Loads a backup copy of the transaction log. |
|
Explicitly locks a table within a transaction. |
|
Allows SQL expressions to be written for conditional values. nullif expressions can be used anywhere a value expression can be used; alternative for a case expression. |
|
Marks a database available for public use after a normal load sequence and, if needed, upgrades a loaded database and transaction log dumps to the current version of Adaptive Server. |
|
Opens a cursor for processing. |
|
Returns query results in the specified column(s) in sorted order. |
|
Used by DB-Library™ in a two-phase commit application to see if a server is prepared to commit a transaction. |
|
Prints a user-defined message on the user’s screen. |
|
Suspends and resumes updates to a specified list of databases. |
|
Prints a user-defined error message on the user’s screen and sets a system flag to record that an error condition has occurred. |
|
Reads text and image values, starting from a specified offset and reading a specified number of bytes or characters. |
|
The reconfigure command currently has no effect; it is included to allow existing scripts to run without modification. In previous releases, reconfigure was required after the sp_configure system procedure to implement new configuration parameter settings. |
|
Removes one or more Java-SQL classes, packages, or JARs from a database. Use when Java is enabled in the database. |
|
Reclaims unused space on pages, removes row forwarding, or rewrites all rows in the table to new pages, depending on the option used. |
|
Exits from a batch or procedure unconditionally, optionally providing a return status. Statements following return are not executed. |
|
Revokes permissions or roles from users or roles. |
|
Rolls a user-defined transaction back to the last savepoint inside the transaction or to the beginning of the transaction. |
|
Rolls back the work done in a trigger, including the update that caused the trigger to fire, and issues an optional raiserror statement. |
|
Sets a savepoint within a transaction. |
|
Retrieves rows from database objects. |
|
Sets Adaptive Server query-processing options for the duration of the user’s work session. Can be used to set some options inside a trigger or stored procedure. Can also be used to activate or deactivate a role in the current session. |
|
Allows a Database Owner to impersonate another user. |
|
Shuts down Adaptive Server or a Backup Server™. This command can be issued only by a System Administrator. |
|
Removes all rows from a table. |
|
Returns a single result set that combines the results of two or more queries. Duplicate rows are eliminated from the result set unless the all keyword is specified. |
|
Changes data in existing rows, either by adding data or by modifying existing data; updates all statistics information for a given table; updates information about the number of pages in each partition for a partitioned table; updates information about the distribution of key values in specified indexes. |
|
Specifies the database with which you want to work. |
|
Specifies a specific time, a time interval, or an event for the execution of a statement block, stored procedure, or transaction. |
|
Sets the search conditions in a select, insert, update, or delete statement. |
|
Sets a condition for the repeated execution of a statement or statement block. The statement(s) execute repeatedly, as long as the specified condition is true. |
|
Permits non-logged, interactive updating of an existing text or image column. |