----- Original Message ----- From: Paul DuBois <[EMAIL PROTECTED]> To: boclair <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 8:47 AM Subject: Re: Using SET in the INSERT statement
: At 14:19 +1000 2/5/03, boclair wrote: : >I notice some of my colleagues using SET in INSERT statements. : > : >DuBois makes a short reference on p565, DoorStop1. : : The reference is short because there isn't much to say about it. :-) : The SET clause consists of col_name=value assignments, separated : by comma if there is more than one assignment. That's all. : : Other examples are on pp 40-41 (Doorstop I) or p48 (Doorstop II). : I know this is so basic that I should understand, but in that case (p40) INSERT INTO member SET last_name='Stein' ,first_name='Waldo'; why not use that form always instead of (also p40) INSERT INTO member (last_name,first_name) VALUES('Stein' , 'Waldo'); On the surface it seems a simpler syntax and is similar, in this respect, to the syntax for UPDATE. I see that http://www.mysql.com/doc/en/INSERT.html provides that SET is an alternative to the VALUES syntax but the explanation that follows, apart from being a model of simplicity, only mentions the use of SET in relation to unique columns. BTW, many thanks for your excellent book. Invaluable (and it opens flat) Louise --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php