EDIT: http://sqlfiddle.com/#!2/c5489/2 (working example)
You don't need to put all of the id
s in each table, rather each table would have its own primary key ID - guaranteed to be unique, and you would most likely join each table using an inner join
Table A(user_id int, user_name varchar(255))
Table B(student_id int, student_email varchar(255))
And then select the data you want, by using the relating ID's to join:
Select user_name from TableA
INNER JOIN TableB ON
TableA.user_id = TableB.student_id