title: How to get the data from database in node.js?
body: <p>I want to get the data from database. I tried like this but what happening here is that, I am getting the total number rows. But I want the total data. Can any one help me?</p>
  
  <pre><code>connection.on('connect',function(err){
   if(err){
        console.log(err)
   }else{
   var sql = "SELECT * FROM xxxxx";
     var request = new Request(sql,
     function(err,result){
         if(err){
             console.log(err);
         }else{
             console.log("hello:"+result)
         }
     });
     connection.execSql(request);
   } 
   });
  </code></pre>
  
  <p>I need the total data from database.</p>