I assure you I'm working with QtSQL almost every day and such statements work just fine Your problem is related strictly to your installation and/or the version of Qt and/or MySQL you are using. If changing the version of Qt doesn't help, try changing the version of MySQL client library you are using.