Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Returning information from stored procedures [Table of Contents] Renaming stored procedures

Transact-SQL User's Guide

[-] Chapter 14 Using Stored Procedures
[-] Restrictions associated with stored procedures

Restrictions associated with stored procedures

Here are some additional restrictions on creating stored procedures:

Qualifying names inside procedures

Inside a stored procedure, object names used with create table and dbcc must be qualified with the object owner's name, if other users are to use the stored procedure. Object names used with other statements, like select and insert, inside a stored procedure need not be qualified because the names are resolved when the procedure is compiled.

For example, user "mary", who owns table marytab, should qualify the name of her table when it is used with select or insert if she wants other users to execute the procedure in which the table is used. The reason for this rule is that object names are resolved when the procedure is run. If marytab is not qualified, and user "john" tries to execute the procedure, Adaptive Server looks for a table called marytab owned by John.


Returning information from stored procedures [Table of Contents] Renaming stored procedures