By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,473 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,473 IT Pros & Developers. It's quick & easy.

Auto Primary Keys in View

P: 2
Hello Friends,

I've a table with no primary key. I want to create a View based on that table but I want a auto increamenting primary key in this View.

Does anybody know how to do this?

Plz help me..

Thanks in advance...
Mar 5 '08 #1
Share this Question
Share on Google+
1 Reply


ck9663
Expert 2.5K+
P: 2,878
Hello Friends,

I've a table with no primary key. I want to create a View based on that table but I want a auto increamenting primary key in this View.

Does anybody know how to do this?

Plz help me..

Thanks in advance...
Two things you need.

1. Here's the syntax to create view.

2. Your query inside your view can include a dynamic row number. Here's how you do that.

-- CK
Mar 5 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.