Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Jim Beam
Posting Yak Master
137 Posts |
Posted - 2010-12-21 : 14:09:26
|
| Hi all,Typically, in what kinds of scenarios would you need to reference rows by their RowID's? Any pro's/cons? I've seen instances of people doing it here but never known the business reasons for it.Cheers,Jim |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
SparkByte
Yak Posting Veteran
60 Posts |
Posted - 2010-12-21 : 16:12:51
|
| I think he may be asking about RowGUID. [RowGUID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_tblEmployee_RowGUID] DEFAULT (newid()),One reason and the reason I am changing a database to support them is for merging several remote sites into a central copy(for reporting) Thank You,John |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
Jim Beam
Posting Yak Master
137 Posts |
Posted - 2010-12-23 : 10:26:03
|
| I'm really not sure to be honest about the difference between the ID column and RowGuid, this is one of those times when I wish I'd actually finished the old SQL Server 2000 Design + Implementation course!!I've spent so much time on Prod issues I've never gotten around to a refresh of the Dev basics. Probably need a beginners guide article about how SS2K5 identifies each row, as well as the pro's and con's of how best (and when) to query by row(gu)id. I know about PK's of course but outside of that it's all a dim memory... |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2010-12-23 : 11:02:59
|
| If you use an IDENTITY column in each of the remote sites you can still uniquely identify a record by using a combination of that ID and a SiteID (or something similar). You could even surrogate that into a single identity in your central location if it makes sense. But, at least a 2 column key will work well. |
 |
|
|
|
|
|