For example I have a table with 2 columns, first_name and last_name with these values
first_name
last_name
Ali Khani Elizabette Amini Britn
If it is MySql you can try
SELECT @n := @n + 1 n, first_name, last_name FROM table1, (SELECT @n := 0) m ORDER BY first_name, last_name
SQLFiddle
And for SQLServer
SELECT row_number() OVER (ORDER BY first_name, last_name) n, first_name, last_name FROM table1