Choosing foreign columns in MySQL

Is it possible to directly select data in an external table, instead of using a keyword JOIN?

As in the sample book example with FOREIGN KEY:

SELECT chapter.title FROM book WHERE book.title='some title'
+4
source share
2 answers

The simple answer is NO . Look at your query below, if you are not joining the table Book, how do you determine if the selected chapter represents which books (OR) are orphans who have fallen out of the sky. You want to join the table Book; so you can associate chapters with specific books and you can say that chapter 1 refers to xyz.

SELECT chapter.title FROM book WHERE book.title='some title'
+1

- . /// , from, join.

+1

Source: https://habr.com/ru/post/1621595/


All Articles