Vital.sandbox
Database

db_query:truncate

Server

Removes all rows from the table


Syntax

local status = db_query:truncate()

Parameters

TypeNameDescription

Returns

TypeNameDescription
boolstatustrue on successful execution, or false on failure

Examples

local db = database.create("127.0.0.1", "root", "", "vital_sandbox")

--Remove all rows from the players table
db:table("players")
    :truncate()

On this page