I have two tables, one called PROJETO (id_projeto, id_tipo_projeto, descr_projeto, versao_projeto)
and another called TIPO_PROJETO (id_tipo_projeto, descricao_tipo)
I would like to perform an INSERT
on the two tables at the same time, so that the id_tipo_projeto
field in both tables have the same value.
This is an example of the data to store in the tables...
Table PROJETO
--------------------------------------------------------------
| id_projeto = 1 |
| **id_tipo_projeto = 5 |
| descr_projeto = 'design will be sought for the sector' |
| versao_projeto = 1.0 |
--------------------------------------------------------------
Table TIPO_PROJETO
-------------------------------------------
| **id_tipo_projeto = 5 |
| descricao_tipo = 'Industrial Design' |
-------------------------------------------
Could someone please help me to write such a query. I am using SQL Server.