What is the difference between distinct clause and group by
clause?
Answers were Sorted based on User's Feedback
Answer / swamy
Distinct Clause:
---------------
Distinct Clause Will Eliminate the Duplicate data or Rows
when u r selecting from table .So it Produce the Data or
Rows with out Duplication.Generally Distinct Clause will
be Placed on the Column of the Table.
Group Clause:
-------------
Group Clause will group or pack the rows or data based on
the Column(S).
| Is This Answer Correct ? | 24 Yes | 5 No |
Answer / rkvenky
distinct suppress the duplicates of data in the select stmt.
where as group by combines the data which we willgive in
order.
2.group by used at the end of select stmt
distint used in select stmt to columns
3.
group by is function where distinct is keyword
| Is This Answer Correct ? | 8 Yes | 13 No |
What are “lost updates”?
how to avoid cursors? : Sql server database administration
What are the different types of replication are there in sql server 2000?
Find top Nth employee from each department in terms of salary?
What is Files and Filegroups in SQL Server & it's implementation.
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?
Rate yourself in .NET and SQL ?
1 Answers Cognizant, HCL, SunGard,
While using a cursor, how can you differentiate between a deleted row and a row that has been inserted with null data values?
How to compare the top two records using sql?
why cluster and non clusterindex are used in sqlserver 2000? explain with example
Can we do dml on views?
what is call by value & call by reference ?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)