Let’s suppose You are executing the query in SSMS.
update employee set Salary=Min(Salary)
where id=1
Error Message :
But getting the below error message.
Msg 157, Level 15, State 1, Line 4
An aggregate may not appear in the set list of an UPDATE statement.
Causes:
In above statement, You are using aggregate function during update values.
Solution of the Error:
You need to call subquery for ‘Salary’ column to set values .
update employee set Salary=(select min(salary) from employee)
where id=1
If you want to sell your readymade software to the genuine clients or businessman, list your software with details and demo links.
Clients will find it using our advanced search filter and will contact you directly.
No any charge for the product lsiting.