Database
db_query:truncate
Server
Removes all rows from the table
Syntax
local status = db_query:truncate()Parameters
| Type | Name | Description |
|---|
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true 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()