Solved

T-SQL : Field Property

Posted on 2003-12-11
1
216 Views
Last Modified: 2006-11-17
Using T-SQL how is the property NOT NULL added to an existing table field ?
0
Comment
Question by:caracalla
1 Comment
 
LVL 69

Accepted Solution

by:
ScottPletcher earned 100 total points
ID: 9921304
ALTER TABLE yourTableName
ALTER COLUMN columnName datatype NOT NULL


I believe you will have to change any NULL values in that column to a non-NULL value first for this to work.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now