question

dineshkumarc avatar image
dineshkumarc asked

Query to decrease commission by 2% for all people living in Mumbai.

How can I increase and decrease the same amount of percentage in salary_amount in workers table? i am using oracle sql 11g express edition i have uploaded a image of workers table
querydecimalbasics
workers.jpg (45.2 KiB)
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

GPO avatar image GPO commented ·
What have you tried so far? Can you give us an idea of the columns in the tables that you're working with? What RDBMS are you using?
0 Likes 0 ·
GPO avatar image GPO commented ·
Thanks for updating your question - much clearer!
0 Likes 0 ·

1 Answer

·
vinaygr24 avatar image
vinaygr24 answered
Hi Try this... for example,to deduct 2% from all residing in the city of Mumbai: UPDATE workers SET comm=comm*0.98 WHERE city="mumbai"
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

dineshkumarc avatar image dineshkumarc commented ·
thanks vinay sir
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.