I am trying to get the stop_name of the last inserted row in the table with preparedStatement. How can I get the last inserted one?
I appreciate any help.
behavoiur table:
CREATE TABLE IF NOT EXISTS behaviour( behaviour_id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, mac VARCHAR(30) NOT NULL, stop_name VARCHAR(30) NOT NULL, stop_distance INT(11) NOT NULL, speed INT(11) NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );