When creating a sequence object in SQL Server, it’s common to set various properties such as the start value, the increment, and even things like the maximum and minimum values for the sequence. But it is also possible to create a sequence without setting any of these properties.
mssql
Get All Parameters from a SQL Server Database (T-SQL)
In SQL Server we can query the sys.parameters system catalog view to return all parameters that belong to user-defined objects.
For system objects, we can query the sys.system_parameters view. We can alternatively query the sys.all_parameters system catalog view to return all parameters that belong to either user-defined or system objects.
How to Create a Synonym in SQL Server (T-SQL)
In SQL Server we can create synonyms, which allow us to provide an alternative name for a database object. Once created, we can reference the synonym instead of the object itself.
Return All DEFAULT Constraints in a SQL Server Database (T-SQL)
In SQL Server, we can query the sys.default_constraints system catalog view to return a list of DEFAULT constraints in the current database.
How to Create a Sequence in SQL Server
SQL Server supports sequences. Sequences enable us to create our own sequence of numeric values.
Sequences are similar to identity columns in that they generate a unique value that can be used to identify a column. However, sequences are created completely independently of any table.
List All Synonyms in a SQL Server Database (T-SQL)
In SQL Server, we can use the sys.synonyms system catalog view to get a list of synonyms in the current database. This view returns all objects in the sys.objects view of type SN (which stands for synonym).
Return All CHECK Constraints in a SQL Server Database (T-SQL)
In SQL Server, we can query the sys.check_constraints system catalog view to return a list of CHECK constraints in the current database.
Return the Definition of All Computed Columns in a SQL Server Database (T-SQL)
In SQL Server we can run a query against the sys.computed_columns system catalog view to return all computed columns and their definitions.
How to Drop a DEFAULT Constraint in SQL Server
In SQL Server, we can drop DEFAULT constraints by using the ALTER TABLE statement with the DROP CONSTRAINT argument.