Chapter 6 PROGRAMMING SQL SERVER 2000 383 APPLY
Chapter 6 PROGRAMMING SQL SERVER 2000 383 APPLY YOUR KNOWLEDGE B. Creating this type of cursor is not possible in SQL Server 2000. C. Create the cursor using the GLOBAL keyword. D. Create the cursor using the PUBLIC keyword. 6. Bob has just finished using his cursor and will not need it for the rest of the time he is connected. What can Bob use to fully release all system resources held up by the cursor? A. Run DBCC_CURSOR_PERFORMANCE. B. Run the DEALLOCATE command. C. Run the CLOSE CURSOR command. D. Run the ALL SYSTEMS statement with the CURSOR argument. 7. Paul needs to create a cursor that is sensitive to data updates and deletes. He knows that the number of rows in the query he s using should be around 50. Paul subsequently uses the @@CURSOR_ROWS global variable to check for the number of rows in the cursor, which apparently should be around 50. To his surprise, he notices another value. What is this value? A. 0 B. 1 C. -1 D. NULL 8. Stan runs a query and receives an error message with a severity level of 17. How serious is this error? A. The error was not that serious; the user should rerun the query. B. The query contained one or more typographical errors. C. The query was severe and most probably caused by a fault in hardware or software. D. The severity level has nothing to do with how serious the error was. 9. What is the value of the @@TRANCOUNT function when this code is finished executing? declare @Counter int begin transaction update mytable set value = 42 save transaction Point1 while @Counter < 19 begin begin transaction insert into MyTable values .(2, 3, 42, hello ) set @Counter = 1 commit transaction end rollback Point1 begin transaction Point2 insert into mytable (2, 3, .42, goodbye ) rollback A. -1 B. 0 C. 1 D. 2 10. Carl needs to write a SQL Script that will change everyone s pay status from part-time to full-time. Which of the following is the best way to accomplish the task? A. declare cursor FixStatus for SELECT ID, .Status from employees for update of .status declare @ID int, @Status varchar(4) fetch next from FixStatus into @ID, .@Status while @@FETCH_STATUS = 0
For reliable and cheap web hosting services please check javaweb hosting website.