تبلیغات
پایگاه داده - نمونه سوال و تست:
قالب وبلاگ قالب وبلاگ

پایگاه داده
آزمایشگاه پایگاه داده
 


 
نوشته شده در تاریخ پنجشنبه 19 خرداد 1390 توسط

How to unit test SQL Server 2008 database using Visual Studio 2010

part1


SQL Advanced Quiz

There are 10 questions in this quiz. Good luck! 
Passing grade is 70% = C.
1) What will be the output of the following statement? SELECT LEN(CAST(LEFT('026-100', 3) AS INT))
       a)  2
       b)  3
       c)  7
       d)  Statement will generate an error.


2) What will be the output of the following statement? SELECT CAST(-1 AS SMALLDATETIME)
       a)  1900-01-01 00:00:00.000
       b)  1899-01-01 00:00:00.000
       c)  1752-01-01 00:00:00.000
       d)  The system will generate an error. Only positive integer values can be converted to a SMALLDATETIME data type.


3) What will be the output of the following statement? SELECT ROUND(123.89, -1)
       a)  120.00
       b)  123.00
       c)  123.90
       d)  124.00


4) What will be the output of the following statement? SELECT STR(6365, 3)
       a)  ***
       b)  6365
       c)  6,365
       d)  6400
       e)  6365.000


5) What will be the output of the following statement? SET ARITHABORT OFF SET ANSI_WARNINGS OFF SELECT 100/0
       a)  Null
       b)  0
       c)  Infinity
       d)  An error is generated.


6) View text definitions are stored in which system table?
       a)  sysobjects
       b)  syscolumns
       c)  syscomments
       d)  sysviews


7) What's the maximum value can an INT data type hold?
       a)  2,147,483,647
       b)  2,147,483,648
       c)  4,294,967,295
       d)  4,294,967,296


8) What is the best data type to store the birthdays of the US Presidents, starting with George Washington's birthday of February 22, 1732?
       a)  DATETIME
       b)  INT
       c)  SMALLDATETIME
       d)  VARCHAR


9) Which of the following is NOT a valid description of the public role?
       a)  The public role captures all default permissions for users in a database.
       b)  The public role cannot be dropped.
       c)  The public role is contained in every database, including msdb, tempdb, model, and all user databases except in the master database for security purposes.
       d)  The public role cannot have users, groups, or roles assigned to it.


10) What is the maximum date value that can be stored in a SMALLDATETIME data type?
       a)  June 6, 2079
       b)  July 6, 2079
       c)  December 31, 2079
       d)  December 31, 9999





.: Weblog Themes By Pichak :.


تمامی حقوق این وبلاگ محفوظ است | طراحی : پیچک
قالب وبلاگقالب وبلاگ