Hi,

I don't think that that is a question for the Qt Programming forum, since it is basic and pure SQL!

Anyway, make yourself familiar with QSqlQuery::prepare() which can help you in future and grap any book/online resource on SQL syntax:
sql Code:
  1. SELECT column1, column2, columnX, columnY, columnZ FROM myDatabase LIMIT 2;
To copy to clipboard, switch view to plain text mode 

And if you want to call that statement every 1/2 second, which sounds crazy for me, you should consider storing the constructed SQL statement.