1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

Handy SQL Snips

Oct 28, 2013
Handy SQL Snips
  • These are to be used only when necessary as most of these actions can be achieved via Fabrik itself.

    Please only use these if you are comfortable that you know what they are doing.

    Insert data into columns (top)

    Code (SQL):
    INSERT INTO your_table (column1_name, column2_name, column3_name) VALUES (1, 'another value', 450);

    Insert data into multiple columns (top)

    Code (SQL):
    INSERT INTO your_table (item_name, item_color)
    VALUES ('a boingle', 'blue'),
            ('a doingle', 'red'),
            ('a foingle', 'yellow'),
            ('a poingle', 'aqua'),
            ('a qoingle', 'green'),
            ('a shoingle', 'purple'),
            ('a loingle', 'orange');

    Delete a column (top)

    Code (SQL):
    ALTER TABLE your_table DROP COLUMN column_name;

    Change the ordering of your columns in the database table (top)

    Code (SQL):
    ALTER TABLE TABLE_NAME CHANGE field_name field_name INT(6) AFTER another_field;