I have come across a OLTP Database where all the tables has a default row,value 0 for a primary key and other columns with its default value or a null value.I am not sure why is this row required in first place? can anyone explain what are the advantages and disadvantages of having zeroth row.
Best How To :
Having zeroth row is related to business rule or specifications. For example, you have a data warehouse where you are loading data for customer and by mistake your customer haven't provided any country name then you might need to provide him a default value (which could be anything, in your case it is zero). Consider below example
CREATE TABLE #TestTable (
PrimaryKeyColumn INT NOT NULL ,
CONSTRAINT PK_PKC PRIMARY KEY CLUSTERED (PrimaryKeyColumn),
INSERT INTO #TestTable VALUES (0,'No Country Found'),(1,'USA'),(2,'Canada')
SELECT * FROM #TestTable
DROP TABLE #TestTable
I have designed a data warehouse where I have reserved value 1,2,3,4,5 for different default scenarios. The reason we do it because no matter data is correct or not but still it is important. Just like customer case, where we don't know his country but we are concerned about the order he deals with.
Though, I should have post this in comment but due to < 50 reputation I have posted it as an answer.