PDA

View Full Version : Table Creation Problem.



damodharan
3rd June 2010, 10:24
Dear All,

i created a table like this ,
i need primary key for both column -- id,FNumber




ret = query.exec("create table FilterNumTable "
"(id integer,"
"FNumber varchar(20),"
"Enable varchar(30),"
"Disable varchar(30),"
"PRIMARY KEY (FNumber , id))");


Table itself not creating>any one have idea in QT to how to creata a table with two
primary column.

tbscope
3rd June 2010, 10:47
Be careful with the queries themselves. There are various SQL dialects. Which database are you using?

numbat
3rd June 2010, 10:52
What does:


query.lastError().text()

return? What database are you using?

damodharan
3rd June 2010, 11:29
Be careful with the queries themselves. There are various SQL dialects. Which database are you using?

so how to create with two primay keys

damodharan
3rd June 2010, 12:11
thx to all,
issue resolved.