📜  如何检查nodejs中是否存在sqlite表 - SQL代码示例

📅  最后修改于: 2022-03-11 15:04:56.759000             🧑  作者: Mango

代码示例2
const sqlite3 = require( 'sqlite3' );
const db = new sqlite3.Database( './db.sqlite' );

db.get( 'SELECT name FROM sqlite_master WHERE type=table AND name=?', tbl, ( err, row ) => {
  if ( err ) { console.error( err ); }
} );