You want to generate a list of integers that includes the integer raised to the power of 5 where the integers have a value between 1 and 20.

Which of the following Transact-SQL statements can you use to accomplish this task?

 Posted by Rajkatie on 11/30/2012 | Category: Sql Server Interview questions | Views: 3821 | Points: 40
Select from following answers:
  1. DECLARE @testvalue float; SET @testvalue = 1.00; WHILE @testvalue < 21.00 BEGIN SELECT @testvalue as 'Value', Power(@testvalue,5) as 'Power'; SET @testvalue = @testvalue +1; END;
  2. DECLARE @testvalue float; SET @testvalue = 1.00; WHILE @testvalue < 21.00 BEGIN SELECT @testvalue as 'Value', SQUARE(@testvalue) as 'Power'; SET @testvalue = @testvalue +1; END;
  3. DECLARE @testvalue float; SET @testvalue = 1.00; WHILE @testvalue < 21.00 BEGIN SELECT @testvalue as 'Value', EXP(@testvalue) as 'Power'; SET @testvalue = @testvalue +1; END;
  4. All Above

Show Correct Answer


Source: Measureup.com | | Alert Moderator 

Comments or Responses

Login to post response