mysql> create table t ( hotel varchar(255), poradi int ); Query OK, 0 rows affected (0.02 sec) mysql> insert into t values ("hotel1", 1); Query OK, 1 row affected (0.00 sec) mysql> insert into t select "hotel ester", max(poradi)+1 from t; Query OK, 1 row affected (0.00 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> select * from t; +-------------+--------+ | hotel | poradi | +-------------+--------+ | hotel1 | 1 | | hotel ester | 2 | +-------------+--------+ 2 rows in set (0.00 sec) mysql>