Skip to content

[Enhancement] Add IF EXISTS to truncate table #5763

@javier

Description

@javier

Is your feature request related to a problem?

A small usability improvement would be to have IF EXISTS in TRUNCATE TABLE so it will not error when table is missing, as we have with DROP TABLE

Describe the solution you'd like.

Both

TRUNCATE TABLE ratings;

and

TRUNCATE TABLE IF EXISTS ratings;

Describe alternatives you've considered.

At the moment I truncate and get an error. It'd be nice if I didn't need error control when I choose to ignore the fact table might yet not exist.

Full Name:

javier ramirez

Affiliation:

questdb

Additional context

Very minor thing. If implementation is not trivial, happy to ignore it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementEnhance existing functionalityFrictionGood first issueA great place to get familiar with the codebaseSQLIssues or changes relating to SQL execution

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions