according to my righteousnesse] David was sure of his righteous cause, and good behaviour toward Saul and his enemies, and therefore was assured of Gods favour and deliverance.