0
votes

My query:

update sc 
set grade = 80
where grade = 90

results in this error:

Msg 229, Level 14, State 5, Line 1
The SELECT permission was denied on the object 'sc', database 'student', schema 'dbo'.

I have typed this, and it get worked

grant UPDATE (grade) on sc to MyUserName

enter image description here

1
And what is your question?JohnyL
Okay. Good for you. What was the question again? stackoverflow.com/tourDxTx

1 Answers

0
votes

I figured it out.

My query:

update sc 
set grade = 80
where grade = 90

I need permission to update and select, so I need to modify to

update sc
set grate = 80

or

grant UPDATE,SELECT (grade) on sc to MyUserName