Select chapter



Basics (2.papers)
Data Types (2.papers)
Table-designing (1.papers)
Queries-Commands (3.papers)
String functions (2.papers)
Subqueries (1.papers)
Joins (1.papers)
Constraints (1.papers)
Triggers (1.papers)
Hide

Sponsored Links


  

sql data types interview questions and answers

1
What is xml datatype in SQL Server?
  1. Using xml datatype we can store xml data in SQL Server
  2. xml datatype is not present in SQL Server
Show Answer
Share Facebook gmail Twitter
2
What is the maximum size of nchar and nvarchar datatypes?
  1. nchar and nvarchar can store upto 4000 characters.
  2. nchar and nvarchar can store upto 8000 characters.
  3. nchar and nvarchar can store upto 2^31 characters.
  4. None of the above.
Show Answer
Share Facebook gmail Twitter
3
Which of the following datatypes are not available in SQL Server?
1.table    2.uniqueidentifier     3.xml         4.datetimeoffset
  1. All are not supported in SQL Server.
  2. All are supported in SQL Server.
  3. xml and datetimeoffset datatypes are not supported.
  4. table and uniqueidentifier datatypes are not supported.
Show Answer
Share Facebook gmail Twitter
4
Which of the following datatypes are new datatypes in SQL Server 2012?
1.date 2.datetime2 3.geography 4.geometry
  1. All are new datatypes.
  2. All are old datatypes.
  3. date and datetime are new datatypes.
  4. geography and geometry are new datatypes.
Show Answer
Share Facebook gmail Twitter
5
What is the use of geometry datatype in SQL Server?
  1. using geometry datatype, we can create geometric user interfaces.
  2. using geometry datatype, we can store different geometric shapes details (like length,width,volume etc…)
  3. using geometry datatype, we can store only 2 dimensional geometric shapes details.
  4. None of the above.
Show Answer
Share Facebook gmail Twitter
6
What is the use of sql_variant datatype?
  1. sql_variant datatype used for storing any English and numeric characters combination.
  2. sql_variant datatype can able to store other data types supported values.
Show Answer
Share Facebook gmail Twitter
7
How to convert one datatype into another datatype in SQL?
  1. using cast function.
  2. using convert function.
  3. using cast and convert functions.
  4. using as keyword.
Show Answer
Share Facebook gmail Twitter
8
Which of the following is a valid cast function syntax?
  1. CAST (expression AS data_type [(length)])
  2. CAST (data_type[(length)],expression)
  3. CAST(expression,data_type[(length)])
  4. None of the above.
Show Answer
Share Facebook gmail Twitter
9
Which of the following is a valid convert function syntax?
  1. CONVERT (expression AS data_type [(length)])
  2. CONVERT (data_type[(length)],expression[,style])
  3. CAST(expression,data_type[(length)])
  4. None of the above.
Show Answer
Share Facebook gmail Twitter
10
What is the difference between cast and convert functions?
  1. cast and convert function are used for converting one data type into another data type in sql and there is no difference between both.
  2. cast function is used for converting larger data types values into smaller data type values but convert function is used for converting smaller data type values into larger data type values .
  3. both cast and convert functions are used for converting one data type into another data type. Convert is more convenient while converting to date time or money data types since it supports styling feature.
  4. None of the above.
Show Answer
Share Facebook gmail Twitter
11
What is the use of geography datatype in SQL Server 2012 ?
  1. using geography datatype we can store details about different geographical areas like country name,capital name etc…
  2. using geography datatype we can store geographical details in the round-earth co-ordinate system ( like longitude, latitude etc…)
Show Answer
Share Facebook gmail Twitter
12
What is the use of a table datatype in SQL Server?
  1. table datatype used for creating temporary tables which will be stored in tempdb database.
  2. table datatype used for creating temporary in-memory tables which are useful for processing data as per business logic in stored procedures.
  3. table datatype used for creating table variables in SQL.
  4. second and third options are correct.
Show Answer
Share Facebook gmail Twitter
Read more papers :