There are a lot of simple things that I forgot after a while. Help documentation is important.
1. Use sql2005 system functions. You don't have to remember how to use common functions.
2. Use the template if you do not remember to create the cursor format. Double-click the template. To create a cursor, you only need to fill in the parameter. Which can be noted so much!
3. SQL Server, which has been used for a long time, has never paid attention to the transact-SQL syntax in the help document. It is useful now.
The following table lists and describes the conventions used in the syntax graph referenced by Transact-SQL.
Conventions
Used
Uppercase (uppercase)
Keyword of transact-SQL.
Italic
Parameters of the User-provided Transact-SQL syntax.
Bold (bold)
Database Name, table name, column name, index name, stored procedure, utility, data type name, and text that must be displayed as is.
Underline
Indicates the default value that is applied when the clause containing the underlined value is omitted in the statement.
| (Vertical line)
Separate the syntax items in parentheses or braces. You can only select one of them.
[] (Square brackets)
Optional. Do not enter square brackets.
{} (Braces)
Required syntax. Do not enter braces.
[,... N]
Indicates that the previous item can be repeated n times. Each item is separated by a comma.
[... N]
Indicates that the previous item can be repeated n times. Each item is separated by a space.
[;]
Optional ending characters of the transact-SQL statement. Do not enter square brackets.
<Label >::=
The name of the syntax block. This Convention is used to group and Mark long syntax segments or syntax units that can be used in multiple positions in a statement. Each location of the syntax block that can be used is indicated by a label enclosed in angle brackets: <label>.
Syntax [ With <Common_table_expression> [... n] Update [ Top (Expression )[ Percent ] {< Object > | Rowset_function_limited [ With (<Table_hint_limited> [... n])]} Set {Column_name = {expression |Default | Null } | {Udt_column_name. {property_name = expression | field_name = expression} | method_name (argument [,... n])} | column_name {. Write (Expression, @ offset, @ length)} | @ Variable = Expression | @ Variable = Column = Expression [,... n]} [,... n] [< Output Clause>] [ From {<Table_source>} [,... n] [ Where {<Search_condition> | {[ Current Of {{[ Global ] Cursor_name} | cursor_variable_name}] [ Option (<Query_hint> [,... n])] [;] < Object >::={ [SERVER_NAME. database_name. Schema_name. | database_name. [Schema_name]. | Schema_name.] table_or_view_name}
In this way, the update usage is clearly described. (Take a closer look)