If you want to change the value in qid to 3 when it is 0 
You really need an update

update answer 
set    qid = 3 
where  qid = 0

-----Original Message-----
From: ابو ابراهيم [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 8:14 AM
To: [EMAIL PROTECTED]
Subject: copy from table to it again

i want to ask you a question 
    
i have a data in a table `answer` and i want to copy the data which
have a specific value in a filed and inserted into it again but i
will change the value 
   
i try to use this but it's give me an error 
 ======================= 
 INSERT INTO `answer` ( `answer` , `correct`,`qid` ) 
 SELECT a2.`answer` , a2.`correct` , 3 
 FROM `answer` as a2 where a2.qid=0 
=======================




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

  • co... ابو ابراهيم
    • ... Gordon
    • ... Vasoczki Ferenc

Reply via email to