正在加载图片...
Domain Constraints(Cont The check clause in SQl permits domains to be restricted Use check clause to ensure that an hourly-wage domain allows only values greater than a specified value create domain hourly-wage numeric(5, 2) constraint value-test check(value>=4.00) The domain has a constraint that ensures that the hourly-wage is greater than 4.00 The clause constraint value-test is optional; useful to indicate which constraint an update violated Can have complex conditions in domain check create domain Account Type char (10) constraint account-type-test check(value in( Checking,, Saving)) check(branch-name in(select branch-name from branch) Database System Concepts 6.3 @Silberschatz, Korth and SudarshanDatabase System Concepts 6.3 ©Silberschatz, Korth and Sudarshan Domain Constraints (Cont.) The check clause in SQL permits domains to be restricted: Use check clause to ensure that an hourly-wage domain allows only values greater than a specified value. create domain hourly-wage numeric(5,2) constraint value-test check(value > = 4.00) The domain has a constraint that ensures that the hourly-wage is greater than 4.00 The clause constraint value-test is optional; useful to indicate which constraint an update violated. Can have complex conditions in domain check create domain AccountType char(10) constraint account-type-test check (value in (‘Checking’, ‘Saving’)) check (branch-name in (select branch-name from branch))
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有