Call   0208 3131682   Mon-Fri 9am-6pm

Handy Woocommerce SQL queries

By October 5, 2016 PHP, SQL, Woocommerce

This post is just a place to store handy SQL queries for Woocommerce.

Get Order and all its information

Generate an Orders report and specific information about the orders (eg things like order date, shipping address etc)



Get Users and billing and shipping addresses in Woocommerce

this bit of sql is based on this post at

Get Order Objects (not strictly sql, but seems a good place to drop it)


Disclaimer: All content on this site, is use at your own risk (Always backup before changing anything in your software/database/servers etc). Techs change, go out of date etc...
I/we accept no liability if anything you use on this site adversely affects you.


  • Dana says:


    Thanks for the info. After using the 1st query to get an order and all of its information, how would you be able to export it into a sql file to import it to a new database? When I try to export it, sql is not an option. I’m assuming it’s because the query comes back with “current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available.”


    • louie171 says:

      hi Dana,

      not sure I understand properly, you should be able to export the results from most mysql guis ( you can from phpmyadmin).

  • Very cool, just what I needed and double chuffed that you’ve helped save some of my Saturday

  • Lauren says:

    Are you able to direct me to the table/field I can find the delivery notes left by the customer at the checkout to add to the shipping information export?
    Ive been through the wpjs_comments, wpjs_postmeta etc and just can’t work out where it is going?

Leave a Reply