> For the complete documentation index, see [llms.txt](https://beyondcompare.gitbook.io/project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://beyondcompare.gitbook.io/project/table-compare/keys.md).

# Keys

## Incorrect

For effective use of Table Compare it is crucial to set the right columns as your keys.  The following table of sea ice thickness shows **inappropriate** keys and therefore poor alignment:

![Sea Ice Data, with incorrect keys in the column top](/files/-LnsGWElW53lvMIVTkKc)

## Correct

By rightclicking the column tops we set the keys to a more unique identifier.  In this case we chose *date* as the most unique key. In general, key columns should have values that are (somewhat) unique to a given row.  Key columns are often independent variables rather than dependant variables.  In the comparison below, date is the independant variable.

![Sea Ice Data.  Moving the key to column 2  gives improved alignment](/files/-LnsGg3NXRq2ROq0WGR3)

Try it out yourself.  Start a Table Compare session by pressing ctl-T and then click Table Compare.  Or from the pulldown: `Session->NewSession->TableCompare`.  Then browse or use your mouse to drag and drip two Excel files. &#x20;

When the comparison loads, the rows might not align well. With the mouse, right click on your column tops to make them keys or not keys.&#x20;

Don't worry: nothing you do will change your Excel file: it is read-only in Beyond Compare. And if you don't like what you do to the columns, you can *undo* your settings with the button at `Rules->Columns->ResetAll`.

To investigate the subject of Key Columns, read about SQL and[ relational databases](https://en.wikipedia.org/wiki/Relational_database).
