I like to delete duplicate links from mysql database
From phpmyadmin this command is ok for smal database but get error about some time i have 5gb data in the table
DELETE t2 FROM Link t1 JOIN Link t2 ON (t2.page = t1.page AND t2.linkID > t1.linkID);
I like to delete duplicate links from putty ssh but get error:
[root@server]# mysql -p
Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11433 Server version: 5.5.28 MySQL Community Server (GPL) by Remi
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select database
-> DELETE t2 FROM Link t1 JOIN Link t2 ON (t2.page = t1.page AND t2.linkID > t1.linkID);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELETE t2 FROM Link t1 JOIN Link t2 ON (t2.page = t1.page AND t2.linkID > t1' at line 2
mysql>
how to?