How to properly read SQL Server syntax?
In the MSDN Library or the Technet website, Microsoft tend to use a pseudo
syntax in explaining how to use T-SQL statements with all available
options. Here is a sample taking from the Technet page on UPDATE
STATISTICS :
UPDATE STATISTICS table_or_indexed_view_name
[
{
{ index_or_statistics__name }
| ( { index_or_statistics_name } [ ,...n ] )
}
]
[ WITH
[
FULLSCAN
| SAMPLE number { PERCENT | ROWS }
| RESAMPLE
| <update_stats_stream_option> [ ,...n ]
]
[ [ , ] [ ALL | COLUMNS | INDEX ]
[ [ , ] NORECOMPUTE ]
] ;
<update_stats_stream_option> ::=
[ STATS_STREAM = stats_stream ]
[ ROWCOUNT = numeric_constant ]
[ PAGECOUNT = numeric_contant ]
How to properly read such description and quickly figure out what is
required and what is optional and a clean way to write your query?
No comments:
Post a Comment