var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How to query table w/o specifying the table owner?
I am using Sybase ASE 12.5. I have a database owned by a certain user account, say owner1. So, when other user accounts query those tables, I have to specify the schema name, like "owner1.table1".
Can I create alias for those tables, so that I don't have to specify the schema name? I searched on Internet with keywords "sybase", "alias", "synonym" but found nothing.
Or else, can I set other users to use "owner1" as their default schema? I also searched this but again couldn't find anything.....
Last edited by Lapson; 12-07-07 at 04:40.
Reason: change title
exec sp_addalias otheruser, owner1
Originally Posted by Lapson
But this will also allow otheruser to modify owner1.table1
Yes, that's the problem. I want other users to be "read-only".
Originally Posted by pdreyer
Is it a must to specify schema name? In my case, I also have some databases owned by other account, and the read-only accounts can query the tables in the database without specifying the schema name.
From my understanding, the full syntax to access a table is <database>.<owner>.<table>. But if you specify the table name only, it equal to <current_database>.dbo.<table>.
Yes, if table owner is dbo, then it's ok to omit the owner name.
Originally Posted by bonson
But my tables are not owned by dbo, they are owned by owner1. So when other users try to query, the owner name must be specified, like "owner1.table1".