Wednesday, 6 December 2017

The SQL Query to find the data between the range(NUMBER,TEXT, DATE)

The SQL BETWEEN Operator
The BETWEEN operator selects values within a given range. The values can be numbers, text, or dates.
The BETWEEN operator is inclusive: begin and end values are included.

SELECT * FROM Display_Info WHERE Price BETWEEN 10 AND 20;

The above query gives the data like price between 10 and 20.

SQL Query to Find the Duplicate records form Table

SELECT name, partner, COUNT(*) FROM display_info GROUP BY name, partner HAVING COUNT(*) > 1

In above query display_info  is the table name. this query gives to the duplicate data and number of times repeated that data