John Taylor wrote:
> I have 2 questions, that did not seem to be answered in the
> mysql manual.
Really? I managed to find them in there...
> This causes a problem, because Number is unique. Is there a
> way to group Year and Number to make one unique entity?
> So that it checks H99-1234 and H00-1234?
See "http://www.mysql.com/Manual/manual.html#IDX569" for
details on how to create a multi-part index.
> Also, it would be nice to use the AUTO_INCREMENT feature for
> Number. How is this used? What is the syntax, for an INSERT
> and for an UPDATE statement?
See "http://www.mysql.com/Manual/manual.html#IDX668" for
details of this.
MySQL has one of the best manuals I have seen for ANY software
product I have ever used and that includes commercial software
costing tens of thousands of pounds. I *always* have a browser
window open to the MySQL manual [see footer below] and find it
invaluable. Congratulations must go to all those who wrote it;
Michael (Monty) Widenius,
If it ain't opinionated, it ain't Rich Teer.