Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Getting MS SQL Table owner from vb

Posted on 2003-02-20
3
Medium Priority
?
257 Views
Last Modified: 2010-08-05
Hi All,
I have database created when instalation. The database name and table owner create automatically as user entered.
I need to know the table owner using query so, I can use it for another query, because whenever I run the sql statement I always have to determine the table owner name. Example the sql statement like this:

select * from parameter

It is error, because the table parameter is not recognized. I have to write:

select * from user1.parameter.
User1 is the table owner. Whereas the table owner is not always user1.
Please Help.

Thanks
Veronika
0
Comment
Question by:VRGultom
3 Comments
 
LVL 4

Author Comment

by:VRGultom
ID: 7991983
I cancel this qustion. I have solve the problem. There is table sysobjects and sysusers in MS Sql to indentify the table owner.
0
 
LVL 3

Accepted Solution

by:
hakyemez earned 70 total points
ID: 8020853
this query return your table OWNER name:
---------------------------------------
select u.name
from   sysobjects as o ,sysusers as u
where  o.name='<your_table_name>' and
       o.uid=u.uid
0
 

Expert Comment

by:CleanupPing
ID: 9276482
VRGultom:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question