/* 3. The default value is different from the default value. It can be defined once or multiple times on one or more columns of the table, it can also be applied to user-defined data types, and the default value is a database object. */-- create default Mr _ pricing as 100 -- you can see the Mr _ pricing table in the programmable --> default value -- bind the created default to Exec sp_bindefault In the table mr _ pricing, 'book1. pricing '-- result: the default value is bound to the column. -- Insert data to see how: insert into book1 (number, ibsn, title) values ('20170101', '20160301', 'javaProgramDesign ')/* Result: No. ibsn title pricing press publication date 101186 186 Java program design 100.00nullnull */-- 4, rule. it corresponds to check, especially the default and default, but it is not fixed in a column, but after it is created, specify the valid values of the inserted Table column -- create rule GZ _ pricing as @ pricing> 0 and @ pricing <10000 -- bind rule exec sp_bindrule GZ _ pricing, 'book1. pricing '-- result: the rule is bound to the column of the table. -- Insert data to see the result insert into book1 values ('20160301', '20160301', 'SQL database', 101172, 'Sun Yat-sen University', '03-13-2008 ') -- full table structure insert/* message 513, level 16, status 0, 1st row and column insertion or update conflict with the rule specified by the previous create rule statement. The statement has been terminated. The conflict occurs in the database 'book', the table 'dbo. book1', and the column 'price '. The statement has been terminated. */