sql - Duplicate rows in Oracle -
How can I choose duplicate rows in a selected question?
In my query, I need to select the data for a particular user, which is displayed by the user The ones are entered in the end .. If the user enters 1, then the selection query should recover the data for user 1.
I am currently doing this:
Select the name, type from the user1 table 1 command; But am I getting redundant rows in the result ??
Am I doing wrong? How to Avoid These Duplicate Rows?
Please help ...
You have two different options to choose from Or use a segment by a group. You also have a date column and in Oracle that means it's time to be safe, you should reduce the date column. Even if you know that no part of time is included, erase it anyway. It is a good practice that when you see the date, you consider that it has time.
On the next issue you will have to face, you can not ordinate BY column that is not part of SELECT.
My recommendation is a group BY.
SELECT user1, name, type, date, date, date, user, user 1, name, type, TRUNC (date) by user ORDER BY user1
Comments
Post a Comment