SQL Server Database Tutorials

SQL Server Database Management Tutorials and Database Administration Articles
  Title Reverse Sort Order / Author Replies
Expressions used in query The expression used for defining a query consists of values, and different functions. The data can be easily calculated using the queries. The expressions represent formulas which are created in form of a query. The general representation of expression is as...
The aggregate functions are used for performing operation on a set of values. The result returned is a single value. The SELECT statement is used along with the function to perform the specific operations. The syntax for the aggregate function is as shown below: SELECT aggregate_function ( )...
There are many occasions where if someone updates a records or even deletes a record we need to keep the Audit trails of the record updated or deleted or even keep a history of records as what are the updates that happened on the database as well as what are the records deleted from the table. In...
SQL Server implements Client/Server technology.A number of client send queries to the Central Server.The server after receiving the query request,parses it for syntax errors and process the request.Since the query passes from the client to the server through the network it adds to network...
1. Information about user There are requirements when user wants to know that who is connected to the SQL Server. The T-SQL provides the stored procedure sp_who. It helps know who all are connected to the to the computer. The syntax for the stored procedure is as mentioned below: sp_who...
Report Server project template The report server project creates two blank folders as Shared Data sources and reports. User can start creating the report. In the Shared Data Sources folder, the following options are available. Add New Data Source: It provides the shared data source window...
Concatenating data with Multiple Result(s) using FOR XML PATH Create table #TempProducts(Items Varchar(30),Colour Varchar(15)) Insert into #TempProducts values('Table','Red'); Insert into #TempProducts values('Table','Green'); Insert into #TempProducts values('Table','Blue'); Insert...
User needs to create and manage the indexes in SQL Server. There are various types of indexes in SQL server. We shall explore in detail about the indexes in SQL Server. An index is a structure associated with the SQL Server for implementing the indexes on the tables. It enables faster data...
A trigger is a stored procedure used to execute the statements when an event is raised. The trigger is used statements for actions like insert, delete or update the data. The basics about triggers in sql server is here. In this article we will discuss about several trigger types used for...
CUBE generates a result set that represents aggregates for all combinations of values in the selected columns. CUBE automatically generates a summation rollup to the top level of a GROUP BY. Lets us look one Example. Create table #TempTable(Items varchar(30), ...
The cursor is used for accessing the set of records from the result set with a row at a time. The difference between T-SQL statement and a cursor is that the statement operates on all the records. The result set created contains the common rows and user needs to process the data per row. The...
There are several data types defined in SQL. It is necessary for the user to understand different data types available in SQL Numeric data types Date and Time types String Data types Unicode character string types Binary Data types Miscellaneous data types
The various SQL Server operators are as listed below: Comparison operators Arithmetic operators Logical operators Negation operators Arithmetic operators
In SQL, there are requirements when user needs to perform data manipulations like inserting, deleting, updating the data in the database tables. The various DML statements are used for performing the operations. Adding data in table You can add a row to a table using the INSERT statement....
Complete details regarding the query process can be viewed using the execution plan. The execution of query through the SQL Server can be viewed using the plan. The troubleshooting method is provided for the query which has slow processing. Once the query is sent to the server, a parse tree is...
Modified comparison operators are used for checking the values against the specific condition which are returned from the subquery.. Modified comparison operators The comparison operators like =, < and > are used in a query. If the subquery returns more than one value, we need to apply the...
In SQL, the set of statements are stored permanently in a function. The functions are user defined functions. User defined functions Scalar functions Table valued functions User defined functions The user defined functions is the object of database containing statements used for used...
In SQL Server, the LIKE operator is used for searching the text value in a particular column. The synonyms and antonyms of the specific word are searched using the full text search. The full text search feature is the default and enabled in SQL Server. In this article, we shall learn about the full...
There are certain conditions when either all the statements are executed successfully or none of them are executed. The data integrity is maintained by the user. The SQL Server helps user to maintain the integrity of data. There are several sources accessing a single resource at a time. To prevent...
The Service Broker helps users for creating services that can be used for sending and receiving messages. Service is used as a database object. It helps user by creating an endpoint for conversation. The following diagram shows the asynchronous messages to be communicated in Service Broker. ...