hi.I have created a table named stu_info.Here present 3 column named id,name,dept.here id is primary key and every column is varchar.Now i typed the following query

Update stu_info set id='0904009' and name='mr. x' and dept='CSE' where id='0904199' and name='mr. y' and      dept='CSE';

But it made the id=0 instead of 0904009.What is wrong in my query?

Recommended Answers

Update stu_info 
  set id='0904009', name='mr. x', dept='CSE' 
  where id='0904199' and name='mr. y' and dept='CSE';
Jump to Post

All 2 Replies

Update stu_info 
  set id='0904009', name='mr. x', dept='CSE' 
  where id='0904199' and name='mr. y' and dept='CSE';
Be a part of the DaniWeb community

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