Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Node.js MySQL Create Table

var mysql = require('mysql');  
var con = mysql.createConnection({  
host: "localhost",  
user: "root",  
password: "12345",  
database: "javatpoint"  
});  
con.connect(function(err) {  
if (err) throw err;  
console.log("Connected!");  
var sql = "CREATE TABLE employees (id INT, name VARCHAR(255), age INT(3), city VARCHAR(255))";  
con.query(sql, function (err, result) {  
if (err) throw err;  
console.log("Table created");  
});  
});  
Comment

PREVIOUS NEXT
Code Example
Javascript :: push elements to an object 
Javascript :: axios not defined 
Javascript :: remove file from input type file jquery 
Javascript :: jquery if else on click 
Javascript :: convert milliseconds to seconds js 
Javascript :: adonis limit 
Javascript :: javascript match number 
Javascript :: discord.js how to kick a user 
Javascript :: jqery remove empty elment p 
Javascript :: jquery get all file input elements 
Javascript :: set timer jquery 
Javascript :: js remove test character from string 
Javascript :: stampare una variabile in javascript 
Javascript :: db.json 
Javascript :: javascript add class to all child elements 
Javascript :: how to move a channel to a category discord js 
Javascript :: JavaScript changing the color of an html element 
Javascript :: js cookie 
Javascript :: query params in next js 
Javascript :: javascript body element 
Javascript :: add comma to number in javascript 
Javascript :: javascript get random string char 
Javascript :: foreach jquery 
Javascript :: find the unused npm modules 
Javascript :: adding donet chart text center in react 
Javascript :: image url to file js 
Javascript :: checking if a character is an alphabet in js 
Javascript :: node colors log 
Javascript :: node js utf8 encode 
Javascript :: declare * angular jquery 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =