There is a very helpful document about dataset queries, you should check it :
http://www.smartface.io/developer/guides/data-network/sql-query-execution/
Try the code below :
var myEditbox = new SMF.UI.EditBox({
left : "10%",
top : "20%",
text : ""
});
var myButton1 = new SMF.UI.TextButton({
left : "10%",
top : "40%",
text : "create insert",
onPressed : function (e) {
Data.execute("Create table Sample_Table (col1 int)");
Data.execute("insert into Sample_Table (col1) values(?)", myEditbox.text);
}
});
var myButton2 = new SMF.UI.TextButton({
left : "10%",
top : "60%",
text : "value",
onPressed : function (e) {
var myValue = Data.execute('select col1 from Sample_Table where rowId = 1');
alert(myValue);
}
});
Add these 3 objects to your page, it will work.