From: Fred Read Date: March 30 1999 8:25am Subject: Re: Using unique, and using auto_increment List-Archive: http://lists.mysql.com/mysql/1173 Message-Id: <37008A7B.591287F5@corp.netcom.net.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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; David Axmark, Michael (Monty) Widenius, Paul DuBois Kim Aldale Well Done! -- If it ain't opinionated, it ain't Rich Teer.