Skip to content
Advertisement

Multiple SELECT statements from different tables

I have two independent tables: ‘Clients’ and ‘Country’.

Country Table:

Clients Table

I would like to add a new client into ‘Clients’ table but using the information from ‘Country’ table like this:

I would like to have this INPUT:

But if I run this query, it doesn’t work. Could anybody help me, please?

COMMENTS: I prefer don’t use autoincrement option.

Thank you very much.

Wardiam

Advertisement

Answer

You can do it like this:

See the demo.
Results:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement