I have created a table called t as:
Code:
CREATE TABLE t (
name varchar(7) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8
and inserted following values into it:
Code:
insert into t values ('Chagh'),('Ach'),('Achchany');
commit;
now I want to report a numbered list according to alphabetical sort of values,so I issued this SQL:
Code:
mysql> select count(t2.name) num,t1.name
-> from t t1,t t2
-> where t2.name <= t1.name
-> group by t1.name
-> order by num;
ERROR 1062 (23000): Duplicate entry 'Chagh' for key 1
I repeat the same scenario in Oracle successfuly.What is the problem in your opinion?
-Thanks in advance