Comando
Command |
Sintaxis |
Ejemplo
Example |
Sirve Para..
Use for... |
|
save transaction |
save transaction savepoint_name |
save transaction act-author |
Establece un punto de grabación (punto
de salvación) dentro de una transación
Sets a savepoint within a transaction
|
| select |
select [all|distinct] select_list |
select pub_name, title_id from publishers
pu, title t where t.pub_id = pu.pub_id
declare shared_crsr cursor for select
title, title_id from titles shared where title_id like "BU%"
select * from publishers
|
Recupera filas desde objetos de una base de
datos (leáse tablas, vistas, etc)
Retrieve rows from database objects
|
| set setuser |
set setuser |
set setuser |
Sets SQL 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
|
| shutdown |
shutdown |
shutdown |
Shuts down SQL Server or a Backup
server. This command can be issued only by a System Administrator
|
|
truncate table |
truncate table |
truncate table |
Remove all rows from a table
|
|
union Operator |
union Operator |
union Operator |
Return 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
|
| update |
update |
update |
Changes data in existing rows, either
by adding data or by modifying existing data
|
| update statistics |
update statistics |
update statistics |
Updates information about the distribution
of key values in specified indexes
|
| use |
use |
use |
Specifies the database with which
you want to work
|
|
waitfor |
waitfor |
waitfor |
Specifies a specific time, a time
interval, or an event for the execution of a statement block, stored procedure,
or transaction
|
| where Clause |
where |
where |
Sets the search conditions in a
select, insert, update or delete statement. (Joins
and subqueries are specified in the search conditions: see the "Joins" and
"Subqueries" sections for full details)
|
|
| while |
while |
while |
Sets a condition for the repeated
execution of a statement or statement block. The statement(s) are executed
repeatedly as long as the specified condition is true
|
| writetext |
writetext |
writetext |
Permit non-logged, interactive updating
of an existing text or image column
|