Cmd / k "command" how to store command in history?

call cmd / k "command" to execute command, how can I save the command I just executed into doskey / history? Just like I win+r > cmd > execute command, and then I can repeat the command with the up and down arrow keys.

Mar.12,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3dbec-44755.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3dbec-44755.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?