Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
VARCHAR(30)MicrosoftSQLServerデータベースに列があります。列の値が3文字未満にならないようにするCHECK制約を追加したいと思います。私が使わなければならない表現は何ですか?
VARCHAR(30)
使用する:
ALTER TABLE [dbo].[YOUR_TABLE] ADD CONSTRAINT [MinLengthConstraint] CHECK (DATALENGTH([your_column]) > 2)
参照: