Select is used to display all columns from a table. This includes records with redundancies. So if you want to display records without redundancies, in short without duplicates, you use the keyword DISTINCT or GROUP BY.
Syntax
select DISTINCT column_name from table_name
select * from table_name GROUP BY column_name
Table
CUSTOMER |
SQL Code
select DISTINCT customer_name,customer_address from customer
select customer_name,customer_address from customer GROUP BY customer_name
Output
0 comments:
Post a Comment