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.
電話番号の列が必要なテーブルを作成しています。
私がしなければならない制限は、最初の文字が「0」でなければならないということです。
これを行うにはどうすればよいですか?
alter table YourTable add constraint CHK_YourTable_PhoneNr check (PhoneNr like '0%')
またはさらに簡単:
create table tab_name( phone_nr type char(15) check ( phone_nr like '0%' ) );