Definition: A view is a virtual table created by a stored SQL statement that can span multiple tables. Views can be used as a method of security within your database, and they provide a simpler front end to a user querying the data. A view is a virtual table that consists of columns from one [...]
Archive for the ‘SQL Server’ Category
Views in Sql Server
Posted in SQL Server on January 16, 2009 | Leave a Comment »
JOIN in Sql Server
Posted in SQL Server on January 16, 2009 | 1 Comment »
Definition: The SQL JOIN statement is used to combine the data contained in two relational database tables based upon a common attribute. Types of Join: Inner Join Outer Join Left Outer Join Right Outer Join Full Outer Join Cross Join 1. Inner Join: Inner Join is a default type join of SQL Server. It uses [...]
Triggers in Sql Server
Posted in SQL Server on January 16, 2009 | 1 Comment »
Introduction: The SQL CREATE TRIGGER statement provides a way for the database management system to actively control, monitor, and manage a group of tables whenever an insert, update, or delete operation is performed. The statements specified in the SQL trigger are executed each time an SQL insert, update, or delete operation is performed. An SQL [...]
Indexes in Sql Server
Posted in SQL Server on January 16, 2009 | 8 Comments »
Clustered Indexes A clustered index stores the actual data rows at the leaf level of the index. Returning to the example above, that would mean that the entire row of data associated with the primary key value of 123 would be stored in that leaf node. An important characteristic of the clustered index is that [...]
Functions in Sql Server
Posted in SQL Server on January 16, 2009 | 3 Comments »
USER DEFINED FUNCTIONS: UDF’s support a wide range of functionality and just because you can’t commit write changes to a database, it doesn’t mean that you should turn a blind eye to them. Here’s a list of the statements that you can include in the body of a UDF: Flow control statements such as IF…ELSE, [...]
SQL Query Optimization Tips
Posted in SQL Server on January 16, 2009 | Leave a Comment »
SQL Optimization Tips: Use views and stored procedures instead of heavy-duty queries. This can reduce network traffic, because your client will send to server only stored procedure or view name (perhaps with some parameters) instead of large heavy-duty queries text. This can be used to facilitate permission management also, because you can restrict [...]
