please view the attached file... i just want to know how to insert data in a Null Column in just one click... ex:

ID UserName PassWord Category Status
1 Me1 You one Null
2 Me2 You one Null
3 Me3 You one Null
4 Me4 You one Null
5 Me5 You one Null
6 Me6 You one Null
7 Me7 You one Null
8 Me8 You one Null
9 Me9 You two single
10 Me10 You two single
11 Me11 You two single
12 Me12 You two single
13 Me13 You two single
14 Me14 You two single
15 Me15 You two single
16 Me16 You two single
17 Me17 You two single
18 Me18 You two single

in the attatch file... i have many columns tha has a Null value...

Recommended Answers

All 2 Replies

Its not inserting data where it is null. You must say. Updating columns where it is null.

first of you must know which rows you want to update. I mean what is the condition.

sample 1 (to update status of all null columns)

update tablename set status='Single' where status is null

sample 2 (to update status where status is null and id is between 1 and 5)

update tablename set status='Single' where status is null and id between 1 and 5

Have u allowed nulls in your columns??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.