the answer is no, but you can simulate it in SQL Serverselect identity(int,1,1) as RowID, * into #temp from yourtableselect * from #tempor if you are using databinding, for datagrid/datalist/repeater, you can use Container.ItemIndex

解决方案 »

  1.   

    my question is how to get the row in the table exactely.cause i want to update or delete the row which user selected,but if the row has no primary key I'll can't decided which row i can update or delete.waiting for ur help.......
      

  2.   

    update yourtable set col1='newcol1',col2='newcol2',....
    where col1='oldcol1' and col2='oldcol2' and col3='oldcol3' ....
      

  3.   

    for exampletwo rows like this
    col1            col2
    1                2
    1                2this table has more than two rows,but i can only get two of them .if i can't get a column which can identify the location of it.I will have no way to know which row user selected.so the way which u said above is not valid.
      

  4.   

    Oracle的表里好像也有一个类似SQL的identity属性,叫什么忘记了。
      

  5.   

    it is your problem, since you didn't assign a unique key to the table, suggestion: add an identity column