NEED HELP!!!! :(
I have to finish a task in our project, lets say for example employees table has columns employee_id, username and password...
How will i print the username and password based on employee_id? please help me :(
NEED HELP!!!! :(
I have to finish a task in our project, lets say for example employees table has columns employee_id, username and password...
How will i print the username and password based on employee_id? please help me :(
This is one of the best ways to accidentally passwords and embarrass your company.
and certainly never print them out.
You should destroy your password
column and replace it with an SHA-512 hash.
To answer the question:
SELECT Username FROM employee WHERE emplyee_id = @id
What are you using? T-SQL?
First of all NEVER store/print passwords in plain text. But..
SELECT username, password FROM table ORDER BY employee_id
Or if you want to select the username for each employee individually then
SELECT username, password FROM table WHERE employee_id = @id
Where @id is the employee id number of the employee you want the information about.