Thursday, December 26, 2013

Use of Select Keyword in Query

1. Finding how many rows in tables.

2. Finding all records from tables; we are using wildcard start * for getting all columns.

3. Selecting few records based on some condition from tables in SQL.

4. Select few columns instead of all columns of a table.

5. Select distinct (unique) records from Columns.

6. Selecting value with condition based on less than, greater than (>, <, >=, <=) etc.

7. Combining condition using logical operator AND & OR.

8. How to find records which is not null using keyword NULL and IS NULL.

9. SELECT Statement using BETWEEN and NOT BETWEEN.

10. Pattern matching in SQL queries using LIKE and NOT LIKE.

11. IN and NOT IN Statement in Query

12. Sorting ResultSet in SQL using ORDER BY, ASC, DESC.

14. Selecting data from multiple tables by using JOIN in SQL.

15. Calling function on SELECT clause e.g. displaying current date.

16. Doing calculation using SELECT CLAUSE.

17. SELECT data from one row till another row like Paging.

18. Selecting data from result of another query by using derived table.

No comments:

Post a Comment