prathima rao wrote:

hi,

i want to copy a whole record from one table to another
like below

insert into p1 values(select * from p2 where pono=1);

its giving me error

please help

regards

p rao

You should always include the exact text of the error message to help us diagnose your problem. That said, I expect you are geting a syntax error, as that's not the right form for an INSERT...SELECT statement. You want

  INSERT INTO p1
  SELECT * FROM p2 WHERE pono = 1;

See the manual for details 
<http://dev.mysql.com/doc/mysql/en/insert-select.html>.

Michael


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to