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

All 2 Replies

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

Thank you.Got it

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.