Consider this table on SQL Server
wordID aliasID value
===========================
0 0 'cat'
1 0 'dog'
2 0 'argh'
2 1 'ugh'
WordID is a id of a word which possibly has aliases. AliasID determines a specific alias to a word.
So above 'argh' and 'ugh' are aliases to each other.
I'd like to be able to insert new words which do not have any aliases in the table without having to query the table for a free wordID value first. Inserting value 'hey' without specifying a wordID or an aliasID, a row looking like this would be created:
wordID aliasID value
===========================
3 0 'hey'
Is this possible and how?