I do not recommend deleting tickets directly from the database.
  
That being said this should point you in the right direction to delete say ticket_id 82.  To do a different id you would replace the 82 with the id of the ticket that you want to delete.
SET @ticket_id = 82;
SET @thread_id = (SELECT `id` FROM `ost_thread` WHERE `object_id` = @ticket_id AND `object_type` = 'T');
SET @thread_entry_id = (SELECT `id` FROM `ost_thread_entry` WHERE `thread_id` = @thread_id);
-- SELECT @ticket_id, @thread_id, @thread_entry_id;
DELETE FROM `ost_ticket` WHERE `ticket_id` = @ticket_id;
DELETE FROM `ost_ticket__cdata` WHERE `ticket_id` = @ticket_id;
DELETE FROM `ost_thread` WHERE `object_id` = @ticket_id AND `object_type` = 'T';
DELETE FROM `ost_thread_collaborator` WHERE `thread_id` = @thread_id;
DELETE FROM `ost_thread_entry` WHERE `thread_id` = @thread_id;
DELETE FROM `ost_thread_entry_email` WHERE `thread_entry_id` IN(@thread_entry_id);
DELETE FROM `ost_thread_event` WHERE `thread_id` = @thread_id;
Remember ALWAYS back up your database before you run commands like this manually against your database.