How to apply filtering criteria at group level with the having clause in ms sql server?



How to apply filtering criteria at group level with the having clause in ms sql server?..

Answer / Gauraw Kumar Vaidya

To apply filtering criteria at group level using the HAVING clause in MS SQL Server, you can place your criteria after the GROUP BY clause and before the ORDER BY or SELECT statements. The syntax is: SELECT column_name, ... FROM table_name GROUP BY column_name HAVING condition.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is updatable resultset?

1 Answers  


How can you know if the row fetched from cursor is still valid in underlying table?

1 Answers  


What are the different types of lock modes in sql server 2000?

1 Answers  


Do you know how to send email from database?

1 Answers  


Explain the third normal form(3nf)?

1 Answers  


What is user-defined inline table-valued function?

1 Answers  


how to find the particular row in table?(means suppose one table contain 10 rows , in these 10 rows how to find the particular row(example in 10 rows i want 5 row how)?

16 Answers   Accenture, IBM, Marlabs,


there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration

1 Answers  


what is the maximum size of a row in sql server 2000 and 2005

2 Answers  


How we Resize table,temp table, database and log file size in SQL Server 2005

1 Answers   ABC,


What is a SQL Server Temporary Table?

1 Answers   Wipro,


How to create a ddl trigger using "create trigger" statements?

1 Answers  


Categories