1 | var oracledb = require('oracledb'); oracledb.getConnection( { user : "hr", password : "welcome", connectString : "localhost/XE" }, function(err, connection) { if (err) { console.error(err.message); return; } connection.execute( "SELECT department_id, department_name " + "FROM departments " + "WHERE department_id = :did", [180], function(err, result) { if (err) { console.error(err.message); return; } console.log(result.rows); }); }); |
https://github.com/oracle/node-oracledb/tree/master/examples