Transact SQL Commands
Comandos de Transact SQL

E , F , G , I , K , L , O , P , R

Comando
Command
Sintaxis Ejemplo
Example
Sirve Para..
Use for...
execute execute execute

Runs a system procedure or a user-defined stored procedure

fetch fetch fetch

Return a row or a set of rows from a cursor result set

goto Label goto Label goto Label

Branches to a user-defined label

grant grant grant

Assign permissions to users

group by and having clauses group by and having Clause group by and having Clause

Used in select statements to divide a table into groups

if ... else if ... else if ... else

Imposes conditions on the execution of a SQL statement. The statement following an if keyword and its condition is executed if the condition is satisfied (when the logical expression returns "true"). The optional else keyword introduces an alternate SQL statement that executes when the if condition is not satisfied (when the expression returns "false")

insert insert insert

Adds new rows to a table or view

kill kill kill

Kills a process

load database load database load database

Loads a backup copy of a user database, including its tranasaction log. The listonly and headeronly options display information about the dump files without loading them

load transaction load transaction load transaction

Loads a backup copy of the transaction log. The listonly and headeronly options display information about the dump files without loading them

online database online database online database

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 SQL server

open open open

Opens a cursor for proccessing

order by clause order by clause order by clause

Returns query results in the specified column(s) in sorted order

prepare transaction prepare transaction prepare transaction

Used by DB-Library in a two-phase commit application to see if a server is prepared to commit a transaction

print print print

Prints a user-defined message on the user's screen

raiserror raiserror raiserror

Prints a user-defined error message on the user's screen and sets a system flag to record that an error condition has ocurred

readtext readtext readtext

Reads text and image values, starting from a specified offset and reading a specified number of bytes or characters

reconfigure reconfigure reconfigure

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 implemnt new configuration parameter settings

return return return

Exits from a batch or procedure unconditionally, optionally providing a return status. statements following return are not executed

revoke revoke revoke

Revokes permissions from users

rollback rollback rollback

Rolls a user-defined transaction back to the last savepoint inside the transaction or to the beginning of the transaction

rollback trigger rollback trigger rollback trigger

Rolls back the work done in a trigger, including the update that caused the trigger to fire, and issues an optional raiserror statement

[HOME-PRINCIPAL ] [ INFORMATICA ] [ SYBASE ] [ ENLACES ] [ CONTACTENOS ]

© Derechos Reservados, Copyright, DATA-2013, 1999-2003.