How many rows will be returned in the following scripts?
DECLARE @Test TABLE(TestValue CHAR(1))
INSERT INTO @Test
SELECT 'A'UNION SELECT 'B'
UNION SELECT 'C'UNION SELECT 'D'
UNION SELECT 'E'
SELECT DISTINCT CAST(5 * RAND() + 1 as INT) AS RandomValue
FROM @Test
A. 1
B. 2
C. 3
D. 4
E. 5
F. It depends
Answer:[A]
Highlight to find out the answer.
Tuesday, July 20, 2010
Find output
at 8:40 PM
Labels: SQL Server, SQL Server Test, SQL Server Tip, T-SQL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment