Reputation: 793
I have a datebase and a DataGridView
that i bind by the request SELECT idUser, nameUser, idFunction FROM dbo.Users
.
How can I replace the colum "idFunction" of the grid view by "nameFunction"?
Upvotes: 0
Views: 57
Reputation: 2134
You want to use a join linking the two tables based on idFunction
SELECT idUser, nameUser, f.nameFunction FROM dbo.Users u
Inner Join table_Functions f on f.idFunction = u.idFunction
More information on joins can be found here
Upvotes: 1