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

Views and Stored Procedures

P: n/a
Is it possible to use a stored procedure as the source of data for a view?

The reason I want to use a stored procedure is because (for this particular
situation),
the execution speed is significantly faster.

Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
If by stored procedure you mean a database function, the answer is yes. You
can simply use the value returned by the function as a column in your view.

For example,
If you had a function named ACTION1 that took a single parameter, could
create a view as follows:

create view test1 as select ename,action1(enum) action_enu m from employee;

The only caveat is that the function must not change the state of the
database. (The only DML it may perform is a SELECT. No UPDATES,DELETES, or
INSERTS).
"tkestell" <tk******@comcast.net> wrote in message
news:foYYb.356311$na.534883@attbi_s04...
Is it possible to use a stored procedure as the source of data for a view?

The reason I want to use a stored procedure is because (for this particular situation),
the execution speed is significantly faster.

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.