Can we use LOCK TABLE on a view?

All sort of Mainframes Interview Questions.
Post Reply
Ankit Gupta
Registered Member
Posts: 24
Joined: Fri Aug 16, 2013 1:30 pm

Can we use LOCK TABLE on a view?

Post by Ankit Gupta »

Hi,

Can we use LOCK TABLE on a view? I think no, but is it correct? Please help.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Can we use LOCK TABLE on a view?

Post by Anuj Dhawan »

Hi Ankit,

No, you can not. VIEWs are imaginary entities, there is no physical existence of them. If you want to lock a view, you have to issue the lock on the underlying tables.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”