I would like to know if it is possible and indicative to use a join to "join" values contained in two tables
made in a SQL Server
database. I created two tables
and one of them has general information for one client and the other one has contact information. What happens is that I have separated these two information in two tables
since I am going to put this information divided into the tabs of a tabControl
(two pages
, in this case).
I was thinking of making a join
by the ID
of the table with general information, so that I could connect all the data of each record.
And besides, I would like to know if it is necessary to create some class to do the insertion of these tables in tabControl or it has to do only a select or something of the type.
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;