-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugConfirmed bugs or reports that are very likely to be bugs.Confirmed bugs or reports that are very likely to be bugs.
Milestone
Description
When using a CHECK constraint on a column of a table which uses the IN( ... ) syntax to check that the value exists in a known set of values, the resulting table does not appear to have any columns when viewed at the "Database Structure" tab. Inserting values will still work, as will querying the table manually, but the "Browse Data" tab will show rows without any columns or data.
Example:
CREATE TABLE not_working(
_id PRIMARY KEY NOT NULL,
value NVARCHAR(5) CHECK (value IN ('a', 'b', 'c'))
);
CREATE TABLE working(
_id PRIMARY KEY NOT NULL,
value NVARCHAR(5) CHECK (value = 'a' OR value = 'b' OR value = 'c')
);
INSERT INTO not_working( _id, value ) VALUES ( 1, 'a' ), ( 2, 'b' ), ( 3, 'c' );
INSERT INTO working( _id, value ) VALUES ( 4, 'a' ), ( 5, 'b' ), ( 6, 'c' );
I'm using version 3.1.0 on Windows 7.
Metadata
Metadata
Assignees
Labels
bugConfirmed bugs or reports that are very likely to be bugs.Confirmed bugs or reports that are very likely to be bugs.