innerjoin
Inner join of two tables.
📝Syntax
T = innerjoin(left, right)
T = innerjoin(left, right, 'Keys', keys)
T = innerjoin(left, right, 'LeftVariables', leftVars, 'RightVariables', rightVars)
📥Input Arguments
Parameter Description
left, right Input tables.
keys Key variable names.
leftVars, rightVars Variables to keep from the left and right tables.
📤Output Arguments
Parameter Description
T Table containing rows with matching keys in both inputs.
📄Description

innerjoin keeps only rows whose key values are present in both tables.

💡Examples
L = table([1; 2; 3], [10; 20; 30], 'VariableNames', {'Key', 'LeftValue'});
R = table([2; 3; 4], [200; 300; 400], 'VariableNames', {'Key', 'RightValue'});
J = innerjoin(L, R, 'Keys', 'Key')
🔗See Also
joinouterjoin
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub