How to update a user group id once created

Please can someone assist,

I've ran the following command which has been working ok.

INSERT INTO tbUser (UserName,UserLogin,UserGroupId)
VALUES ('TestPaul','domain\tuser',9);

Now I need to update the 'userGroupid only' to another number for this specific user 'TestPaul' e.g from 9 needs changing to 44.
How do I go about this, I tried changing INSERT INTO to UPDATE but the syntax is not correct?

The syntax for UPDATE is very different to INSERT.

Here's an Example, and the Microsoft DOCs for UPDATE statement

Try this...

	u.UserGroupId = 44
	dbo.tblUser u
	u.UserGroupId = 9
	AND u.UserName = 'TestPaul';
1 Like