
Search In
Truncate and drop both are similar to each other as they are used to delete the complete data of a table.
The difference between them is this truncate only delete the data of the table where as the table structure is there but when we drop the table
While writing insert or update queries in the SQL server, we need to use the predefined functions of the SQL to get the current inserted or the updated record in the table.
For this we use the function called the scope identity for getting t
In SQL server sometimes we need to get the median of the data in the table.
Median is the middle value that lies in the set of values that we are doing the manipulation.
To get the median, we need to be able to accom
Displaying running totals is a common request, and there is no straightforward way to do so in SQL.
The idea for using SQL to display running totals similar to that for displaying rank: first do a self-join, then, list out the result
COALESCE():-
COALESCE is a function in SQL Server which returns the first non NULL expression amongst its parameter. If all the parameters are evaluated to NULL, It will return NULL
Syntex:-
COALESCE( expre
Hello friends, I was facing issue of getting country name from IP address. Here I am going to tell you how to resolve this issue by passing IP address and retrieving country name. There are many APIs which will do this for you. I am using the service
Many times when we manage SQL server databases we need to determine how much space each table is consuming on disk. In this blog we will learn two approaches for solving this frequently encountered common problem.
Approach 1:
We can use
While manipulating with the date and time data of the SQL columns we have requirements where we want to alter the date or time based on some condition or for checking validation in our application.
For doing such kind of operation in your da
During management of SQL server database many times we need to get list all triggers in SQL Server database with table name and table's schema . Following query can be used to get the desired result.
SELECT
sysobjects.name AS
Many times during SQL server development we need to search for a stored procedure containing a specific text. This helps in checking for dependencies for objects in stored procedures or sometimes we might be simply interested in searching for a hard
