app.js
// view all departments on the database
view all departments on the database
view all departments on the database
function viewDepts(){
    const sql = `SELECT department.id AS Department_ID, department.dept_name AS Department_Name 
    FROM department ORDER BY department.id;`;
    db.query(sql, (err, row) => {
        if (err) { console.log(err); } 
        else { console.log(`\n`); console.table(row); init(); }
    })
}
function viewDepts ( ) { const sql = ` ` ; db . query ( sql , ( err , row ) => { if ( err ) { console . log ( err ) ; } else { console . log ( ` \n ` ) ; console . table ( row ) ; init ( ) ; } } ) }
view all departments on the database
view all departments on the database