Skip to content
Advertisement

How to Update a column Before Select?

I am setting a stored procedure for select and I want to update the value of one column in the database Before doing the Select.

This is what I tried but it’s not working.

@roleID int and @query varchar(240)

Expecting update of column on database and having it’s value

Advertisement

Answer

Stored procedure can do update then select after.

So I added the query of update in the beginning, then I do the select.

Like this:

I hope that this will help someone.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement