Naourass Derouichi
Naourass Derouichi

Reputation: 793

Replacing a column of DataGridView

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

Answers (1)

Kevin Kunderman
Kevin Kunderman

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

Related Questions