query.exec("create table person (Id int primary key,name varchar(20), typeid int)");
query.exec("insert into person values(1, 'Delhi',101)");
query.exec("insert into person values(2, 'Gurgaon',102)");
query.exec("insert into person values(3, 'Noida',103)");
query.exec("insert into person values(4, 'Gaziabad',104)");
query.exec("insert into person values(5, 'faridabad',105)");
//! [Set up the main table]
QSqlQuery query;
query.exec("create table person (Id int primary key,name varchar(20), typeid int)");
query.exec("insert into person values(1, 'Delhi',101)");
query.exec("insert into person values(2, 'Gurgaon',102)");
query.exec("insert into person values(3, 'Noida',103)");
query.exec("insert into person values(4, 'Gaziabad',104)");
query.exec("insert into person values(5, 'faridabad',105)");
//! [Set up the main table]
To copy to clipboard, switch view to plain text mode
Bookmarks