
Search In
In the following article we will go through a solution to a very common requirement of removing delete duplicate rows from SQL server table.
Let us first create a table and add sample data to this table. Col1 in the table is an identity column.
CREA
In this article we will see how to pass an array of parameters to a stored procedure using xml. For illustration purpose we will be passing the
below list of id's :
<ids>
<id>1</id>
<id>2</id>
<id>3&l
Often we may be required to get the names of all columns in a table in SQL server. In this post we will see the different options available in SQL server to fetch the column names.
1) We can use the below query to get the column names.
SELECT COLUM
By using the seed value for every new record Microsoft SQL Server's identity column generates sequential values. In this post we will learn how to reseed an identity column.
Following is the command to reset the identity property :
DBCC CHECKIDEN
We know that the data can be changed inside a field by using update command.
In this article I will guide you to replace part of the data without changing the entire data of the field. For this we will use replace command to replace a part of the co
"Back-End Testing" and "DB Testing" is the same term. In this we use to verify the DB with regard to the data which we submit though UI / getting delivered on the UI. Major entity around which the whole testing activity revolves is "Data". Some of th
In SQL, NOW() function is used to return the current system date and time.
NOW() Syntax
SELECT NOW() FROM table_name;
We have a table "employee" as below:
employee
id first_name last_name salary
....................
In SQL, FORMAT() function is used to format a column value means how a field will to be displayed.
FORMAT() Syntax
SELECT FORMAT(column_name,format) FROM table_name;
In the above syntax parameters are as below:
Parameter Description
column_
Views are virtual tables that are compiled at run time. The data associated with views are not physically stored in the view, but it is stored in the base tables of the view. A view can be made over one or more database tables.
Ex:
create view my
A SQL Injection attack is an threat or data attack mechanism used by hackers to steal sensitive information from database.
SQL Injection arises since the fields available for user input allow SQL statements to pass through and query the database dir
