Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Table Creation Default Value = 0

Status
Not open for further replies.

shane1

Technical User
Apr 4, 2004
3
0
0
IE
Could someone tell me how to set the Default Value = 0 in SQL Server 2000. I am using an Access 97 front end. I recently converted our Access 97 back end to SQL Server 2000. How do I set the default value = 0 in SQL Server 2000.
Any help would be appreciated....
 
create table tbl
(
i int default 0
)


======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
or if the column is already there and you want to ad a default

alter table tbl add default 0 for i


======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top