HomeTable Creation and Data Manipulation Commands Give commission of Rs. 500 to all employees who joined in year 1982 10 Comments Facebook Twitter Q. Give commission of Rs. 500 to all employees who joined in year 1982 (table Empl).Table --- Answer =Update EmplSet comm = comm + 500Where hiredate between “1982-01-01” and “1982-12-31” ;
Update Empl Set comm=comm+500 where year(hiredate)=1982;
ReplyDeleteIs it correct??
No, formate of writting date (1982) is wrong.
DeleteNo i think because date format in sql is YYYY-MM-DD
ReplyDelete👍
Deleteupdate empl
ReplyDeleteset comm=comm+500
where hiredate of empl=1982
is it correct??
No, Date is not in date formate.
DeleteWhere date>=1982-01-01
ReplyDeleteIs correct
No, your query will also include year > 1982.
DeleteCan it be like Update Empl
ReplyDeleteSet comm = comm + 500
Where hiredate like "1989%";
yea its correct
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )