|
|
Question : Identity Type and Varchar vs. nVarchar
|
|
hi, I'd like to know why many experts are avoiding to use same starting point values for Primary Key columns in different tables, i.e. if you have [table1] with Primary Key starting off with 1 and you have another [table2] with also Primary key starting off with 1000 can't you have both columns in both tables starting off with value 1..? It really doesn't make sanse...
and another question, when should I use nvarchar instead of varchar and why..? I look at Northwind datatbase and no columns are varchar type, they are nvarchar.
|
Answer : Identity Type and Varchar vs. nVarchar
|
|
Hi davidlars99,
>>many experts are avoiding to use same starting point values << Where did you get this from? I also can see no benefit to this. There are certain applications where it can be useful to retain a table holding an integer that represents a current Primary key value, this would make every primary key value unique in the database - although these can be difficult to implement with locking and concurrency issues. Our document management software works in this way.
You are correct that if you are not supporting international character sets you do not need to use nVARCHAR, I generally don't and so far it hasn't caught me out yet - but you do need to be certain.
|
|
|
|
|