SELECT name, create_date, modify_date
FROM sys.objects
WHERE type = 'P'
AND name = '<Sp_name>'
FROM sys.objects
WHERE type = 'P'
AND name = '<Sp_name>'
h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->
| SQL Constraints |
|
| Syntax for SQL Constraints |
| SQL CREATE TABLE + CONSTRAINT Syntax |
| In SQL, we have the following constraints |
| NOT NULL - Indicates that a column cannot store NULL value UNIQUE - Ensures that each row for a column must have a unique value PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Ensures that a column (or combination of two or more columns) have an unique identity which helps to find a particular record in a table more easily and quickly FOREIGN KEY - Ensure the referential integrity of the data in one table to match values in another table CHECK - Ensures that the value in a column meets a specific condition DEFAULT - Specifies a default value when specified none for this column |
| Column Exists or Not in SQL Server |
| Common Table Expression contains three core parts |
| The CTE name (this is what follows the WITH keyword) The column list (optional) The query (appears within parentheses after the AS keyword) The query using the CTE must be the first query appearing after the CTE. |
| Use CTE in SQL Server |
| Syntax of CTE:With Parameter |
| Use CTE in SQL Server |
| Syntax of CTE:Without Parameter |
| CTE in SQL Server |
|