Better say in this way:
All covalent compounds consist of molecules.
To the above person: diamond & graphite are not compounds. They are allotropes of carbon, which is an ELEMENT.
molecules are formed by covalent bonding, but covalent compounds are not equal to molecules because diamonds and graphite are covalent compounds , not molecules