-
Default values with create table command
Hi,
am still new at this SQL jazz. Just wanted to know how I would put default values into fields when using the CREATE TABLE command. here's the very simple code, I need to make the default 'COLOUR' 'blue', any ideas???
CREATE TABLE MODEL
(COM_MODEL CHAR(5) PRIMARY KEY,
COLOUR CHAR(10),
COST CURRENCY NOT NULL);
BTW, this is being done in MS ACCESS.
thanks in advance
-
I dont think you can do that with DDL statement.
-
Hi,
This is possible.
CREATE TABLE MODEL
(
COM_MODEL CHAR(5) PRIMARY KEY,
COLOUR CHAR(10) default ('BLUE'),
COST CURRENCY NOT NULL
);
Thanks
M. Antony Gubert.
-
Syntax error in create table statement.
-
Syntax
Hi,
The above syntax is for Oracle database.
Not for MS Access.
Thanks
M. Antony Gubert.
-
but requirement is in MS-Access.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|