With the distinct
keyword with single and multiple column names, you get distinct records:
SELECT DISTINCT column 1, column 2, ...
FROM table_name;
More Related Contents:
- SQL Data models
- How to randomly select rows in SQL?
- What’s the difference between TRUNCATE and DELETE in SQL
- SQL best practice to deal with default sort order
- Can table columns with a Foreign Key be NULL?
- Deleting duplicate rows from sqlite database
- Decision between storing lookup table id’s or pure data
- How Can I use “Date” Datatype in sql server?
- How to replace a string in a SQL Server Table Column
- How many rows in a database are TOO MANY?
- Primary key or Unique index?
- How to get a list of column names on Sqlite3 database?
- How to run a stored procedure in sql server every hour?
- Composite Primary key vs additional “ID” column?
- Questions every good Database/SQL developer should be able to answer [closed]
- Why do you create a View in a database?
- Logging ALL Queries on a SQL Server 2008 Express Database?
- Best database field type for a URL
- Max length for client ip address [duplicate]
- MySQL – how to front pad zip code with “0”?
- How can I implement SQL INTERSECT and MINUS operations in MS Access
- Postgres Error: More than one row returned by a subquery used as an expression
- Does ‘Select’ always order by primary key?
- How do I create and query linked database servers in SQL Server?
- The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions
- Should I commit or rollback a read transaction?
- Why are foreign keys more used in theory than in practice?
- Relational Data Model for Double-Entry Accounting
- Do conditional INSERT with SQL?
- What is difference between foreign key and reference key?