From: Daevid Vincent Date: May 24 2006 10:50pm Subject: How do I turn off error checking List-Archive: http://lists.mysql.com/mysql/198275 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Semi related to this, as it appears in my searching that this is unfortunately not a supported feature. Is there a flag or something that = I can put in my .sql file that will turn OFF any error checking, execute = my statements (so that even if one fails, the next one will be tried), then turn it back on again at the end of the file? Sort of like how you can = do the "SET FOREIGN_KEY_CHECKS=3D0;" so something akin to "SET = ERROR_CHECKS=3D0;" or "SET FORCE=3D1;" And, yes, I do know that there is a --force option for the importing, = but I cannot use that in my case. This is an automated script and generally I = want the SQL to fail on any errors b/c then I know the upgrade is hosed. This = is a special case where some people got a SQL upgrade (by hand) and some didn't, hence the discrepency between the schemas. D=C6VID =20 > -----Original Message----- > From: Daevid Vincent [mailto:daevid@stripped]=20 > Sent: Wednesday, May 24, 2006 12:13 PM > To: mysql@stripped > Subject: How do I add a column only if it doesn't exist? >=20 > I want to do something like this: >=20 > if not exists `hotel_page_templates`.`hpt_custom_fields` > alter table `hotel_page_templates` add column=20 > `hpt_custom_fields` text after > `hpt_alternate_username`; >=20 >=20 > =D0=C65=CF=D0=20 >=20 >=20 > --=20 > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: =20 > http://lists.mysql.com/mysql?unsub=3Ddaevid@stripped >=20 >=20