The reaction of aldehydes or ketones with hydroxylamines gives aldoximes and ketoximes as:

It is clear that in CN both C and N are in sp2 hybridisation. Due to the presence of a double bond, free rotation is not possible. If OH group on N atoms is present on hydrogen attached to carbon or to a small group, then this is called ‘syn’ and if opposite then it is called ‘anti’.
For example:
Acetaldoxime (CH3CH = NOH)

Benzaldoxime

Similarly, Acetophenone oxime
