Reference between two tables by Heidisql

Asked

Viewed 40 times

0

Friends, I am using Heidisql and I have a database: Mariadb created two tables and I want to reference client table id, with user_id of table posts. And I forgot how to reference, using the app above, forgot by a serious DNA problem.

  • And what you want?

  • @weltonvaz you are referring to creating a Join ?

  • I want to reference between the user_id field of the post table, with the (primary key) id of the users table.

  • @Edvaldo Lucena actually I want to use Inner Join command in Heidisql

1 answer

1


Try it this way: Access the instance your database is in and click on file > New tab for query and type your select .

select Tabela.coluna from post 
   inner join usuarios 
   on post.user_id = usuarios.id
  • Programmatically I know how to do I want to do in Heidisql

  • Access the instance your database is in and click on file > New tab for query and type your select .

  • Thanks, that’s what I don’t remember

  • @weltonvaz please check the answer that solved your question.

  • Branded, thank you very much for your attention.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.