Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LOG table
- userid action time
- 18 login 556565686
- 14 logout 878787878
- 9 login 323232323
- USER table
- id username email userid
- 9 ram sample@sample.ocm 9
- 13 sunil temp@temp.com 13
- 14 david david@david.com 14
- 18 gopal gopal@sample.com 18
- ========================================================================
- Select * from USER INNER JOIN LOG ON USER.id = LOG.userid AND LOG.userid = 'login';
- will result
- id username email userid
- 9 ram sample@sample.ocm 9
- 18 gopal gopal@sample.com 18
- but i want
- id username email time
- 9 ram sample@sample.ocm 323232323
- 18 gopal gopal@sample.com 556565686
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement