MATLAB: Merging two tables gives me an error

merging two tables

Hi, I am trying to merge two tables but i get the following error. why is that? the first table consists of 6 columns and 100000 rows and the second one consists of 6 columns and 2000000 rows. thanks
join(x20062008,x20082010) Error using table/join (line 111) The key variable for B must have unique values.

Best Answer

Try using semicolon. Try this:
t1 = table(['M';'F';'M'],[45;32;34],...
{'NY';'CA';'MA'},logical([1;0;0]),...
'VariableNames',{'Gender' 'Age' 'State' 'Vote'})
t2 = table(['M';'F';'M'],[49;54;14],...
{'AZ';'AK';'OH'},logical([1;0;0]),...
'VariableNames',{'Gender' 'Age' 'State' 'Vote'})
tJoined = [t1;t2]