Is there a function to show the table name at sql server?
I want to check if the user is found at a specific table, the table’s name should be returned, can I do it?
IF EXISTS(
SELECT Std_ID
FROM Student
WHERE Std_ID = @UserId)
I want it here to return Student.
Since you already know you’re going to check the Student table, just return the value ‘Student’