# SQL command to update VAT on all products and services with a certain vat amount

**URL:** <https://www.dolibarr.org/forum/t/sql-command-to-update-vat-on-all-products-and-services-with-a-certain-vat-amount/24407>\
**Category:** Using my Dolibarr\
**Tags:** VAT\
**Created:** [October 12, 2023, 1:46pm UTC](https://www.dolibarr.org/forum/t/sql-command-to-update-vat-on-all-products-and-services-with-a-certain-vat-amount/24407 "2023-10-12T13:46:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![egils](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/e/a88e57/32.png) [@egils](https://www.dolibarr.org/forum/u/egils)\
**Post date:** [October 12, 2023, 1:46pm UTC](https://www.dolibarr.org/forum/t/sql-command-to-update-vat-on-all-products-and-services-with-a-certain-vat-amount/24407/1 "2023-10-12T13:46:29Z")

</div>

UPDATE public.llx\_product  
SET tva\_tx = 12  
WHERE tva\_tx = 6;

---

<div class="post-metadata">

**Author:** ![sonikf](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@sonikf](https://www.dolibarr.org/forum/u/sonikf)\
**Post date:** [October 12, 2023, 8:24pm UTC](https://www.dolibarr.org/forum/t/sql-command-to-update-vat-on-all-products-and-services-with-a-certain-vat-amount/24407/2 "2023-10-12T20:24:25Z")

</div>

Hi @egils  
No need for that  
Home → Admin Tools → Global VAT Update

---

<div class="post-metadata">

**Author:** ![egils](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/e/a88e57/32.png) [@egils](https://www.dolibarr.org/forum/u/egils)\
**Post date:** [October 13, 2023, 9:56am UTC](https://www.dolibarr.org/forum/t/sql-command-to-update-vat-on-all-products-and-services-with-a-certain-vat-amount/24407/3 "2023-10-13T09:56:16Z")

</div>

I disagree, I had some products with 25% VAT that I wanted to keep that way 😀

Your solution would have changed all products in the llx\_products table which is not what I wanted.

---

<div class="post-metadata">

**Author:** ![sonikf](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@sonikf](https://www.dolibarr.org/forum/u/sonikf)\
**Post date:** [October 13, 2023, 12:59pm UTC](https://www.dolibarr.org/forum/t/sql-command-to-update-vat-on-all-products-and-services-with-a-certain-vat-amount/24407/4 "2023-10-13T12:59:18Z")

</div>

Hi @egils,  
No, it does exactly the same thing as in your sql example, it will only change those ones with 6% to 12%
