Tried This Code But it gives "ER_PARSE_ERROR"
Err Description: "sqlMessage": "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Insert values ('Bitcoin')' at line 1"
var query = "CREATE TABLE IF NOT EXISTS projects (project_name VARCHAR(10)) Insert values ('" + projectName + "')";
I want to Insert a new Project in the Projects Table, create the table if it does not exists and insert the record, I can write multiple queries for this work and check response if success then proceed with the next query but I am looking for a query which does all the work concatenating multiple queries in itself.
Note: I am using mysql module in Nodejs
The process should work synchronously one after the other, when a user sends a post request to the route '/add_project' with data in body "project_name":"project1" then the server inserts the record in the mysql table projects but it generates err "No such Table " if that was the first record. I want it to work synchronously first by creating the table if not exists and then inserting the record.

CREATE TABLEandINSERTstatements?