Hello,
Is there an equivalent to the DMAX function in MS Access?
I have been using the autonumber function in nuBuilder but found that if you delete the highest record number, i.e. 19, the next record will take the value 20 and 19 ends up missing from the database. Is there a way to set the autonumber back, rather than having to manually set it on the Input tab of the form?
Thanks,
Paul
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
DMAX Function Equivalent in nuBuilder?
-
- nuBuilder Team
- Posts: 506
- Joined: Fri Dec 28, 2018 1:41 pm
- Location: Krakow, Poland
- Has thanked: 8 times
- Been thanked: 18 times
Re: DMAX Function Equivalent in nuBuilder?
Hi, you can try as following:
https://www.techonthenet.com/mariadb/au ... _reset.php
https://www.techonthenet.com/mariadb/au ... _reset.php
Code: Select all
Syntax
In MariaDB, the syntax to reset the AUTO_INCREMENT column using the ALTER TABLE statement is:
ALTER TABLE table_name AUTO_INCREMENT = value;
table_name
The name of the table whose AUTO_INCREMENT column you wish to reset.
value
The next value that will be used in the AUTO_INCREMENT column.
If you like nuBuilder, please leave a review on SourceForge
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: DMAX Function Equivalent in nuBuilder?
Consider using an SQL AUTO INCREMENT Fieldpmjd wrote: I have been using the autonumber function in nuBuilder
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
Re: DMAX Function Equivalent in nuBuilder?
MySQL / MariaDB:
The above will automatically set it to the next available ID if numeric.
Code: Select all
ALTER TABLE table_name AUTO_INCREMENT = 1;