How to select id of father from the child id recursively
That is not Oracle syntax. Below is Oracle syntax:

drop table menu purge;
CREATE TABLE menu
(
  id INT PRIMARY KEY
, name NVARCHAR2(40)
, parent_id INT REFERENCES menu (id)
);

INSERT INTO menu VALUES (1,'Main Product',NULL); 
INSERT INTO menu VALUES (2,'Next Main Product',NULL); 
INSERT INTO menu VALUES (3,'Addon Product',1); 
INSERT INTO menu VALUES (4,'Addon Product',1); 
INSERT INTO menu VALUES (5,'Sub-Addon Product',3);
INSERT INTO menu VALUES (6,'Sub-sub-Addon Product',5);
INSERT INTO menu VALUES (7,'Addon Next Main Product',2);
commit;

select listagg(id, ',') within group (order by id) from menu
connect by id = prior parent_id
start with id = 6;

LISTAGG(ID,',')WITHINGROUP(ORDERBYID)
-------------------------------------
1,3,5,6