Sybase SQL Anywhere - campo identity

 
Vista:

campo identity

Publicado por AMIRA BEATRIZ loyola (2 intervenciones) el 01/12/2008 17:57:15
Necesito saber si el cmapo identity, maneja consurrencia????

gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

Respuesta y Duda...

Publicado por Leopoldo Taylhardat (83 intervenciones) el 01/12/2008 18:34:06
Saludos...
La concurrencia la maneja el gestor.
En ASA no hay campo IDENTITY sino 'autoincrement' se maneja el IDENTITY en los triggers para conocer el valor del campo de auotincrement...
ej.
Declare @secuencia integer;
SELECT @@IDENTITY into @secuencia;

Del Manual: Variables globales de ASA:

@@identity Last value inserted into an IDENTITY column by an INSERT or SELECT INTO statement. @@identity is reset each time a row is inserted into a table. If a statement inserts multiple rows, @@identity reflects the IDENTITY value for the last row inserted. If the affected table does not contain an IDENTITY column, @@ identity is set to 0. The value of @@identity is not affected by the failure of an INSERT or SELECT INTO statement, or the rollback of the transaction that contained it. @@identity retains the last value inserted into an IDENTITY column, even if the statement that inserted it fails to commit.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar