Data Management

Clear All Records

Summary

Hey there! In this blog post, we'll go through the steps to clear all records from a specific database table using Xano's no-code platform. This feature can be handy when you need to start fresh with a clean slate or reset your data during development or testing phases.

Step 1: Access the Function Stack

First, log into your Xano account and navigate to the Function Stack section. This is where you'll find all the built-in functions and operations available in Xano.

Step 2: Select the "Clear All Records" Function

Under the "Database Requests" category, scroll down until you find the "Clear All Records" function. This function allows you to remove all records from a chosen database table with just a few clicks.

Step 3: Choose the Table

Once you've selected the "Clear All Records" function, you'll be prompted to choose the table from which you want to remove all records. Select the desired table from the dropdown menu.

Step 4: Review the Warning

Before proceeding, Xano will display a clear warning message: "This statement will clear all records in your database table and result in data loss." This is a crucial step, as clearing all records is a permanent action, and the data cannot be recovered once deleted.

Step 5: Optional - Reset Primary ID

Xano provides an optional setting to reset the primary ID of the table back to 1 after clearing all records. By default, this option is set to "false." If you want to reset the primary ID, change the Boolean value from "false" to "true."

Step 6: Run the Function

After reviewing the warning and setting the desired options, you're ready to run the "Clear All Records" function. Simply click the "Run" button, and Xano will remove all records from the selected table.

Remember, this action is irreversible, so use it with caution, especially when working with production data. It's always a good practice to create backups or perform this operation on a staging environment before applying it to your live application.

That's it! You've successfully learned how to clear all records from a database table using Xano's no-code platform. This feature can be a real time-saver when you need to start fresh or reset your data during development or testing phases.

This transcript was AI generated to allow users to quickly answer technical questions about Xano.

Was this helpful?

I found it helpful

I need more support
Sign up for XanoSign up for Xano

Build without limits on a secure, scalable backend.

Unblock your team's progress and create a backend that will scale for free.

Start building for free