Documente Academic
Documente Profesional
Documente Cultură
Note: All columns have default values whether or not you code explicit
DEFAULT clauses when creating the tables; the default DEFAULT is NULL.
Here is an example where 'A' is placed in col_2 and 'B' in col_3, out of order,
and all the other columns are assigned their default values:
CREATE TABLE t1 (
key_1 INTEGER NOT NULL DEFAULT AUTOINCREMENT,
col_2 VARCHAR ( 100 ) NOT NULL DEFAULT 'X',
col_3 VARCHAR ( 100 ) NOT NULL DEFAULT 'Y',
updated_by VARCHAR ( 128 ) NOT NULL DEFAULT LAST USER,
last_updated TIMESTAMP NOT NULL DEFAULT TIMESTAMP,
PRIMARY KEY ( key_1 ) );
Tip: If you have a feature youd like to see in SQL Anywhere, dont be afraid
to make the suggestion. Thats how ON EXISTING got added to the INSERT
statement a request was posted in the public newsgroup called sybase.pub-
lic.sqlanywhere.product_futures_discussion, which is located on the NNTP server
at forums.sybase.com. You can post to this newsgroup with NNTP client software
like Forte Agent, or use your web browser to go to www.ianywhere.com/devel-
oper and click on Newsgroups. Not every suggestion is implemented, but every
suggestion is taken seriously by the folks responsible for product development.