Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript sql

const mysql = require('mysql');

const sqlServer = mysql.createConnection({
  host: 'localhost',
  user: 'yourusername',
  password: 'yourpassword',
});

sqlServer.connect((error) => {
  console.log('Connected To Database!');
  sqlServer.query('SELECT * FROM applicaton.customers', (queryError, result) => {
    console.log(result);
  });
});
 
PREVIOUS NEXT
Tagged: #javascript #sql
ADD COMMENT
Topic
Name
1+5 =