Added query for cursor position.
(to limit delete command)