sql - in MySQL can I compare id FK with varchar in another table -


i have table courseid, studentname , other table courseid , coursename user search course name in student table based on student name sql syntax should use ? join or inner join

if use join , specify constraint (e.g. on a.courseid = b.courseid) same if use inner join, according table structure should like:

select * studenttable inner join coursetable  on studenttable.courseid = coursetable.courseid studenttable.studentname = 'jack black'; 

in mysql write

select * studenttable, coursetable  studenttable.courseid = coursetable.courseid , studentname = 'jack black'; 

as internally queried in same way.

check out exact syntax joins here: http://dev.mysql.com/doc/refman/5.7/en/join.html


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -