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

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 Koenig Training Solution and 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 (http://blog.sqlauthority.com)

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

  1. 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

    Like

  2. 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.

    Like

  3. 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.

    Like

  4. 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

    Like

  5. 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

    Like

  6. 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..

    Like

  7. 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

    Like

  8. 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

    Like

  9. Pingback: SQL SERVER – Contest – Summary of 5 Day and Additional Information « SQL Server Journey with SQL Authority

  10. 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

    Like

  11. 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

    Like

  12. Pingback: SQL SERVER – Winners – Contest Win Joes 2 Pros Combo (USD 198) « SQL Server Journey with SQL Authority

  13. Pingback: Here comes my Free Copy of Joes 2 Pros Combo – Courtesy Pinal Dave « Datta's Ramblings on Business Intelligence 'N' Life

  14. Pingback: SQL SERVER – Weekly Series – Memory Lane – #041 | Journey to SQL Authority with Pinal Dave

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s