467,878 Members | 1,263 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,878 developers. It's quick & easy.

Setting the value of a field depending on whether the value exists in another table

Hi All,

I have one table namely app_users with fields(username,password,emai,phno,address) and one more table add_users with fields (uname,name,phno,email,status).
If email address is already exists in app_users table,then i should make the status column in app_users as"available"otherwise "notavailable".

here uname is foreign key for username,which is primary key in the table "app_users"

can anyone tell me the query to set the statuscolumn in add_users table?

Thank you in advance,

Sep 21 '07 #1
  • viewed: 970
1 Reply
Expert 4TB
Heya, Suma.

Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).

You'll want to use the EXISTS subclause.
Sep 21 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Roger Withnell | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.