One way is something like this:
DELIMITER $$
CREATE TRIGGER tg_customer_details_insert
BEFORE INSERT ON customer_details
FOR EACH ROW
BEGIN
set NEW.IntId = coalesce((select max(IntId) from customer_details), 0) + 1;
END$$
DELIMITER ;
But why not just use an auto_increment
column? That is what it is there for.