Select satatment
-
Dear all, i have tow tables 'Users' and 'Applications' every user may be has no,one or more applications how to write a SQL satement that get me every user who hasn't application. in other word i want user without application... thanks.
It would be helpful to answer if you state the field names, type and with which field both tables are connected. I think you have to do something like: select userId from user_table where (Application_table.applCnt = 0 and Application_table.userId = user_table.userId) if both tables are connected by userId. Thanks & Regards, Suman
-
Dear all, i have tow tables 'Users' and 'Applications' every user may be has no,one or more applications how to write a SQL satement that get me every user who hasn't application. in other word i want user without application... thanks.
select * from Users
where not exists (
select A.AppID from Applications A
where A.AppID = Users.AppID
) -
Dear all, i have tow tables 'Users' and 'Applications' every user may be has no,one or more applications how to write a SQL satement that get me every user who hasn't application. in other word i want user without application... thanks.