Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- My users table:
- id |username |Phone |email |role
- 1 | Girish |9834343468|girish@yahoo.com |admin
- 2 | Rakesh |9434343432|rakesh@gmail.com |admin
- 3 | Suresh |9434343772|suresh@gmail.com |developer
- checks table:
- id | userid | username | admin_id |order_id |exam |
- 1 | 3 | suresh | 1 | df54545454fg09|
- 2 | 3 | suresh | 1 | df54545454fg09|
- 3 | 3 | suresh | 2 | gh54995454fg55|
- I need a sql query where atleast one "admin_id" of checks table contain users table "id"
- I want to create a table like this
- id|admin_id|name |email |Phone
- 1 | 1 |Girish |girish@gmail.com |9834343468
- 2 | 2 |Rakesh |rakesh@gmail.com |9434343432
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement