Fichier de travail (INPUT) : ./DUMP-TEXT/1-99.txt
Encodage utilisé (INPUT) : utf-8
Forme recherchée : identity|هویت
_________________________________________________________________________________________________
Ligne n°1 : ... #Stack Overflow Feed for question 'What is the difference between- Ligne n°2 : Scope_Identity(), Identity(), @@Identity, and Ident_Current()?'
- Ligne n°2 : Scope_Identity(), Identity(), @@Identity, and Ident_Current()?'
- Ligne n°2 : Scope_Identity(), Identity(), @@Identity, and Ident_Current()?'
- Ligne n°56 : What is the difference between Scope_Identity(), Identity(), @@Identity, and
- Ligne n°56 : What is the difference between Scope_Identity(), Identity(), @@Identity, and
- Ligne n°56 : What is the difference between Scope_Identity(), Identity(), @@Identity, and
Ligne n°57 : Ident_Current()? ...- Ligne n°68 : I know Scope_Identity(), Identity(), @@Identity, and Ident_Current()
- Ligne n°68 : I know Scope_Identity(), Identity(), @@Identity, and Ident_Current()
- Ligne n°68 : I know Scope_Identity(), Identity(), @@Identity, and Ident_Current()
Ligne n°69 : all get the value of the identity column, but I would love to know the ...
Ligne n°68 : ... I know Scope_Identity(), Identity(), @@Identity, and Ident_Current()- Ligne n°69 : all get the value of the identity column, but I would love to know the
Ligne n°70 : difference. ...
Ligne n°76 : ... them?- Ligne n°77 : sql sql-server identity
Ligne n°78 : share|improve this question ...
Ligne n°86 : ... Don't forget about the parallel execution bug that exists in SQL- Ligne n°87 : Server for SCOPE_IDENTITY and @@IDENTITY:
- Ligne n°87 : Server for SCOPE_IDENTITY and @@IDENTITY:
Ligne n°88 : support.microsoft.com/default.aspx?scid=kb;en-US;2019779 – David d ...
Ligne n°107 : ... (BUTTON)- Ligne n°108 : * The @@identity function returns the last identity created in the
- Ligne n°108 : * The @@identity function returns the last identity created in the
Ligne n°109 : same session. ...
Ligne n°109 : ... same session.- Ligne n°110 : * The scope_identity() function returns the last identity created in
- Ligne n°110 : * The scope_identity() function returns the last identity created in
Ligne n°111 : the same session and the same scope. ...
Ligne n°111 : ... the same session and the same scope.- Ligne n°112 : * The ident_current(name) returns the last identity created for a
Ligne n°113 : specific table or view in any session. ...
Ligne n°113 : ... specific table or view in any session.- Ligne n°114 : * The identity() function is not used to get an identity, it's used
- Ligne n°114 : * The identity() function is not used to get an identity, it's used
Ligne n°115 : to create an identity in a select...into query. ...
Ligne n°114 : ... * The identity() function is not used to get an identity, it's used- Ligne n°115 : to create an identity in a select...into query.
- Ligne n°120 : A situation where the scope_identity() and the @@identity functions
- Ligne n°120 : A situation where the scope_identity() and the @@identity functions
Ligne n°121 : differ, is if you have a trigger on the table. If you have a query that ...
Ligne n°122 : ... inserts a record, causing the trigger to insert another record- Ligne n°123 : somewhere, the scope_identity() function will return the identity
- Ligne n°123 : somewhere, the scope_identity() function will return the identity
Ligne n°124 : created by the query, while the @@identity function will return the ...
Ligne n°123 : ... somewhere, the scope_identity() function will return the identity- Ligne n°124 : created by the query, while the @@identity function will return the
Ligne n°125 : identity created by the trigger. ...
Ligne n°124 : ... created by the query, while the @@identity function will return the- Ligne n°125 : identity created by the trigger.
- Ligne n°127 : So, normally you would use the scope_identity() function.
Ligne n°128 : share|improve this answer ...
Ligne n°133 : ... I chose this as the answer, because of the "A situation where the- Ligne n°134 : scope_identity() and the @@identity..." paragraph. It clarified
- Ligne n°134 : scope_identity() and the @@identity..." paragraph. It clarified
Ligne n°135 : things more. – Tebo Dec 17 '09 at 10:14 ...
Ligne n°137 : ... As David Freitas mentioned above, there is a bug in the- Ligne n°138 : implementation of scope_identity, so I recommend to use an
Ligne n°139 : alternative method, the OUTPUT clause. See my answer below. ...
Ligne n°157 : ... Good question.- Ligne n°158 : * @@IDENTITY: returns the last identity value generated on your SQL
- Ligne n°158 : * @@IDENTITY: returns the last identity value generated on your SQL
Ligne n°159 : connection (SPID). Most of the time it will be what you want, but ...
Ligne n°161 : ... INSERT, and the trigger executes another INSERT statement).- Ligne n°162 : * SCOPE_IDENTITY(): returns the last identity value generated in the
- Ligne n°162 : * SCOPE_IDENTITY(): returns the last identity value generated in the
Ligne n°163 : current scope (i.e. stored procedure, trigger, function, etc). ...
Ligne n°163 : ... current scope (i.e. stored procedure, trigger, function, etc).- Ligne n°164 : * IDENT_CURRENT(): returns the last identity value for a specific
Ligne n°165 : table. Don't use this to get the identity value from an INSERT, ...
Ligne n°164 : ... * IDENT_CURRENT(): returns the last identity value for a specific- Ligne n°165 : table. Don't use this to get the identity value from an INSERT,
Ligne n°166 : it's subject to race conditions (i.e. multiple connections ...
Ligne n°167 : ... inserting rows on the same table).- Ligne n°168 : * IDENTITY(): used when declaring a column in a table as an identity
- Ligne n°168 : * IDENTITY(): used when declaring a column in a table as an identity
Ligne n°169 : column. ...
Ligne n°174 : ... To summarize: if you are inserting rows, and you want to know the value- Ligne n°175 : of the identity column for the row you just inserted, always use
Ligne n°176 : SCOPE_IDENTITY(). ...
Ligne n°175 : ... of the identity column for the row you just inserted, always use- Ligne n°176 : SCOPE_IDENTITY().
Ligne n°177 : share|improve this answer ...- Ligne n°204 : Thus the differences between the three identity retrieval methods are
Ligne n°205 : as follows: ...- Ligne n°207 : @@identity returns the last identity value generated in this session
- Ligne n°207 : @@identity returns the last identity value generated in this session
Ligne n°208 : but any scope. ...- Ligne n°210 : scope_identity() returns the last identity value generated in this
- Ligne n°210 : scope_identity() returns the last identity value generated in this
Ligne n°211 : session and this scope. ...- Ligne n°213 : ident_current() returns the last identity value generated for a
Ligne n°214 : particular table in any session and any scope. ...
Ligne n°229 : ... Scope means the code context that performs the INSERT statement- Ligne n°230 : SCOPE_IDENTITY(), as opposed to the global scope of @@IDENTITY.
- Ligne n°230 : SCOPE_IDENTITY(), as opposed to the global scope of @@IDENTITY.
Ligne n°231 : CREATE TABLE Foo( ...
Ligne n°231 : ...CREATE TABLE Foo(- Ligne n°232 : ID INT IDENTITY(1,1),
Ligne n°233 : Dummy VARCHAR(100) ...
Ligne n°236 : ...CREATE TABLE FooLog(- Ligne n°237 : ID INT IDENTITY(2,2),
Ligne n°238 : LogText VARCHAR(100) ...
Ligne n°247 : ...INSERT INTO Foo (Dummy) VALUES ('x')- Ligne n°248 : SELECT SCOPE_IDENTITY(), @@IDENTITY
- Ligne n°248 : SELECT SCOPE_IDENTITY(), @@IDENTITY
Ligne n°266 : ... I would recommend staying away from all three of these. Instead, you- Ligne n°267 : can use the OUTPUT clause to get the inserted identity value. The other
Ligne n°268 : advantage is that OUTPUT even works if you have inserted more than one ...- Ligne n°271 : For details and examples see here: Identity Crisis
Ligne n°272 : share|improve this answer ...- Ligne n°287 : To clarify the problem with @@Identity:
Ligne n°289 : ... For instance, if you insert a table and that table has triggers doing- Ligne n°290 : inserts, @@Identity will return the id from the insert in the trigger
Ligne n°291 : (a log_id or something), while scope_identity() will return the id from ...
Ligne n°290 : ... inserts, @@Identity will return the id from the insert in the trigger- Ligne n°291 : (a log_id or something), while scope_identity() will return the id from
Ligne n°292 : the insert in the original table. ...- Ligne n°294 : So if you don't have any triggers, scope_identity() and @@identity will
- Ligne n°294 : So if you don't have any triggers, scope_identity() and @@identity will
Ligne n°295 : return the same value. If you have triggers, you need to think about ...- Ligne n°310 : Scope Identity: Identity of last record added within the stored
- Ligne n°310 : Scope Identity: Identity of last record added within the stored
Ligne n°311 : procedure being executed. ...- Ligne n°313 : @@Identity: Identity of last record added within the query batch, or as
- Ligne n°313 : @@Identity: Identity of last record added within the query batch, or as
Ligne n°314 : a result of the query e.g. a procedure that performs an insert, the ...
Ligne n°315 : ... then fires a trigger that then inserts a record will return the- Ligne n°316 : identity of the inserted record from the trigger.
- Ligne n°318 : IdentCurrent: The last identity allocated for the table.
Ligne n°319 : share|improve this answer ...- Ligne n°334 : As for the difference between SCOPE_IDENTITY and @@IDENTITY, suppose
- Ligne n°334 : As for the difference between SCOPE_IDENTITY and @@IDENTITY, suppose
Ligne n°335 : that you have a stored procedure P1 with three statements: ...
Ligne n°335 : ... that you have a stored procedure P1 with three statements:- Ligne n°336 : - An INSERT that generates a new identity value
Ligne n°337 : - A call to a stored procedure P2 that also has an INSERT statement ...
Ligne n°337 : ... - A call to a stored procedure P2 that also has an INSERT statement- Ligne n°338 : that generates a new identity value
Ligne n°339 : - A statement that queries the functions SCOPE_IDENTITY and ...
Ligne n°338 : ... that generates a new identity value- Ligne n°339 : - A statement that queries the functions SCOPE_IDENTITY and
Ligne n°340 : @@IDENTITY The SCOPE_IDENTITY function will return the value ...
Ligne n°339 : ... - A statement that queries the functions SCOPE_IDENTITY and- Ligne n°340 : @@IDENTITY The SCOPE_IDENTITY function will return the value
- Ligne n°340 : @@IDENTITY The SCOPE_IDENTITY function will return the value
Ligne n°341 : generated by P1 (same session and scope). The @@IDENTITY function ...
Ligne n°340 : ... @@IDENTITY The SCOPE_IDENTITY function will return the value- Ligne n°341 : generated by P1 (same session and scope). The @@IDENTITY function
Ligne n°342 : will return the value generated by P2 (same session irrespective of ...
Ligne n°356 : ...Not the answer you're looking for? Browse other questions tagged sql- Ligne n°357 : sql-server identity or ask your own question.
Ligne n°373 : ... 0- Ligne n°374 : What is the difference of Scope_Identity and @@Identity
- Ligne n°374 : What is the difference of Scope_Identity and @@Identity
Ligne n°375 : 1 ...
Ligne n°375 : ... 1- Ligne n°376 : What is the difference between newsequentialid, scope_identity and
Ligne n°377 : @@identity? ...
Ligne n°376 : ... What is the difference between newsequentialid, scope_identity and- Ligne n°377 : @@identity?
Ligne n°378 : 0 ...
Ligne n°384 : ... 1- Ligne n°385 : using @@identity when a trigger is fired in response to an INSERT, and
Ligne n°386 : the trigger executes another INSERT statement ...
Ligne n°393 : ... 0- Ligne n°394 : Get the identity of an insert inside a trigger
Ligne n°395 : see more linked questions… ...
Ligne n°401 : ... 1070- Ligne n°402 : Best way to get identity of inserted row?
Ligne n°403 : 1364 ...
Ligne n°409 : ... 160- Ligne n°410 : How to change identity column values programmatically?
Ligne n°411 : 896 ...