0
I wonder if it is possible and indicative to use a Join to "join" values contained in two tables
made in a database of the SQL Server
. I created two tables
and one of them has general information of a client and the other has contact information. What happens is that I separated these two information into two tables
because I’m going to put this divided information in the tabs of a tabControl
(two pages
, in the case).
I was thinking of making one join
for ID
table with general information, so I could connect all the data of each record.
And in addition, I wonder if it is necessary to create some class to insert these Tables in tabControl or have to do only a select or something like.
CREATE TABLE tblClientes (
ID int IDENTITY(1,1) PRIMARY KEY NOT NULL,
Nome varchar(255) NOT NULL,
Telefone varchar(255) NOT NULL,
Tipo varchar(255) NOT NULL, );
SELECT * FROM tblContato
INNER JOIN tblClientes
ON tblContato.ID=tblClientes.ID;
I advise creating a view, but Join also resolves
– Daniel
Behold that answer to understand how Joins work.
– Pagotti
Duplicate question, below some issues addressed the same problem. http://answall.com/questions/135168/likeeu-posso-display-users-join?rq=1 http://answall.com/questions/185372/pega-users-join-joinem-duas-tabela-1-para-muitos?rq=1
– Maurivan