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.
- SQL Joes 2 Pros Development Series – Output Clause in Simple Examples
- SQL Joes 2 Pros Development Series – Ranking Functions – Advanced NTILE in Detail
- SQL Joes 2 Pros Development Series – Ranking Functions – RANK( ), DENSE_RANK( ), and ROW_NUMBER( )
- SQL Joes 2 Pros Development Series – Advanced Aggregates with the Over Clause
- SQL Joes 2 Pros Development Series – Aggregates with the Over Clause
- SQL Joes 2 Pros Development Series – Overriding Identity Fields – Tricks and Tips of Identity Fields
- SQL Joes 2 Pros Development Series – Many to Many Relationships
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)
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
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.
Hi Pinal,
I am interested to this contest.
Option C
India
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.
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
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
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..
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
The correct answer is option C
Question: Which of the following statement is incorrect?
Answer: c) Identity value can be of datatype VARCHAR
Country: USA
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
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
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
Ans. C)
country: india
Hi Pinal
Which of the following statement is Incorrect?
C: ) Identity value can be of datatype VARCHAR
Country: USA