Skip to content
Advertisement

verify flag for user as parameter

I have table users

a second table Sales

I need to ckeck each time for user parameter the flag to display or not the data fOr the user 145 I’ll display everything in the table sales because flag=1 but the user 142 I’ll disply nothing beacuse flag =0

The result is incorrect, how to correct it

Advertisement

Answer

Your version would work with select sales.*. However, I would use:

This makes it clear that users is just being used for filtering and that there really isn’t a relationship between the two tables (other than the permissioning, of course).

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement