Tony
Tony

Reputation: 23

Could we update bit column in PolarDB?

I am using PolarDB 8.0. I have a bit column in my table: IsDeleted bit(1) NOT NULL DEFAULT b'0'

I tried to update this bit column by using: UPDATE t_order_profit_total SET IsDeleted = b'1' WHERE ( OrderId = 538001524793413 );

But I hit following error ERROR 1048 (23000): Column 'IsDeleted' cannot be null

Any idea why?

IsDeleted bit(1) NOT NULL DEFAULT b'0'

This column is not not null and it has a default value '0'.

Hence it could not be null.

Upvotes: 0

Views: 66

Answers (0)

Related Questions