Solved

T-SQL : Field Property

Posted on 2003-12-11
1
241 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:
Scott Pletcher 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

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Query Syntax error after > 11 39
sql update 2 34
Rebooting Witness SQL Server 2 23
Can I skip a node in XML? 9 29
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

679 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