Click here to Skip to main content
15,896,269 members

Comments by Lolo1986 (Top 11 by date)

Lolo1986 25-Feb-15 16:30pm View    
This option will create a .sql file.
Lolo1986 23-Dec-14 14:05pm View    
Thanks guys! wish you happy holidays !
Lolo1986 8-Dec-14 12:28pm View    
Like you said, you can update a DB with the help of the PK, if you want to update a row.The execution plan is going to use the PK.BUT you can have a scenario where you need to update a data set, in this scenario you don't want to create a cursor to loop through each records but use an update statement based on some criteria. At this time you will realize that you execution plan won't use the PK but certainly a different index based on you WHERE clause, or maybe scan you PK, which you don't want. I am agree with most of the things you said, but it is really dangerous of saying the PK is use to update a row. You will notoce in your article in W3 Schools, they are not mentioning that a PK is used to update a row, neither on MSDN. The primary objective of the PK is uniquely identify each row of a table to enforce the integrity of the data. We are pretty much saying the same thing on 2 different point of views.

http://msdn.microsoft.com/en-us/library/ms179610.aspx
Lolo1986 8-Dec-14 12:28pm View    
Deleted
Like you said, you can update a DB with the help of the PK, if you want to update a row.The execution plan is going to use the PK.BUT you can have a scenario where you need to update a data set, in this scenario you don't want to create a cursor to loop through each records but use an update statement based on some criteria. At this time you will realize that you execution plan won't use the PK but certainly a different index based on you WHERE clause, or maybe scan you PK, which you don't want. I am agree with most of the things you said, but it is really dangerous of saying the PK is use to update a row. You will notoce in your article in W3 Schools, they are not mentioning that a PK is used to update a row, neither on MSDN. The primary objective of the PK is uniquely identify each row of a table to enforce the integrity of the data. We are pretty much saying the same thing on 2 different point of views.

http://msdn.microsoft.com/en-us/library/ms179610.aspx
Lolo1986 5-Dec-14 19:20pm View    
Hi Thomas,

"We use the primary key to control what row is to be updated," this is not true at all ! You can update a table base on whatever field you want. The primary is here only to identity uniquely each row of the table.