Professional Documents
Culture Documents
HNEU,
Department of Information Systems,
Databases course,
V. V. Fedko
Contents
1. Transact-SQL language
2. Batches
3. Flow control
4. Statement WHILE
5. Cursors
6. Stored procedures
7. User-defined Functions (UDF)
8. Triggers
Send your answers at email Name the Word file according to the template
fvv.stud@gmail.com TN_Surname_specialty_group, for example,
T4_Johnson_121.017_1.
IF Boolean_expression
{ sql_statement | statement_block }
[ ELSE
{ sql_statement | statement_block } ]
WHILE Boolean_expression
{ sql_statement | statement_block | BREAK | CONTINUE }
BREAK - exit from the nearest WHILE loop. The instructions that follow the END keyword
indicating the end of the loop are called.
CONTINUE - a new cycle step will be set and does not take into account all instructions
after CONTINUE.
The global variable is @@ FETCH_STATUS <> 0 if there are no more rows in the cursor.
If the rowset is not yet finished, then @@ FETCH_STATUS = 0, and the FETCH operator will overwrite the field
values from the current row into variables.
• Transact-SQL Editor:
New query
UPDATE Products
SET Sold = Sold + @Quantity
WHERE ProductId= @ProductId;
END
Send your answers at email Name the Word file according to the template
fvv.stud@gmail.com TN_Surname_specialty_group, for example,
T4_Johnson_121.017_1.