clear markdown compare help best fiddles feedback dbanow.uk
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2805490 fiddles created (40771 in the last week).

create table `test_table` (id int); create sequence `test_sequence`;
 hidden batch(es)


insert into `test_table` values(39)
 hidden batch(es)


SELECT @max_value := MAX(`Id`) FROM `test_table`;
@max_value := MAX(`Id`)
39
 hidden batch(es)


SELECT setval(`test_sequence`, @max_value, true);
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@max_value, true)' at line 1
 hidden batch(es)


SELECT @max_value;
@max_value
39
 hidden batch(es)