0

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?

Eric M
  • 21
  • 2

1 Answers1

0

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

  • 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 :) – Eric M Sep 09 '20 at 11:13
  • I think the OP is asking about adding a CHECK constraint on the table rather than a specific column. – tigrou Mar 27 '23 at 08:16