2
Reply

How to filter records of table in SQL SERVER?

Akhil Joshi

Akhil Joshi

12y
2k
0
Reply

    We can filter records based on the where clause.SELECT COL1,COL2 from TABLE WHERE COL1 = 'Condition';When using grouping clause to restrict rows, you can querySELECT SUM(COL1),COL2 from TABLE WHERE COL1= 'Condition' group by COL2;You can restrict record groups using the having clause some thing like this, SELECT SUM(COL1),COL2 from TABLE WHERE COL1= 'Condition' group by COL2 having SUM(COL1) > 20;

    Select fields1, field2...fieldn from table_name where field =