

Get in touch

Download Plugin Now
  • Follow
  • Follow
WP Data Access
  • Download
  • Support
  • Features
  • Pricing
  • Documentation
    • Tool Guide
    • App Builder
    • Data Explorer
    • SQL Query Builder
    • Plugin Settings
    • Legacy Tools
    • Remote Connections
a
M
  • Download
  • Support
  • Features
  • Pricing
  • Documentation
    • Tool Guide
    • App Builder
    • Data Explorer
    • SQL Query Builder
    • Plugin Settings
    • Legacy Tools
    • Remote Connections
Download Plugin Now

Data Explorer

  • Getting started
  • Navigation
  • Explore tables & views
  • Manage tables & views
  • Naming conventions

Manage Settings

  • Settings
  • Table Settings
  • Column Settings
  • Search Settings
  • Geolocation Settings
  • Dynamic Hyperlinks
  • Dashboard Menus

Manage Actions

  • Actions

Data Management

  • Import CSV & SQL files
  • Run SQL script files
  • Data Backup

REST API

  • Getting started
  • /wpda/table/meta
  • /wpda/table/select
  • /wpda/table/get
  • /wpda/table/insert
  • /wpda/table/update
  • /wpda/table/delete

Problems & solutions

  • InnoDB #rows estimation
  • Import file too large
  • Transfer to other WP DB
View Categories

Run SQL script files

Button Import data/Execute script(s) can be used to execute SQL script files. It allows DCL (grant or revoke access), DDL (e.g. create table, drop table) and DML (select, insert, update, delete) statements, presuming the connected user has the proper privileges (works for remote databases as well).

SQL script files may contain multiple SQL statements. There is one important rule:

Every SQL statement must end with a ; and a new line #

If you receive a message that your SQL file was successfully processed and you are not seeing any results, this is mostly because one or more SQL statements do not end with a ; and a new line.

If your SQL file is too long, you might not be able to upload it. Instead, you can add your SQL file to a ZIP file and upload the ZIP file.

You can also bundle multiple SQL files in a ZIP. This can be very useful, for example, if you want to copy tables, projects and/or publications from your development machine to a production environment. Be aware, that you have no influence on the order in which SQL files are processed. Make sure there are no dependies between SQL file within one ZIP file.

Be CAREFUL! Know what you do! Do what you know! If you have never written any SQL before, don’t start experimenting here. If you corrupt a WordPress table, you might need to restore your backup… (Do you have one? Right now?)

Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Still stuck? How can we help?

How can we help?

Updated on 2025-02-07
Import CSV & SQL filesData Backup

4 Comments

  1. Diane L Rupp
    Diane L Rupp on 2023-10-02 at 2:25 pm

    I am trying to execute a create view statement. When I execute the statement without “;” it states that it was successful, but I do not see the view listed anywhere. When I insert “;” at the end or as it is shown there is an error that the script has failed. How do I get this script to execute properly?
    Thank you for your help.
    This is the script as I have it now —
    create view `cm_section_resources` as
    select `CMBooks`.`ResDisplay` as `ResDisplay`
    , `CMBooks`.`BuyAmazon` as `BuyAmazon`
    , `CMBooks`.`ReadOnline` as `ReadOnline`
    , `CMWorksLink`.`BookID` as `BookID`
    , `CMWorksLink`.`SectionID` as `SectionID`
    from `CMWorksLink`;

    left join `CMBooks` on `CMWorksLink`.`BookID` = `CMBooks`.`BookID`;

    Reply
    • Kim Leong
      Kim Leong on 2023-10-03 at 4:12 am

      Hi Diane,

      Are you creating the view in a specific database? See here: https://share.zight.com/Blu2OBzZ

      Please send us a message via our Contact page so we can take a closer look at the issue.

      We’ll wait for your message!

      Reply
  2. Sandra A Wagner
    Sandra A Wagner on 2024-04-29 at 6:35 pm

    I uploaded a .csv file then used the designer and the query builder to make a table. When I attempted to execute the query, I received a syntax error. Here is the query:
    CREATE TABLE `CreationResourceCatalog`
    (`ID` smallint(4) NOT NULL
    ,`Title` varchar(50) NOT NULL
    ,`Ministry` varchar(50) NOT NULL
    ,`Description` varchar(1000) NOT NULL
    ,`Link` varchar(100) NOT NULL
    ,`Summary` varchar(1000) NOT NULL
    ,`Science` varchar(50) NULL
    ,`Age` varchar(50) NOT NULL
    ,`Key_Word` varchar(500) NULL
    ,`MBC_Flag` boolean(1) NOT NULL
    ) ENGINE InnoDB DEFAULT CHARACTER SET latin1 COLLATE=latin1_swedish_ci;

    Any help you can provide will be greatly appreciated. Thank you.

    Reply
    • Kim Leong
      Kim Leong on 2024-04-30 at 10:06 am

      Hi Sandra,

      Could you try the following in the Query Builder instead:


      CREATE TABLE `CreationResourceCatalog`
      (`ID` smallint(4) NOT NULL
      ,`Title` varchar(50) NOT NULL
      ,`Ministry` varchar(50) NOT NULL
      ,`Description` varchar(1000) NOT NULL
      ,`Link` varchar(100) NOT NULL
      ,`Summary` varchar(1000) NOT NULL
      ,`Science` varchar(50) NULL
      ,`Age` varchar(50) NOT NULL
      ,`Key_Word` varchar(500) NULL
      ,`MBC_Flag` boolean NOT NULL)

      Alternatively, you can design and create the table in the Data Designer too. Here’s a tutorial: https://share.zight.com/bLuQGK0r

      Let us know how it goes. Feel free to message us using the form here if you have other questions. 🙂

      Reply

Submit a Comment Cancel reply

Your email address will not be published. Required fields are marked *

Table of Contents
  • Every SQL statement must end with a ; and a new line
WP Data Access
  • Follow
  • Follow
Links
$

Imprint

$

Privacy policy

$

Cookie policy

Get in touch
$

Contact us

$

Free support forum

$

Premium support

Resources


WordPress plugin directory



YouTube tutorials

Copyright © 2025 | All Right Reserves

Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
View preferences
{title} {title} {title}