Recently read the "SQL SERVER 2008 Complete Manual", see the ebook has not been the habit of taking notes, so many things learned and forget, basically equal to not learn.
Familiar and already mastered knowledge points are no longer recorded, here only to record the more uncommon knowledge points in learning:
Database Engine:
Stores and processes relationships, and is responsible for the storage, processing, and security management of the data. Analysis Services:
Identity property:
With identity, you can set a column to an identity column, which increases the number of rows in the table.
The identity must specify two values: a seed value and an increment value. Identity (seed, increment)
eg. CREATE TABLE Test (ID nchar (0,1) PRIMARY KEY not NULL)
Default property:
Fields that are not valued are automatically used with default modifiers. e.g. CREATE TABLE test (ID nchar (TEN) not NULL default "not Attend")
Use rules: Create rules:
Binds a rule to a data table column or to a user-defined data type after the rule is created. When you create a rule, you must satisfy the rule if you insert or update data to the column or data type of the binding rule.
Create Rule Rule_name
As
Condition_expression
E.g:create rule compare as @value > 0
Binding rules:
Use stored procedure sp_bindrule.
Sp_bindrule rule_name, Object column name
e.g:
Use Test EXEC
Sp_bindrule ' compare ', ' test.column '
Unbind:
Unbind using stored procedure Sp_unbindrule
e.g:
Use Test
EXEC sp_unbindrule ' compare ', ' test.column '
To view the rules:
You can use sp_help stored procedures to view rules.
Use Test
EXEC sp_help Compare
View the definition of a rule use Test EXEC sp_helptext Date
To delete a rule:
Drop Rule RuleName