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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

modifying field values (newbie) 1

Status
Not open for further replies.

EMTHawk

MIS
Sep 26, 2006
2
US
Morning. I have a table where I want to change the values for the fields. In other words, I have a table where I want to change

F_USER from NOT NULL nvarchar(50) to NULL nvarchar(50)

I can ADD fields to a table, but I haven't learned how to write a query to change the field values.

--EMT_Hawk
 
Check ALTER TABLE in BOL.
Code:
ALTER TABLE YourTable ALTER COLUMN F_User nvarchar(50)
If you want just to change values of that column (to remove all meaningful info from it)

Code:
UPDATE MyTable SET F_User = NULL WHERE F_User IS NOT NULL

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
MVP VFP
 
Thank you.

It's my first attempt at modifying a table...

--Hawk
 
Hello Try that

Code:
ALTER TABLE <table name>
 ALTER COLUMN F_USER     
     nvarchar(50)
       NULL

ina
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top