Questions
Q1. Which of the following function would you consider using to get the day (day of the month) of the specified date?
A. DAY()
B. DATE()
C. YEAR()
D. GETDATE()
Q2. Which of the following function would you consider using to get the last day of the month ?
A. DAY()
B. DATE()
C. EOMONTH()
D. GETDATE()
Q3. Which of the following function would you consider using to get indexed column names ?
A. FILE_NAME()
B. DB_NAME()
C. APP_NAME()
D. INDEX_COL()
Q4. Which of the following function would you consider using to get the identification number for a database user?
A. USER_ID()
B. SUSER_NAME()
C. HAS_DBACCESS()
D. IS_MEMBER()
Q5. Which of the following function would you consider using to get the database user name from a specified identification number ?
A. USER_ID()
B. USER_NAME()
C. HAS_DBACCESS()
D. LOGINPROPERTY()
Q6. Which of the following function would you consider using to determines whether an expression is a valid numeric type ?
A. NEWID()
B. ISNULL()
C. ISNUMERIC()
D. GETANSINULL()
Q7. Which of the following function would you consider using to generate a new Guid (uniqueidentifier) ?
A. NEWID()
B. @@IDENTITY
C. ISNUMERIC()
D. HOST_ID()
Q8. Which of the following function would you consider using to get the current lock time-out setting for the current session.?
A. @@OPTIONS
B. @@LOCK_TIMEOUT
C. @@TRANCOUNT
D. @@DBTS
Q9. Which of the following function would you consider using to get the ASCII code value of the character expression.?
A. LTRIM()
B. REPLACE()
C. PATINDEX()
D. ASCII()
Q10. Which of the following function would you consider using to get a character expression with lowercase character data converted to uppercase?
A. SUBSTRING()
B. DIFFERENCE()
C. FORMAT()
D. UPPER()
Answers
Q1. Correct Answer : A
Hint : DAY() function returns an integer representing the day (day of the month) of the specified date.
Q2. Correct Answer : C
Hint : EOMONTH() function returns the last day of the month that contains the specified date
Q3. Correct Answer : D
Hint : INDEX_COL() function returns the indexed column name. Returns NULL for XML indexes.
Q4. Correct Answer : A
Hint : USER_ID() function returns identification number for a database user.
Q5. Correct Answer : B
Hint : USER_NAME() funtion returns database user name from a specified identification number.
Q6. Correct Answer : C
Hint : ISNUMERIC() system function determines whether an expression is a valid numeric type
Q7. Correct Answer : A
Hint : NEWID() system function creates a unique value of type uniqueidentifier
Q8. Correct Answer : B
Hint : @@LOCK_TIMEOUT function returns the current lock time-out setting in milliseconds for the current session.
Q9. Correct Answer : D
Hint : ASCII() function returns the ASCII code value of the leftmost character of a character expression.
Q10. Correct Answer : D
Hint : UPPER() function returns a character expression with lowercase character data converted to uppercase
Leave a Comment