add constraint

A

Ashish

hi All,
Iam trying to do something in MS Access which i think should be possible
in MS access

I want to add a non null column in a table, but iam not able to specify
the default value some how

on SQL server my query would be

ALTER TABLE SAMPLETAB ADD COLUMN SampleCol integer not null default (0)

can someone tell me how to do it on ms access ?

tia
-ashish
 
C

Chris Howarth

Ashish said:
hi All,
Iam trying to do something in MS Access which i think should be possible
in MS access

I want to add a non null column in a table, but iam not able to specify
the default value some how

on SQL server my query would be

ALTER TABLE SAMPLETAB ADD COLUMN SampleCol integer not null default (0)

can someone tell me how to do it on ms access ?

tia
-ashish


You frst need to design the table from the database window. Each field can
then have a default value assigned to it.

The Default Value property is accessible by highlighting the relevant row in
the design window and viewing the General tab at the bottom of the screen.

Chris
 
A

Ashish

Chris said:
You frst need to design the table from the database window. Each field can
then have a default value assigned to it.

The Default Value property is accessible by highlighting the relevant row in
the design window and viewing the General tab at the bottom of the screen.

Chris
i dont have physical access to the database, i can only connect to it
and run a sql statement
i would need to do it through DML, any way it is possible ?

thanks
-ashish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top