﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by dun  / Identity Crisis: Attack of the Clone / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 19 Jun 2013 09:45:58 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Easy question.  Thanks</description><pubDate>Fri, 16 Mar 2012 15:36:23 GMT</pubDate><dc:creator>zymos</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Good Question.   I had to read the flow of logic twice, but i selected the right option.</description><pubDate>Sat, 03 Sep 2011 20:08:19 GMT</pubDate><dc:creator>thoover</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Nice Question, QotD.. keep us bugging like this only :-)</description><pubDate>Thu, 26 May 2011 01:06:51 GMT</pubDate><dc:creator>khullargirish02</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>[quote][b]Tom.Thomson (5/11/2011)[/b][hr][quote][b]WayneS (5/11/2011)[/b][hr][quote][b]Tom.Thomson (5/11/2011)[/b][hr]Nice question.One niggle: asking people to assume that a schema is valid when a table doesn't have a primary key may encourage a very bad habit if some of your audience don't know any better.  Maybe "pretend" would have been a better choice of word than "assume".[/quote]Tom, I think it was referring to the schema "Playground", which the table was created in.[/quote]Ah, yes, probably.  My mistake.  I find it hard at times to remember that MS misuses this particular term so horribly, and my reaction :alien: was as it was because I interpreted "schema" as "schema" rather than as what MS calls "schema".  Must remember loony MS terminology in future :(.[/quote]True many people are unaware of all the implications of "schema" in SQL as it covers many things "to make SQL databases and objects self-describing". Things like structure and integrity constraints, security and authorization specifications, object identifiers, features and packages, support of features, implementation information and sizing items, and schema is actually divided into "information" and "definition" schemas.So loony :hehe: actually applies to the description of schema by many MS DBA's, not Microsoft itself. Unfortunately, many DBA's just never really learn how broadly the term applies and tend to assume the third position of the name resolution process only...But we're all learning!!</description><pubDate>Fri, 13 May 2011 09:06:43 GMT</pubDate><dc:creator>Peter Trast</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Another nice question, thanks!</description><pubDate>Thu, 12 May 2011 14:49:28 GMT</pubDate><dc:creator>UMG Developer</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>What about the error with the schema:w00t:</description><pubDate>Thu, 12 May 2011 09:25:03 GMT</pubDate><dc:creator>Franl Quintana</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Excellent question.</description><pubDate>Wed, 11 May 2011 21:18:05 GMT</pubDate><dc:creator>Surii</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>[quote][b]WayneS (5/11/2011)[/b][hr][quote][b]Tom.Thomson (5/11/2011)[/b][hr]Nice question.One niggle: asking people to assume that a schema is valid when a table doesn't have a primary key may encourage a very bad habit if some of your audience don't know any better.  Maybe "pretend" would have been a better choice of word than "assume".[/quote]Tom, I think it was referring to the schema "Playground", which the table was created in.[/quote]Ah, yes, probably.  My mistake.  I find it hard at times to remember that MS misuses this particular term so horribly, and my reaction :alien: was as it was because I interpreted "schema" as "schema" rather than as what MS calls "schema".  Must remember loony MS terminology in future :(.</description><pubDate>Wed, 11 May 2011 18:09:18 GMT</pubDate><dc:creator>L' Eomot Inversé</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Almost got it wrong until I remembered that IDENTITY does not have to be UNIQUE :-) I just WANT it to be... made me read carefully. That's why I think this is a great question.</description><pubDate>Wed, 11 May 2011 13:48:37 GMT</pubDate><dc:creator>Peter Trast</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>nice and straight forward - thanks</description><pubDate>Wed, 11 May 2011 10:57:24 GMT</pubDate><dc:creator>SQLRNNR</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>[quote][b]WayneS (5/11/2011)[/b][hr][quote][b]Tom.Thomson (5/11/2011)[/b][hr]Nice question.One niggle: asking people to assume that a schema is valid when a table doesn't have a primary key may encourage a very bad habit if some of your audience don't know any better.  Maybe "pretend" would have been a better choice of word than "assume".[/quote]Tom, I think it was referring to the schema "Playground", which the table was created in.[/quote]I think he was implying that the table's schema (not the Playground schema -- confused yet?) is not appropriate since there is no primary key or unique identifier. Someone may read the question and assume the table's structure is good practice when it is not.</description><pubDate>Wed, 11 May 2011 10:54:31 GMT</pubDate><dc:creator>FargoUT</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>[quote][b]mtassin (5/11/2011)[/b]...At that point, just call the bloody thing a primary key.So I see INT IDENTITY(1,1) and these days I assume PRIMARY KEY is stuck on the end of it.Then I misread the answer that said it was a violation of the IDENTITY constraint.  Which I know isn't a constraint... I was just rushed because I have a meeting in 10 min. :)Oops.[/quote]Same here Mark. After seeing Identity and primary key together for years, my mind automatically puts them together. I need to start paying atte...ooh, look, ice cream!Good question.</description><pubDate>Wed, 11 May 2011 10:50:23 GMT</pubDate><dc:creator>toddasd</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>[quote][b]steven.chester (5/11/2011)[/b][hr]What's funny is that I couldn't pick my first answer: a syntax error.  There's a superfluous comma in the DDL for the table.[/quote]That comma does not generate any error when the code is executed as listed in the QOTD.  :-POf course you would need to execute this command before you execute the QOTD SQL to test that. Don't forget to replace parameters.[code="sql"]CREATE SCHEMA PLAYGROUND AUTHORIZATION &amp;lt;Your User Name, sysname, DBuser&amp;gt;GO[/code]</description><pubDate>Wed, 11 May 2011 10:47:59 GMT</pubDate><dc:creator>SanDroid</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Good question - thanks!</description><pubDate>Wed, 11 May 2011 09:43:06 GMT</pubDate><dc:creator>WayneS</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>[quote][b]Tom.Thomson (5/11/2011)[/b][hr]Nice question.One niggle: asking people to assume that a schema is valid when a table doesn't have a primary key may encourage a very bad habit if some of your audience don't know any better.  Maybe "pretend" would have been a better choice of word than "assume".[/quote]Tom, I think it was referring to the schema "Playground", which the table was created in.</description><pubDate>Wed, 11 May 2011 09:41:16 GMT</pubDate><dc:creator>WayneS</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Excellent Question and thorough explanation.Thanks!</description><pubDate>Wed, 11 May 2011 09:37:55 GMT</pubDate><dc:creator>srkrell</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>What's funny is that I couldn't pick my first answer: a syntax error.  There's a superfluous comma in the DDL for the table.</description><pubDate>Wed, 11 May 2011 09:09:24 GMT</pubDate><dc:creator>steven.chester</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>[quote][b]Richard Warr (5/11/2011)[/b][hr]A question that enables most people to get the correct answer after some careful thought is by no means "too simple". Especially as over 1/3 of respondants have got it wrong.For me this was close to a "Goldilocks" question. For some it's too hard, for others too soft, but for many, it's just right.[/quote]I got it wrong... only because of two things.1. I've spent the past several weeks going through hundreds of tables with structures like [code]CREATE TABLE staff(STAFFID INT IDENTITY(1,1) NOT NULL,STAFFNAME VARCHAR(100))CREATE UNIQUE CLUSTERED INDEX UCI_PK ON staff(STAFFID)[/code]At that point, just call the bloody thing a primary key.So I see INT IDENTITY(1,1) and these days I assume PRIMARY KEY is stuck on the end of it.Then I misread the answer that said it was a violation of the IDENTITY constraint.  Which I know isn't a constraint... I was just rushed because I have a meeting in 10 min. :)Oops.</description><pubDate>Wed, 11 May 2011 08:49:52 GMT</pubDate><dc:creator>mtassin</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>good question and explanation. Thanks.</description><pubDate>Wed, 11 May 2011 08:28:53 GMT</pubDate><dc:creator>Chris Umbaugh</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>[quote][b]Richard Warr (5/11/2011)[/b][hr]A question that enables most people to get the correct answer after some careful thought is by no means "too simple". Especially as over 1/3 of respondants have got it wrong.For me this was close to a "Goldilocks" question. For some it's too hard, for others too soft, but for many, it's just right.[/quote]LOL... Richard I could not agree more. :hehe:</description><pubDate>Wed, 11 May 2011 08:07:27 GMT</pubDate><dc:creator>SanDroid</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Good easy question, but I do not agree with the answers explination.A unique constraint is what a table needs to garuntee an column does not repeat values.Making a column part of a Primary Key value does create a constraint for Unique values.That is the effect not the cause.If both columns in the table are selected as Primary Key, then you could still insert duplicates into the Unique_Id column.Make sure your Identity columns have there own Unique Index and/or value constraint and you don't have to worry about dupes.</description><pubDate>Wed, 11 May 2011 08:06:40 GMT</pubDate><dc:creator>SanDroid</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Really good question</description><pubDate>Wed, 11 May 2011 07:33:16 GMT</pubDate><dc:creator>mohammed moinudheen</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Excellent question and better explanation.</description><pubDate>Wed, 11 May 2011 07:30:46 GMT</pubDate><dc:creator>malleswarareddy_m</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>[quote][b]sread (5/11/2011)[/b][hr]Won't the create table statement fail due to the comma after the last column name?[/quote]I just tried it on my machine and it ran fine.  I do remember this being discussed someplace as being legit and someone mentioning that they have made a practice of doing to make it easier to add columns (one less thing to forget).</description><pubDate>Wed, 11 May 2011 07:13:24 GMT</pubDate><dc:creator>cfradenburg</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Won't the create table statement fail due to the comma after the last column name?</description><pubDate>Wed, 11 May 2011 05:25:04 GMT</pubDate><dc:creator>sread</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>A question that enables most people to get the correct answer after some careful thought is by no means "too simple". Especially as over 1/3 of respondants have got it wrong.For me this was close to a "Goldilocks" question. For some it's too hard, for others too soft, but for many, it's just right.</description><pubDate>Wed, 11 May 2011 04:24:30 GMT</pubDate><dc:creator>Richard Warr</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Nice question.One niggle: asking people to assume that a schema is valid when a table doesn't have a primary key may encourage a very bad habit if some of your audience don't know any better.  Maybe "pretend" would have been a better choice of word than "assume".</description><pubDate>Wed, 11 May 2011 04:16:29 GMT</pubDate><dc:creator>L' Eomot Inversé</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>too simple.</description><pubDate>Wed, 11 May 2011 03:08:11 GMT</pubDate><dc:creator>damir60</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Nice question but this one almost had me because of the extra comma in the CREATE TABLE part of the query.  When there wasn't a distractor with an error message to address that issue, I assumed that the creation of the table would have to work with the extra comma.</description><pubDate>Wed, 11 May 2011 02:45:34 GMT</pubDate><dc:creator>cengland0</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Excellent question !</description><pubDate>Wed, 11 May 2011 02:23:35 GMT</pubDate><dc:creator>nigel.</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Simple One i just need to read the question and answers carefully :)</description><pubDate>Wed, 11 May 2011 01:48:12 GMT</pubDate><dc:creator>sharath.chalamgari</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Good Question,Srikant </description><pubDate>Wed, 11 May 2011 00:29:27 GMT</pubDate><dc:creator>srikant maurya</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Great question!</description><pubDate>Wed, 11 May 2011 00:11:47 GMT</pubDate><dc:creator>Koen Verbeeck</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Nice question with nice explanation.</description><pubDate>Wed, 11 May 2011 00:09:41 GMT</pubDate><dc:creator>Gobikannan</dc:creator></item><item><title>RE: Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Nice question - required carefully reading .. but that is how the QOD should .. so again nice question.</description><pubDate>Tue, 10 May 2011 21:14:46 GMT</pubDate><dc:creator>bitbucket-25253</dc:creator></item><item><title>Identity Crisis: Attack of the Clone</title><link>http://www.sqlservercentral.com/Forums/Topic1106603-1508-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/questions/T-SQL/73463/"&gt;Identity Crisis: Attack of the Clone&lt;/A&gt;[/B]</description><pubDate>Tue, 10 May 2011 21:13:27 GMT</pubDate><dc:creator>dun</dc:creator></item></channel></rss>