500 Rockets First Dev File

Introduction: This is an H2 Heading

This is body copy introduction.

This is an H2 Heading

This is core body copy.

This is an H2 Heading

This is body copy.

The following is a code sample.

v12.10.0

You can use the same -v option to have Node return its installed version of npm:

npm -v

This is an H3

Code sample:

Now use the select statement to display the newly inserted records in the table

 id | firstname | lastname | age |       address       |    email           
----+-----------+----------+-----+---------------------+----------------
  1 | Cory      | Gibes    |  23 | 83649 W Belmont Ave | cory.gibes@gmail.com
  2 | Danica    | Bruschke |  22 | 840 15th Ave        |   bruschke@gmail.com
  3 | Natalie   | Fern     |  24 | 7140 University Ave |     fern@hotmail.com
  4 | Mary Ann  | Wilters  |  20 | 74 S Westgate St    | mroyster@royster.com
(4 rows)

Conclusion: This is an H2

WRITERS: Please write a conclusion "node js postgresql query example".

Just the Code


const {Pool,Client} = require('pg')

const pool = new Pool({
    user: "postgres",
    host: "localhost",
    database: "test",
    password: "1234",
    port: "5432"
})

pool.query("INSERT INTO student(firstname, lastname, age, address, email)VALUES('Mary Ann', 'Wilters', 20, '74 S Westgate St', 'mroyster@royster.com')", (err,res)=>{
    console.log(err,res)
    pool.end()
})
An innovative marketing agency specializing in marketing tactics designed to produce positive results.
Office Address:
5541 McNeil Dr
Building A
Austin, TX 78729
(628) 333-3450

Email Us