I want to create a table with a named query, but on another database. And get the name of the database with a parameter.
I'm trying to do it like this
<sql-query name="createStatement">
<query-param name="dbName" type="string"/>
CREATE TABLE `:dbName`.`test` (
`customer_id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`customer_id`)
);
</sql-query>
But I'm getting the Unknown Parameter name Exception. I have tried adding spaces or remove the ` character, but still not working.
What is the correct way to set this parameter?