2

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 1

2

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

Sign up to request clarification or add additional context in comments.

2 Comments

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 :)
I think the OP is asking about adding a CHECK constraint on the table rather than a specific column.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.