Using "INDEX(0)" is a later manifestation of the code... don't need to know the name of the clustered index that way and that allows you to easily use this on temp tables where the PK constraint should never be explicity named.
Jeff, you copmpletely lost me there, Would you please elaborate ?
Dunno if I explained that all clearly... lemme know if you have any more questions
Great! Very clear.
I am wondering WHY the HINT should be necesswary in the statement
UPDATE Products
SET @PrevF2 = F2 = CASE WHEN F2 IS NULL THEN @PrevF2 ELSE F2 END,
@PrevTempID = TempID --Just an "anchor"
FROM Products WITH (INDEX(0))
If there is a clustered primary key in a temp table, should'nt the optimizer try an index scan without having to be told to ?
Regards