Hi Folks,
Suppose we have a table name employee consisting two fields:
Table Name: employee
id name
1 ashwani
2 varun
3 rajesh
4 varun
5 amit
6 ashwani
CREATE TABLE new_employee as SELECT * FROM employee WHERE 1 GROUP BY name;
DROP TABLE employee;
RENAME TABLE new_employee TO employee;
Cheers!
Suppose we have a table name employee consisting two fields:
Table Name: employee
id name
1 ashwani
2 varun
3 rajesh
4 varun
5 amit
6 ashwani
CREATE TABLE new_employee as SELECT * FROM employee WHERE 1 GROUP BY name;
DROP TABLE employee;
RENAME TABLE new_employee TO employee;
Cheers!
ReplyDeleteWonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging!
Hire PHP Mysql Developers in India