How to db_insert into users? I'm inserting new users into tables users (using a webservice that insert), but how to make uid being automatically inserted and it would be always the next value of the current maximal value on table users (and auto-increment too) ?

Thank you
The users table doesn't have an auto-increment constraint on the primary key (or any field). 

The recommended way to add users is using the API (user_save() etc), that will handle the ID for you. 

Failing that, just query for the maximum ID in the table before you perform the insert; after the first insert, assuming you have exclusivity on this database while you're developing, you can maintain the increment in your code (no need to check the table each time).

Drupal does exactly the same thing in user_save():

$account-&gt;uid = db_next_id(db_query('SELECT MAX(uid) FROM {users}')-&gt;fetchField());