=SQLTABLE()
SQLTABLE Formula: Pull a Table from a MySQL Database to Google Sheets
Overview
The SQLTABLE
formula is a custom function that allows you to import an entire table from a MySQL database directly into your Google Sheets without writing any SQL statement. This function supports MySQL, Microsoft SQL Server (sqlserver
), and Oracle databases (oracle
).
Syntax
Parameters
dbType
(required): The type of the database. Currently, we supportmysql
,sqlserver
(for Microsoft SQL Server), andoracle
(for Oracle database).host
(required): The host of the database.port
(required): The port of the database. Usually, it's3306
.dbName
(required): The name of the database.userName
(required): The username for database authentication.userPwd
(required): The password for database authentication.tableName
(required): The name of the table you want to import.
Usage
To use the SQLTABLE
formula, you need to provide all the required parameters. Here's an example:
This will pull all the data from the specified table in the MySQL database and import it into your Google Sheets.
Conclusion
By using the SQLTABLE
formula, you can seamlessly integrate your database information with your Google Sheets, making data analysis and manipulation easier and more efficient.
Last updated