<p>I was wondering peoples opinions on the naming of ID columns in database tables.</p>

<p>If I have a table called Invoices with a primary key of an identity column I would call that column InvoiceID so that I would not conflict with other tables and it's obvious what it is.</p>

<p>Where I am workind current they have called all ID columns ID.</p>

<p>So they would do the following:</p>

<pre><code>Select  
    i.ID 
,   il.ID 
From
    Invoices i
    Left Join InvoiceLines il
        on i.ID = il.InvoiceID
</code></pre>

<p>Now, I see a few problems here:<br>
1. You would need to alias the columns on the select<br>
2. ID = InvoiceID does not fit in my brain<br>
3. If you did not alias the tables and referred to InvoiceID is it obvious what table it is on?</p>

<p>What are other peoples thoughts on the topic?</p>

We use
```
InvoiceID
```
, not
```
ID
```
.  It makes queries more readable -- when you see
```
ID
```
alone it could mean anything, especially when you alias the table to
```
i
```
.