Skip to content

Commit 6b6264f

Browse files
committed
Update basic example
1 parent 61a5ff6 commit 6b6264f

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ oracledb.getConnection(
5555
if (err) { console.error(err.message); return; }
5656

5757
connection.execute(
58-
"SELECT department_id, department_name FROM departments WHERE department_id = :did",
59-
[180], // bind value for :did
58+
"SELECT department_id, department_name " +
59+
"FROM departments " +
60+
"WHERE manager_id < :id",
61+
[110], // bind value for :id
6062
function(err, result)
6163
{
6264
if (err) { console.error(err.message); return; }
@@ -68,7 +70,7 @@ oracledb.getConnection(
6870
With Oracle's sample HR schema, the output is:
6971

7072
```
71-
[ [ 180, 'Construction' ] ]
73+
[ [ 60, 'IT' ], [ 90, 'Executive' ], [ 100, 'Finance' ] ]
7274
```
7375

7476
## <a name="examples"></a> 2. Examples

doc/api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ oracledb.getConnection(
152152
return;
153153
}
154154
connection.execute(
155-
"SELECT department_id, department_name "
156-
+ "FROM departments "
157-
+ "WHERE department_id = :did",
158-
[180],
155+
"SELECT department_id, department_name " +
156+
"FROM departments " +
157+
"WHERE manager_id < :id",
158+
[110], // bind value for :id
159159
function(err, result)
160160
{
161161
if (err) {
@@ -170,7 +170,7 @@ oracledb.getConnection(
170170
With Oracle's sample HR schema, the output is:
171171

172172
```
173-
[ [ 180, 'Construction' ] ]
173+
[ [ 60, 'IT' ], [ 90, 'Executive' ], [ 100, 'Finance' ] ]
174174
```
175175

176176
There are more node-oracledb examples in the

0 commit comments

Comments
 (0)