|
|
-
|
|
We often need to change the name of a column of a table to a new name. We can do this with the help of the Exec Sp_rename command.
The Syntax of the Sp_rename is given below:-
Exec sp_rename 'TableName.[OldColumnName]', '[NewColumnName]', 'Column'
...
|
|
-
|
|
Derived tables:-
Derived tables are the tables which are created on the fly with the help of the Select statement. It is different from the temporary table in the way that in case of temporary table, first we have to create a temporary table, insert th...
|
|
-
|
|
1. What are the Sql Joins?Sql Joins are the way to get data from many tables based on some logical conditions. The different types of Joins in Sql Server are1) Inner join or Equi join
2) Self Join (it can be considered as the part of Inner join)
3) Outer...
|
|
-
|
|
Indexes-Indexing is way to sort and search records in the table. It will improve the speed of locating and retrieval of records from the table.It can be compared with the index which we use in the book to search a particular record.
In Sql Server t...
|
|
-
|
|
SQL FUNCTION: -
Function in a database can be defined as the code segment consisting of a logical group of SQL statements which takes some input arguments (if required), run in a sequential order and returns the output either in the form of a single va...
|
|
-
|
|
Introduction
Triggers can be defined as the database objects which perform some action for automatic execution whenever users try to do execute data modification commands (INSERT, DELETE and UPDATE) on the specified tables. Triggers are bound to specifi...
|
|
-
|
|
Different Types of Sql Statements:-
DMLDML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert and update data in database.
Examples: SELECT, UPDATE, INSERT statements
Select :- This Sql Statement is used t...
|
|
-
|
|
Pivot Table:- Pivot tables are used to summarize and display the data, specially in case of report data by means of aggregating the values. Pivot table can be used if we want to display the unique values of the column of a table as the columns of another...
|
|
-
|
|
Many times we need to alter the table definition by adding , deleting or updating a column in the table. In this article, I am trying to explain the following :-
1. How to add a column
2. How to update a column
3. How to drop a column
Suppose we have a ...
|
|
-
|
|
Merge Command:- Merge command is a new feature introduced in the SQL Server 2008. It can perform Update, Insert and delete operations at a single statement which means all the data is processed and read only once instead of three times(In case of Inserti...
|
|