Blog Archives

MySQL: Insert record if not exists in table


CREATE TABLE `table_name` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `address` varchar(255) NOT NULL, `tele` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB; Insert a record: INSERT INTO table_name (name, address, tele) SELECT * FROM (SELECT ‘Nazir’,

Posted in Mysql
Follow me on Twitter

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 442 other followers