'LinKin Posted March 19, 2015 Share Posted March 19, 2015 Hello, I tried to remove the default ROWID of the tables in SQLite, but I get a warning saying this: dbExec failed; (1) near "WITHOUT": syntax error If I remove the WITHOUT ROWID then it works, and I really don't have problems with the script, but I'd like to save space in the database because this row id is useless (because I am defining PK's in each table) This is the code I use -- Creating 'teams' entity... dbExec(dbHandler, "CREATE TABLE IF NOT EXISTS `teams` (`name` TEXT PRIMARY KEY, `tag` TEXT UNIQUE, `color` TEXT UNIQUE, `points` INTEGER) WITHOUT ROWID") -- Creating 'accounts' entity... dbExec(dbHandler, "CREATE TABLE IF NOT EXISTS `accounts` (`name` TEXT PRIMARY KEY, `team` TEXT, FOREIGN KEY(team) REFERENCES teams(name)) WITHOUT ROWID") Link to comment
JR10 Posted March 19, 2015 Share Posted March 19, 2015 You need SQLite version 3.8.2 or later in order to use 'WITHOUT ROWID'. The latest version of SQLite included with MTA 1.4.1 is "3.7.17". Link to comment
'LinKin Posted March 19, 2015 Author Share Posted March 19, 2015 Ah thanks for the info Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now