Can i create an oracle “View” with a DB generated Primary Key?
I want to create a view with its ID being a DB generated ID from a Sequence object.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t do exactly that, but you can do something like this:
the rownum is an aoutogenerated field that holds exactly that, but it’s assigned BEFORE ordering records, so if you have an ORDER BY clause, then you’ll have to do this: