在LinuxC++中,怎么在SQLite中添加列

在LinuxC++中,如何在SQLite中添加列?
sqlite3_exec(db, "create table Student(id integer primary Name, age integer);", NULL, 0, &zErrMsg);

之后我还想再添加几列。  aihao   chengji  。。。

并且比如将  77,插入chengji这一列,该如何写啊?
Linux sqlite

------解决方案--------------------
insert into Student values('','77')
------解决方案--------------------
或者以这种方式,QSqlQuery query;
   query.prepare("INSERT INTO fileInfo(macaddr, samplerno, chno, filename)"
//                            "VALUES(:macaddr, :samplerno, :chno, :filename)");
//    query.bindValue(":macaddr", macAddr);
//    query.bindValue(":samplerno", samplerNo);
//    query.bindValue(":chno", chNo);
//    query.bindValue(":filename", fileName);
//    query.exec();
------解决方案--------------------
"alter Student add column aihao string"?这样?
------解决方案--------------------
引用:
Quote: 引用:

"alter Student add column aihao string"?这样?


.lter?.was not declared in this scop

这样不行,还有没有别的办法?这是在C++程序里面添加的


这个是执行语句  而且是Alter 你看看有没有copy错
------解决方案--------------------
sqlite3_exec(db, "create table Student(id integer primary Name, age integer, aihao, chengji);", NULL, 0, &zErrMsg);
------解决方案--------------------
要添加字段的话,就得修改表结构。否则没有地方存放数据啊。