Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 3rd, 2003, 05:02 PM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default ms sql syntax

Can anyone explain to me what the following alter command does?

Thanks

-------------------------------------------
ALTER TABLE [dbo].[SSR] WITH NOCHECK ADD
    CONSTRAINT [DF_SSRFACC_BAD_DEBTOR_FLAG] DEFAULT ('N') FOR [BAD_DEBTOR_FLAG],
    CONSTRAINT [DF_SSRFACC_DATE] DEFAULT ('1/1/1900') FOR [DATE_FOR_ACTION],
    CONSTRAINT [DF_SSRFACC_DATE_PAID] DEFAULT ('1/1/1900') FOR [DATE_PAID]
GO
Reply With Quote
  #2 (permalink)  
Old November 3rd, 2003, 05:12 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Hudson, MA, USA.
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

It adds default constraints to the table SSR.

A default constraint is a value which is automatically provided to the indicated column if no value is provided on an INSERT query.

These constraints are added with the NOCHECK option, so the defaults will not be applied to any existing data; they will only be in effect for new rows added.

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How Run .sql Script file in MS SQL Server 2000? aarkaycee SQL Server 2000 5 October 12th, 2009 05:43 AM
Database migration MS Access 2003 to MS SQL 2000 ayazhoda SQL Server 2000 3 April 23rd, 2007 11:38 AM
MS ACCESS 2003 FRONTEND AND MS SQL SERVER 2005 DB mohankumar0709 SQL Server 2005 3 March 23rd, 2007 12:48 AM
Syntax of date function in MS Access krishreddy Access 3 July 25th, 2006 03:42 PM
Syntax to query Date/Time in MS ACCESS chiuyianl Access 4 March 31st, 2005 08:08 AM



All times are GMT -4. The time now is 04:38 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.