Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Riya
Starting Member
6 Posts |
Posted - 2009-04-01 : 08:30:19
|
| how can i delete values of 1 column. please give me syntax .thanx in advanceThanks alotRiya |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-04-01 : 08:36:16
|
1. UPDATE Table1 SET Col1 = NULL2. ALTER TABLE Table1 DROP COLUMN Col1 E 12°55'05.63"N 56°04'39.26" |
 |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-04-01 : 08:37:19
|
| either update them as null. update yourtable set yourcolumn=nullOr,Drop the columnALTER TABLE yourtable DROP COLUMN yourcolumn |
 |
|
|
Riya
Starting Member
6 Posts |
Posted - 2009-04-01 : 09:12:50
|
| thanx guys. i updated the column values to null.but the problem is my table have null records(null value for all columns).can u plz tell me how can i remove these null records?Thanks alotRiya |
 |
|
|
ashishashish
Constraint Violating Yak Guru
408 Posts |
Posted - 2009-04-01 : 09:15:32
|
| use replace clause to do this,,likeupdate urtable set column=(replace,Null,'')or u can also use isnull like thatisnull(column,'')May Be U want That??? |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2009-04-01 : 09:17:04
|
| update != removeDELETE FROM <yourtable> WHERE (COL1 is null AND COL2 is null ...)[Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQL or How to sell Used CarsFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
Riya
Starting Member
6 Posts |
Posted - 2009-04-02 : 02:11:28
|
| thanx DonAtWork & Ashish.Thanks alotRiya |
 |
|
|
|
|
|