简体   繁体   中英

What would be the equivalent sequalize code for the given Query?

SELECT * FROM tutor_bank_details tbd inner join tutors t on t.id=tbd.tutorId inner join users u on u.id=t.userId where u.orgId=1

I want where condition in WHERE clause not in JOIN Condition

already the where clause in your query is in where condition. If you want the where condition to be part of join instead of where then that can be done as below not the other way round as you are asking because the query us already in the format you are asking for.

SELECT * FROM tutor_bank_details tbd inner join tutors t on t.id=tbd.tutorId inner join users u on u.id=t.userId and u.orgId=1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM