Can Having clause be used without Group by clause?

Answer Posted / shailesh yadav

Yes HAVING caluse can be use without GROUP BY. the SQL HAVING clause is often used with the GROUP BY clause. If the GROUP BY clause is omitted, the MySQL HAVING clause behaves like the WHERE clause. Notice that the MySQL HAVING clause applies the condition to each group of rows, while the WHERE clause applies the condition to each individual row.

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how you can move data or databases between servers and databases in sql server? : Sql server administration

489


What is query and its types?

516


How do I debug a stored procedure in sql server?

541


What is an index in sql?

555


Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?

541






How to encrypt Strored Procedure in SQL SERVER?

559


How to provide column names in insert statements in ms sql server?

610


What are the steps to insert a table?

541


What is the sql case statement used for? Explain with an example?

542


Can a table have 2 foreign keys?

509


What is the full meaning of dml?

533


After removing a table from database, what other related objects have to be dropped explicitly?

560


What is temporary stored procedure?

551


What is difference between cte and view?

526


what's the difference between a primary key and a unique key? : Sql server database administration

505