Link to home
Start Free TrialLog in
Avatar of Jerry_Pang
Jerry_Pang

asked on

Question. about using the name of the owner of the table to identify the table.

Question. about using the name of the owner of the table to identify the table.

I create the tables using the SUPERDBA account. then created some users to access these tables.
Now my problem - most of my queries doesnt have owner name.
so sample

SELECT city
FROM contact
WHERE state = 'CA'

Contact Table cant be found, the other users have to access it this way

SELECT city
FROM SUPERDBA.contact
WHERE state = 'CA'

Is there a way NOT TO include the owner SUPERDBA?
Do i have to change all my statements i created to SUPERDBA.tablename?
What if i deployed this on other server using a different SUPERDBA account?
Avatar of Jerry_Pang
Jerry_Pang

ASKER

im using sybase by the way.
Any database object created by a user not belonging to the dbo role must be qualified with the user. To solve your problem you should have someone who belongs to the dbo role create your tables.
hmmm....
it is a must to add ownername? i mean it's a thumbs up?

I havnt tried this experiment yet with other database, or maybe just Syabase.

In sybase, you have to include the ownername.
for multiple users, you have to include the owner name. a must!?

i create a multiple users with dbo role.
all the users must include the ownername to find the table.

oh well, i guess i have to recreate the database again.
ASKER CERTIFIED SOLUTION
Avatar of radiocats
radiocats

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
there was another way

If you are changing ownership just so you don't have to qualify table
names like "FROM andrew.groups", you can solve that problem with user
groups:

GRANT GROUP TO andrew;
GRANT MEMBERSHIP IN GROUP andrew TO tomas;

Now tomas can do "FROM groups" without the "andrew."