Using DB Browser for SQLite I am trying to add a check constraint on a numeric field. In the Edit Table Definition screen, I can add and name the constraint, but I'm unable to add the check conditions in the CHECK() section of the command. I can copy the SQL to the SQL Editor window and add the check conditions there. Is there a way to enter the check conditions on the Edit Table Definition screen?
1 Answer
You need to double click into the Check field then type your constraint. When you single click (as I have) it will give the illusion that it's not editable. Harder clicking works :) Double Clicking into Check field
2 Comments
Eric M
That works for me. I was trying to do this on the Constraints tab instead of the Fields tab, which is another reason it wasn't working. I love DB Browser, but it does have some quirks. Thanks for answer the question after someone down-voted it. You restored my faith in Stack Overflow :)
tigrou
I think the OP is asking about adding a CHECK constraint on the table rather than a specific column.