Jump to content

[Solved] SQL Query to mass update product weight


Recommended Posts

Hi. I am trying to set up shipping cost per item based on weight and I'm still new with SQL.


1. How can I update all the weight of each item in my store to 1 using SQL query?

2. How can I set the default weight of new item as 1?


I tried the following query but it gives the error below. Currently running the prestashop


update 'ps_product' set weight=1


The error:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''ps_product' set weight=1' at line 1
Edited by syntaxed (see edit history)
  • Like 1
Link to comment
Share on other sites

He doesn't like your type of quotes around ps_product. Use ` instead of ' :blink:


Try copy this:

UPDATE `ps_product` SET weight= 1


My $0.02,



Thanks! that works great. I'm sorry, but I have another silly question. How do I even type that type of quote on my keyboard?

Link to comment
Share on other sites

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...