Learn Node JS

node js sql

  • How to connect MySQL database using node js?
    If you don't install MySQL then you can install MySQL by npm install mysql. Example Create Connection You can write connection code in a single file and call in all pages where you need to interact with database. var mysql = require('mysql'); var con = mysql.createConnection({ host: "localhost", user: "your database username", password: "database password" }); con.connect(function(err) { if (err) throw err; console.log("Database Connected!"); });
  • How to pass an array in insert query using node js?
    The array of records can easily be bulk inserted into the node.js. Before insertion, you have to convert it into an array of arrays. Example var mysql = require('node-mysql'); var conn = mysql.createConnection({ // your database connection }); var sql = "INSERT INTO Test (name, email) VALUES ?"; var values = [ ['best interview question', 'info@bestinterviewquestion.com'], ['Admin', 'admin@bestinterviewquestion.com'], ]; conn.query(sql, [values], function(err) { if (err) throw err; conn.end(); });
  • Write an SQL query to fetch “FIRST_NAME” from Worker table using the alias name as .
    The required query is: Select FIRST_NAME AS WORKER_NAME from Worker;
  • Write an SQL query to fetch “FIRST_NAME” from Worker table in upper case.
    The required query is: Select upper(FIRST_NAME) from Worker;
  • Write an SQL query to print the first three characters of FIRST_NAME from Worker table.
    The required query is: Select substring(FIRST_NAME,1,3) from Worker;
  • Write an SQL query to print the FIRST_NAME from Worker table after removing white spaces from the right side.
    The required query is: Select RTRIM(FIRST_NAME) from Worker;
  • Write an SQL query to print the FIRST_NAME from Worker table after replacing ‘a’ with ‘A’.
    The required query is: Select REPLACE(FIRST_NAME,'a','A') from Worker;
  • Write an SQL query to print all Worker details from the Worker table order by FIRST_NAME Ascending.
    The required query is: Select * from Worker order by FIRST_NAME asc;
  • Write an SQL query to print details for Workers with the first name as “Vipul” and “Satish” from Worker table.
    The required query is: Select * from Worker where FIRST_NAME in ('Vipul','Satish');
  • Write an SQL query to print details of workers excluding first names, “Vipul” and “Satish” from Worker table.
    The required query is: Select * from Worker where FIRST_NAME not in ('Vipul','Satish');
  • Write an SQL query to print details of the Workers whose FIRST_NAME contains ‘a’.
    The required query is: Select * from Worker where FIRST_NAME like '%a%';

Overview

What you will learn?

Node.js is a free tool, cross-platform framework running on Mac OS, Windows, and Linux. Node.js course has been intended to help developers to learn and build web applications with the help of JavaScript. Node.js is an event-driven, server-side JavaScript environment that runs JavaScript utilizing the V8 engine developed by Google. The course focuses on different important concepts of Node.js and gives hands-on experience in building HTTP server with Node.js, working with the file system, buffers, stream, events, and multi-processing in Node.js.

What are the requirements?

Training attendees should have total knowledge of JavaScript. If you do not have so you can learn our javascript course because should be easy with web server application design concepts (such as accessing databases and SOA concepts), as well as basic HTML and CSS.

What I am going to get from this course

  • You will understand why server-side JavaScript is useful
  • Install Node.js
  • You will Learn how Node.js is architected to allow high scalability with asynchronous code
  • Create fundamentals of web applications with Node.js
  • Automate tasks with Gulp
  • Build an HTTP server using the core modules in Node.js
  • Use stream I/O to efficiently serve the web pages
  • Create modules to organize the server
  • Test the reliability of the application with unit tests
  • Turn the application to an MVC framework using Express
  • Interface to a MongoDB database and a web service

Target Audience

  • Web developers
  • DevOps engineers
  • Data Scientists
  • Game developers

Contact Us

+1-800-543-5571

Request more information

lesson loader