id name datestart endStart coursid 1 ali 2012/02/02 2012/06/02 1010 02 amir 2012/02/03 2012/03/03 2020 3 saeed 2012/02/05 2012/03/20 8020 4 amir 2012/05/06 2012/06/20 2020 5 reza 2012/01/05 2012/01/09 9090 6 amir 2013/02/03 2013/03/03 2020 7 amir 2014/02/03 2014/03/03 2020 . .
name datestart endStart coursid stage amir 2012/02/03 2012/03/03 2020 1 amir 2012/05/06 2012/06/20 2020 2 amir 2013/02/03 2013/03/03 2020 3 amir 2014/02/03 2014/03/03 2020 4
SELECT name, datestart, endStart, coursid, ROW_NUMBER() OVER (ORDER BY name) stage FROM tableName
SELECT name, datestart, endStart, coursid, ROW_NUMBER() OVER (ORDER BY name) stage FROM table_Name where name='amir'
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)