You can just add DEFAULT keyword followed by the default value in the column
definition and use it either when creating a new table or altering a table
to add/set a default value to its column(s)......
See: http://www.mysql.com/doc/C/R/CREATE_TABLE.html
http://www.mysql.com/doc/A/L/ALTER_TABLE.html
Gurhan

-----Original Message-----
From: Edward Peloke [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 25, 2002 2:44 PM
To: [EMAIL PROTECTED]
Subject: defaults


How do I add defaults to a table?  In SQL Server I can simply write

columnname      bit         null constraint defaultname default (0)

when I create the table.

Thanks,
Eddie

---------------------------------------------------------------------
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


---------------------------------------------------------------------
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

Reply via email to