This page provides a basic overview of the process and links to the full documentation for each step.
1. Connect to Your External Database
Use the External Database Query function to create a connection to your external database.Xano supports PostgreSQL, MS SQL, Oracle, and MySQL.
- Add a new function in your Function Stack → Database Operations → External Database Query.
- Enter a connection string with your database details (host, port, username, password).
- Save to test and establish the connection.
2. Build and Run SQL Queries
Once connected, use the Direct Database Query function to run SQL statements against your external database.- Add a new function → Database Operations → Direct Database Query.
- Write SQL in the Code field or use the SQL Query Wizard.
- Use Statement Args (
?
) to safely insert dynamic variables. - Return either a single record or a list of records.
3. Migrate Data into Xano
After retrieving data, use Bulk Operations to insert or update records inside your Xano database.- Add a Bulk Operations function to your Function Stack.
- Map the retrieved data from your query to the fields in your Xano table.
- Run the function to perform a fast, large-scale migration.
Quick Links
Use the cards below to dive into the full documentation for each feature:External Database Query
Learn how to connect to PostgreSQL, MS SQL, Oracle, or MySQL and generate a
connection string.
Direct Database Query
Write and run SQL queries, use statement arguments, and leverage the SQL Query
Wizard.
Bulk Operations
Insert, update, or upsert large amounts of data efficiently inside Xano.