SQL SERVER INTERVIEW QUESTION AND ANSWER PART2 - Latest News Gossips | Bollywood, Hollywood, Celebs News, Sports News, Political News

Latest News Gossips | Bollywood, Hollywood, Celebs News, Sports News, Political News

Latest News, Bollywood, Hollywood, Celebs News, Movie, Sports news, Cricket, Hockey, Tennis, Football, Formula 1, Live Cricket, Breaking News,Technical News, LatestNews, News, Health News, Lifestyle, Political News, English News, National, International, Hindi News, live updates on LatestNews India , .न्यूज़ डेस्क, पढ़ें देश, विदेश, बॉलीवुड, लाइफस्टाइल और राजनीती की ब्रेकिंग ख़बरें. Read Latest Hindi News, Breaking News at LatestNews, Latest: Hindi news (हिंदी समाचार) website

Breaking News

Home Top Ad

Post Top Ad

Tuesday, November 27, 2018

SQL SERVER INTERVIEW QUESTION AND ANSWER PART2

Q:- What is SQL?
Ans:- SQL(Structured Query Language) is a standard language for
accessing and manipulating databases.
It is a standard which is given by American National Standard Institute(ANSI)
 in 1986 and of the International Organization for Standardization(ISO)
 in 1987.


Datatypes in SQL SERVER---
When we create any table in Sql Server,before it we have to know that what is table?
Actually table is combination of raw and column and
 in a database table each column is required to have a name and a
data type.

The data type helps for SQL to understand what type of
data is expected inside of each column,



Character strings
char[n]
Desc: Fixed-length, Non-Unicode character data with a length of n bytes. Value of n will be 1 through 8,000.

varchar [ n | max  ]
Desc: Variable-length, non-Unicode character data. n can be a value from 1 through 8,000. max shows that the maximum storage size is 2^31-1 bytes.


text
Desc: Variable-length, non-Unicode data in the code page of the server and with a maximum length of (2^31-1 (2,147,483,647)) chars.
When the server code page uses double-byte chars, the storage is still (2,147,483,647) bytes.
 Depending on the character string, the storage size may be less than 2,147,483,647 bytes.
Will be removed in a future version of Microsoft SQL Server, use varchar(max) instead.


Unicode Character strings
nchar[n]
Desc: Fixed-length, Unicode character data of n characters. n must be a value from 1 through 4,000.
The storage size is two times n bytes.


nvarchar [ n | max ]
Desc:Variable-length Unicode character data. n can be a value from 1 through 4,000 characters. max indicates that the maximum storage size is 2^31-1 bytes. The storage size, in bytes, is two times the number of characters entered + 2 bytes.


ntext
Desc: Variable-length, Unicode data with a maximum length of 2^30 – 1 (1,073,741,823) characters.
Storage size, in bytes, is two times the number of characters entered.
Will be removed in a future version of Microsoft SQL Server, use nvarchar(max) instead.


Binary strings
binary [  n  ]
Desc: Fixed-length, binary data with a length of n bytes, where n is a value from 1 through 8,000. The storage size is n bytes.


varbinary [ n | max ]
Desc:Variable-length, binary data. n can be a value from 1 through 8,000 bytes. max indicates that the maximum storage size is 2^31-1 bytes. The storage size is the actual length of the data entered + 2 bytes.


image
Desc: Variable-length, binary data from 0 through 2^31-1 (2,147,483,647) bytes.
Will be removed in a future version of Microsoft SQL Server, use varbinary(max) instead.


Numerics
bigint
Desc: 8 bytes, The bigint data type is intended for use when integer values might exceed the range that is supported by the int data type.


int
Desc: 4 bytes, The int data type is the primary integer data type in SQL Server.


smallint
Desc: 2 bytes


tinyint
Desc: 1 byte


bit
Desc: An integer data type that can take a value of 1, 0, or NULL.


numeric[p,s], decimal[p,s]
Desc: Numeric data types that have fixed precision and scale.


money
Desc:Data types that represent monetary or currency values. The money
 and smallmoney data types are accurate to a ten-thousandth of the
monetary units that they represent.


smallmoney
Desc:Data types that represent monetary or currency values. The money
 and smallmoney data types are accurate to a ten-thousandth of the monetary units that they represent.

float[n]
Desc:Approximate-number data types for use with floating point numeric data. Floating point data is approximate; therefore, not all values in the data type range can be represented exactly.

real

Date and Time
Date
Desc: Defines a date.

Datetime
Desc: Defines a date that is combined with a time of day with fractional seconds that is based on a 24-hour clock.

Datetime2
Desc:Defines a date that is combined with a time of day that is based on 24-hour clock.
datetime2 can be considered as an extension of the existing datetime type that has a larger date range, a larger default fractional precision, and optional user-specified precision.
Oracle:timestamp

Datetimeoffset
Desc: Defines a date that is combined with a time of a day that has time zone awareness and is based on a 24-hour clock.
Oracle:timestamp with time zone

Smalldatetime
Desc:Defines a date that is combined with a time of day. The time is based on a 24-hour day, with seconds always zero (:00) and without fractional seconds.
Oracle:date, The value for seconds is returned as 0

time
Desc: Defines a time of a day. The time is without time zone awareness and is based on a 24-hour clock.



17 comments:

  1. I think as far as crucial SQL topics are concerned there should also be a stress over topic of REST API and its utilities.
    sql server load rest api

    ReplyDelete
  2. It is very good, but look at the information at this address. cheap dedicated server germany

    ReplyDelete
  3. Excellent website! I adore how it is easy on my eyes it is. I am questioning how I might be notified whenever a new post has been made. Looking for more new updates. Have a great day! gogomovies

    ReplyDelete
  4. Really appreciate this wonderful post that you have provided for us.Great site and a great topic as well i really get amazed to read this. Its really good. More

    ReplyDelete
  5. Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share. katmovies

    ReplyDelete
  6. Wow i can say that this is another great article as expected of this blog.Bookmarked this site.. worldfree4u movies

    ReplyDelete
  7. Wow! This could be one of the most useful blogs we have ever come across on thesubject. Actually excellent info! I’m also an expert in this topic so I can understand your effort. Fox News Live

    ReplyDelete
  8. If it's just not in your budget to hire a film sales rep or entertainment lawyer you can still secure meaningful movie distribution hustling hard yourself. putlocker

    ReplyDelete
  9. Thumbs up guys your doing a really good job. News Business

    ReplyDelete
  10. it's really cool blog. Linking is very useful thing.you have really helped News Business

    ReplyDelete
  11. it's really nice and meanful. it's really cool blog. Linking is very useful thing.you have really helped lots of people who visit blog and provide them usefull information. watch hindi movies online

    ReplyDelete
  12. Nice article posting here. I appreciate your work. Beautiful blog.
    Latest Govt Jobs In Pakistan

    ReplyDelete
  13. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. game of thrones season 8 australia

    ReplyDelete
  14. Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. ดูหนังออนไลน์

    ReplyDelete
  15. Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. latest hindi news

    ReplyDelete
  16. I am genuinely thankful to the holder of this web page who has shared this wonderful paragraph at at this place Organic Seeds

    ReplyDelete

Post Bottom Ad