A selectively operable downhole valve for use with core sampling apparatus, the valve comprising a throughbore through which a first body may pass, and an obstructing member which is capable of selectively obturating the throughbore, the obstructing member being arranged to open or close the throughbore by movement of the first body with respect to the valve. A core sample of the formation may then be obtained and retrieved from the bore under pressure since the valve seals the bore downhole. Retrieving the sample under pressure maintains the integrity of the core sample so that subsequent analysis of the sample will more closely reflect the true characteristics of the formation.