add a cmd and sql