DelphiFAQ Home Search:
General :: Databases :: mysql
General information about mysql - how to get around the differences between version 3.33 an 4, how to do stuff that you think you need a nested query for etc.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

Creating a table with an autoincrement primary key

Question:

How can I create a table with an autoincrement field that is the primary key?

Answer:

Take a look at the following example. And it's auto_increment, not autoincrement.

create table emails (
   em_id int not null primary key auto_increment, 
   em_to varchar(80), 
   em_subject varchar(80), 
   em_msg text);
 

Generated 12:00:33 on Sep 19, 2017