Hi,
How can I display the table owner and the table name in
the form of 'tableowner.tablename' from the 'sysobjects'
table. Another words, I want to add the table
owner 'sqlapp' to the table names in my select query.
Thanks for help.You'd be better off using information_Schema views.. try this
select table_schema + '.' + table_name from information_Schema.tables
where table_type = 'base table'
"Rick" <anonymous@.discussions.microsoft.com> wrote in message
news:89e501c3e9be$3a804a10$a001280a@.phx.gbl...
> Hi,
> How can I display the table owner and the table name in
> the form of 'tableowner.tablename' from the 'sysobjects'
> table. Another words, I want to add the table
> owner 'sqlapp' to the table names in my select query.
> Thanks for help.|||I found it Thanks...This was what I needed...
select 'sqlapp.' + name from sysobjects
where xtype = 'U' and name <> 'dt_properties'
>--Original Message--
>You'd be better off using information_Schema views.. try
this
>select table_schema + '.' + table_name from
information_Schema.tables
>where table_type = 'base table'
>"Rick" <anonymous@.discussions.microsoft.com> wrote in
message
>news:89e501c3e9be$3a804a10$a001280a@.phx.gbl...
>> Hi,
>> How can I display the table owner and the table name in
>> the form of 'tableowner.tablename' from the 'sysobjects'
>> table. Another words, I want to add the table
>> owner 'sqlapp' to the table names in my select query.
>> Thanks for help.
>
>.
>
Showing posts with label tablename. Show all posts
Showing posts with label tablename. Show all posts
Monday, March 19, 2012
Displaying the table owner
Hi,
How can I display the table owner and the table name in
the form of 'tableowner.tablename' from the 'sysobjects'
table. Another words, I want to add the table
owner 'sqlapp' to the table names in my select query.
Thanks for help.You'd be better off using information_Schema views.. try this
select table_schema + '.' + table_name from information_Schema.tables
where table_type = 'base table'
"Rick" <anonymous@.discussions.microsoft.com> wrote in message
news:89e501c3e9be$3a804a10$a001280a@.phx.gbl...
select 'sqlapp.' + name from sysobjects
where xtype = 'U' and name <> 'dt_properties'
this
information_Schema.tables
message
How can I display the table owner and the table name in
the form of 'tableowner.tablename' from the 'sysobjects'
table. Another words, I want to add the table
owner 'sqlapp' to the table names in my select query.
Thanks for help.You'd be better off using information_Schema views.. try this
select table_schema + '.' + table_name from information_Schema.tables
where table_type = 'base table'
"Rick" <anonymous@.discussions.microsoft.com> wrote in message
news:89e501c3e9be$3a804a10$a001280a@.phx.gbl...
quote:|||I found it Thanks...This was what I needed...
> Hi,
> How can I display the table owner and the table name in
> the form of 'tableowner.tablename' from the 'sysobjects'
> table. Another words, I want to add the table
> owner 'sqlapp' to the table names in my select query.
> Thanks for help.
select 'sqlapp.' + name from sysobjects
where xtype = 'U' and name <> 'dt_properties'
quote:
>--Original Message--
>You'd be better off using information_Schema views.. try
this
quote:
>select table_schema + '.' + table_name from
information_Schema.tables
quote:
>where table_type = 'base table'
>"Rick" <anonymous@.discussions.microsoft.com> wrote in
message
quote:
>news:89e501c3e9be$3a804a10$a001280a@.phx.gbl...
>
>.
>
Saturday, February 25, 2012
display/show tablename
hi,
anybody know if it is possible to display only the table names? I would like to run a query that display the table names...
thanksTake a look at the sysobjects table in the sql books online. Here is an example of a query that will return user tables from a database:
select * from sysobjects where xtype = 'U'
anybody know if it is possible to display only the table names? I would like to run a query that display the table names...
thanksTake a look at the sysobjects table in the sql books online. Here is an example of a query that will return user tables from a database:
select * from sysobjects where xtype = 'U'
Subscribe to:
Posts (Atom)