SQL SERVER – Identity Fields – Contest Win Joes 2 Pros Combo (USD 198) – Day 2 of 5

SQL SERVER - Identity Fields - Contest Win Joes 2 Pros Combo (USD 198) - Day 2 of 5 combos

August 2011 we ran a contest where every day we give away one book for an entire month. The contest had extreme success. Lots of people participated and lots of give away. I have received lots of questions if we are doing something similar this month. Absolutely, instead of running a contest a month long we are doing something more interesting. We are giving away USD 198 worth gift every day for this week. We are giving away Joes 2 Pros 5 Volumes (BOOK) SQL 2008 Development Certification Training Kit every day. One copy in India and One in USA. Total 2 of the giveaway (worth USD 198). All the gifts are sponsored from the Joes 2 Pros.

The books are available here Amazon | Flipkart 

How to Win:

  • Read the Question
  • Read the Hints
  • Answer the Quiz in Contact Form in following format
    • Question
    • Answer
    • Name of the country (The contest is open for USA and India residents only)
  • 2 Winners will be randomly selected announced on August 20th.

Question of the Day:

Which of the following statement is incorrect?

a) Identity value can be negative.
b) Identity value can have negative interval.
c) Identity value can be of datatype VARCHAR
d) Identity value can have increment interval larger than 1

Query Hints:

BIG HINT POST

A simple way to determine if a table contains an identity field is to use the SSMS Object Explorer Design Interface. Navigate to the table, then right-click it and choose Design from the pop-up window. When your design tab opens, select the first field in the table to view its list of properties in the lower pane of the tab (In this case the field is ProductID). Look to see if the Identity Specification property in the lower pane is set to either yes or no. SQL Server will allow you to utilize IDENTITY_INSERT with just one table at a time. After you’ve completed the needed work, it’s very important to reset the IDENTITY_INSERT back to OFF.

Additional Hints:

I have previously discussed various concepts from SQL Server Joes 2 Pros Volume 2.

Next Step:

Answer the Quiz in Contact Form in following format

  • Question
  • Answer
  • Name of the country (The contest is open for USA and India)

Bonus Winner

Leave a comment with your favorite article from the “additional hints” section and you may be eligible for surprise gift. There is no country restriction for this Bonus Contest. Do mention why you liked it any particular blog post and I will announce the winner of the same along with the main contest.

Reference: Pinal Dave (https://blog.sqlauthority.com)

Previous Post
SQL SERVER – Query Hint – Contest Win Joes 2 Pros Combo (USD 198) – Day 1 of 5
Next Post
SQL SERVER – Clustered Index and Primary Key – Contest Win Joes 2 Pros Combo (USD 198) – Day 3 of 5

Related Posts

19 Comments. Leave new

  • Question: Which of the following statement is incorrect?

    Answer : c) Identity value can be of datatype VARCHAR

    Favorite Article : SQL Joes 2 Pros Development Series – Many to Many Relationships

    Reply
  • Kalyanasundaram.K
    August 7, 2012 11:59 am

    Hi,

    In SQL Server Joes 2 Pros Volume 2, additional hints section check the links and my favorite as below :
    SQL Joes 2 Pros Development Series – Output Clause in Simple Examples

    Reason : This feature is quite simple to know the executed query status for developers at the time of execution result. No need the retrieve the table values to check the record changes.

    Reply
  • Hi Pinal,

    I am interested to this contest.

    Option C
    India

    Reply
  • Which of the following statement is incorrect?

    Ans:- c) Identity value can be of datatype VARCHAR

    Additional Hints:

    SQL Joes 2 Pros Development Series – Ranking Functions – Advanced NTILE in Detail

    Reason: It was great post with real scenario and users can get confusion to pick the correct answer so one should put effort to find out the correct answer.

    Reply
  • Identity is possible on only following datatype int, bigint, smallint, tinyint, or decimal or numeric.
    Hence answer c) Identity value can be of datatype VARCHAR is wrong

    Reply
  • Ans : Identity value can be of datatype VARCHAR

    Identity column must be of data type int, bigint, smallint, tinyint, or decimal or numeric.

    INDIA
    Cochin

    Reply
  • Marcelo Claure
    August 8, 2012 9:53 am

    Option C) is wrong. The idea of the Identity value is an incremental feature (That is possible in int, bigint, smallint, tinyint,decimal or numeric data types). With a VARCHAR datatype is not possible to do that..

    Reply
  • Question of the Day:
    Which of the following statement is incorrect?

    a) Identity value can be negative.
    b) Identity value can have negative interval.
    c) Identity value can be of datatype VARCHAR
    d) Identity value can have increment interval larger than 1

    Answers
    c) Identity value can be of datatype VARCHAR

    Kailash Dhanke – India

    Reply
  • The correct answer is option C

    Reply
  • Question: Which of the following statement is incorrect?

    Answer: c) Identity value can be of datatype VARCHAR

    Country: USA

    Reply
  • P.Anish Shenoy
    August 10, 2012 12:47 pm

    Hi Sir,

    SQL Joes 2 Pros Development Series – Ranking Functions – RANK( ), DENSE_RANK( ), and ROW_NUMBER( )

    and

    SQL Joes 2 Pros Development Series – Ranking Functions – Advanced NTILE in Detail

    These two blogs where one of my favourites. Did not know about NTILE untill i read it from the blog post.

    Thanks for the knowledge.

    Regards,
    Anish shenoy
    Quadwave,
    Bangalore

    Reply
  • I’m not sure I have a favorite article, I like a lot of them. I really enjoyed learning about all the things you can do with Rank, Row_number and NTile. I didn’t know about NTile before this. I think these would simply some of our old reporting code where we pretty much do this, but the long way. I’d like to update the code using these methods

    Reply
  • Hi Pinal,
    I liked the blog SQL Joes 2 Pros Development Series – Ranking Functions – RANK( ), DENSE_RANK( ), and ROW_NUMBER( ), because in this blog these functions are explained well. Earlier while finding rank I was using temporary table and now I am using RANK() function.

    Best Regards,
    S Kumar

    Reply
  • Ans. C)

    country: india

    Reply
  • Uday Bhoopalam
    August 14, 2012 2:48 am

    Hi Pinal
    Which of the following statement is Incorrect?

    C: ) Identity value can be of datatype VARCHAR

    Country: USA

    Reply

Leave a Reply

Menu