Skip to content

tableExists

Subhajit Sahu edited this page Feb 12, 2020 · 1 revision

Generates SQL command for table exists check.

sql.tableExists(name);
// name: table name
const sql = require('extra-sql');

sql.tableExists('food');
// SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name='food');
Clone this wiki locally