382 Part I EXAM PREPARATION APPLY YOUR KNOWLEDGE
382 Part I EXAM PREPARATION APPLY YOUR KNOWLEDGE C. SELECT * FROM Sales1 GO UPDATE Products SET price= price * 2 GO D. SELECT * FROM Sales1 UPDATE Products SET price= price * 2 2. You are a database administrator at a small web development shop in south central Wisconsin. Your boss is an idiot. He has been trying to write SQL Scripts again. He s given you this script to run, but you want to make sure it doesn t block all the users out of the server and set all the pricing information to zero, like last time. So, given the following script: DECLARE @Var int SET @var = 1 GO WHILE @Var < 11 BEGIN PRINT @Var * 2 SET @Var= @Var + 1 END What will be printed on the output screen? A. A line of zeros. B. A line of ones. C. The multiples of two. D. An error will occur. 3. You are a SQL Developer working on an Internet application in SQL Server 2000. You need to write a batch that prints the first ten multiples of 5. Which of the following gets the job done? A. DECLARE @MyVar int SET @MyVar =1 WHILE @MyVar < 11 BEGIN PRINT @MyVar *5 SET @MyVar = @MyVar +1 END B. DECLARE @MyVar int SET @MyVar =1 WHILE @MyVar < 10 BEGIN PRINT @MyVar *5 SET @MyVar = @MyVar +1 END C. DECLARE @MyVar int SET @MyVar =1 WHILE @MyVar < 11 BEGIN PRINT @MyVar *5 SET @MyVar = 5 END D. DECLARE @MyVar int SET @MyVar =1 GO WHILE @MyVar < 11 BEGIN PRINT @MyVar *5 SET @MyVar = @MyVar +1 END 4. When using a cursor, which of the following statements cause the data to be returned to the batch? A. DECLARE B. OPEN C. RETRIEVE D. FETCH 5. Paul has a 5-batch script, and is creating a T-SQL cursor in batch one. He wants to use the cursor in batches two, three, and four. What must Paul do to access the cursor from any batch? A. Use the DECLARE CURSOR statement in every batch and then re-populate it.
For high quality java hosting services please check java web hosting website.