|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,040,
Visits: 1
|
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 7:36 PM
Points: 32,931,
Visits: 26,820
|
|
As with so many types of testing, you must also test your "made up" questions as well. This question actually has two correct answers... made up or not... ;)
--Jeff Moden "RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Sunday, July 01, 2012 8:44 AM
Points: 205,
Visits: 105
|
|
| I kept looking for checkboxes to select both correct answers. Lucky I guessed right which one you were looking for. Although I suppose you could argue that the syntax for the other "correct answer" was a little off because you can't query "sys.columns.is_identity", you'd actually do "select * from sys.columns where is_identity=1".
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, September 15, 2008 12:02 PM
Points: 1,318,
Visits: 57
|
|
Burned again. For the reasons already stated
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Tuesday, March 12, 2013 8:17 AM
Points: 277,
Visits: 404
|
|
Hmmm... it depends on your point of view. If you view the syntax literally, then only one answer is correct.
However, if you view the possible answers as pseudocode, then "Query sys.columns.is_identity for a value of 1" can be interpreted:
SELECT [object_id], [name] FROM sys.columns WHERE is_identity = 1 This is also correct.
Thanks! akv
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, October 21, 2008 12:40 AM
Points: 4,
Visits: 11
|
|
| What about using sp_columns on the table? That has a column with identity yes/no...
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, July 02, 2008 3:17 AM
Points: 6,
Visits: 36
|
|
There Is no such a way when database engine is SQL server 2000.the following query returns error: SELECT [object_id], [name] FROM sys.columns WHERE is_identity = 1
|
|
|
|
|
SSChasing Mays
      
Group: General Forum Members
Last Login: Monday, September 03, 2012 11:06 AM
Points: 659,
Visits: 56
|
|
I agree that there should be 2 correct answers.
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 1:35 AM
Points: 4,789,
Visits: 1,336
|
|
These types of problems should be taken care. Otherwise it becomes very confusing. In another forum we already discussed about these problems.
:)
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Tuesday, January 29, 2013 4:08 AM
Points: 1,140,
Visits: 306
|
|
| :) Agree with the above :) question setters please check all answers first :)
|
|
|
|