Wednesday, March 21, 2012

Deleting data from a column

What is the command to delete data from certain named colums but
otherwise leave the column intact and also leave the rows and unnamed
columns intact?
The following syntax will replace the existing data in the specified columns
with NULL. Without a WHERE clause it will update every row in the table.
If you only want to modify some subset of rows, you'll need to specify the
appropriate WHERE clause.
UPDATE table
SET column_name1 = NULL, column_name2 = NULL, etc.
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
"RocketMan" <ImaChessNut@.gmail.com> wrote in message
news:1181246690.348694.107840@.i38g2000prf.googlegr oups.com...
> What is the command to delete data from certain named colums but
> otherwise leave the column intact and also leave the rows and unnamed
> columns intact?
>

No comments:

Post a Comment