In SQL Server2000 a table having similer rows. How can you update a row?
madhukumar koppula
Create an identity column, every row will be set a differnt id automatically.
There are no simile rows now.
this problem is rectified in SQL Server 2005. i.e .. row_number() concept is there.
it's possible in Oracle becoz rowID concept is there. But It's not possible in SQL Server. There is no rowID concept. But it is possible in a different way i.e replicating a table. For Example
Employee Table having two columns i.e
empno empname
10 Shilpa
in this case we have to use replication concept on employee table by using select into statement.
syntax:
select rowno=identity(int,1,1), empno, empname
into employee1
from employee
Identity is a function it is used only in Select Into Statement.
* IDENTITY ( data_type [ , seed , increment ] ) AS column_name
Result:
rowno empno empname
1 10 shilpa
2 10 shilpa
By using 'rowno' we have to update the table where updation is occur.
Thanks ..!
MadhuKumarKoppula