jOOQ has the CREATE TABLE syntax, as stated in the documentation :
create.createTable(AUTHOR) .column(AUTHOR.ID, SQLDataType.INTEGER) .column(AUTHOR.FIRST_NAME, SQLDataType.VARCHAR.length(50)) .column(AUTHOR_LAST_NAME, SQLDataType.VARCHAR.length(50)) .execute();
I am wondering how to determine which column belongs to the primary key? So, is there a way in jOOQ to create a CREATE TABLE statement with PRIMARY KEY information?
I am particularly interested in the solution for SQLite, which has no syntax for adding a primary key, so I think in the worst case I need to go to a specific database solution?
source share