Anyway to get the trigger to work? I want to insert last insert query to the another column.For that i wish to use TRIGGERS 

--
-- Triggers `sync_log`
--
DROP TRIGGER IF EXISTS `tg_sync_id_insertbgnn`;
DELIMITER //
CREATE TRIGGER `tg_sync_id_insertbgnn` BEFORE INSERT ON `student_master`
FOR EACH ROW BEGIN
INSERT INTO `sync_log`(`Sync_query`) SELECT * FROM student_master WHERE `SM_NO` = NEW.`SM_NO`;
END
DELIMITER ;


This doesn't seems to work.Any idea why ?
You need three changes

CHANGE #1

Add // after end

CHANGE #2

Just insert NEW.SM_NO directly into sync_log

CHANGE #3

Make it an AFTER INSERT trigger, to be sure the new SM_MO lands in student_master

--
-- Triggers `sync_log`
--
DROP TRIGGER IF EXISTS `tg_sync_id_insertbgnn`;
DELIMITER //
CREATE TRIGGER `tg_sync_id_insertbgnn` AFTER INSERT ON `student_master`
FOR EACH ROW BEGIN
INSERT INTO `sync_log`(`Sync_query`) VALUES (NEW.`SM_NO`);
END //
DELIMITER ;


Give it a Try !!!