FUNCTION REFERENCE
innerjoin
Rows of two tables whose keys match.
Rows of two tables whose keys match.
Syntax
[T, ileft, iright] = innerjoin(Tleft, Tright)Syntax
... = innerjoin(Tleft, Tright, 'Keys', k, 'LeftKeys', lk, 'RightKeys', rk, 'LeftVariables', lv, 'RightVariables', rv)Keys default to the variables both tables share. The result holds every matching pair, sorted by key, with the left variables then the right non-key variables; clashing names get _<input name> (or _left/_right) suffixes. Missing keys (NaN, '', <missing>) never match.
Example
L = table([1;2], {'a';'b'}, 'VariableNames', {'id','s'}); R = table([2;1], [20;10], 'VariableNames', {'id','v'}); innerjoin(L, R)Differences from MATLAB: Row-name keys are not supported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.