| Author |
Topic |
|
DDDD1212
Starting Member
1 Post |
Posted - 2006-07-06 : 10:22:21
|
| Hello friends !I want to get list of all user tables in the given database using SQL query.can somebody help me for that.... I am a web developer working with java and new to SQL server 2000 . |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-07-06 : 10:26:20
|
| Select name from sysobjects where xtype='u' order by nameorSelect table_name from Information_Schema.Tables where table_type='BASE TABLE' order by table_name MadhivananFailing to plan is Planning to fail |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-07-06 : 10:29:18
|
| or how about...EXEC SP_TABLESalthough I believe it includes system tables and views in the output !Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-07-06 : 10:41:30
|
quote: Originally posted by harsh_athalye or how about...EXEC SP_TABLESalthough I believe it includes system tables and views in the output !Harsh AthalyeIndia."Nothing is Impossible"
Yes but that was not questioner asked for MadhivananFailing to plan is Planning to fail |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2006-07-06 : 11:59:57
|
howzabout select table_name from information_schema.tableswhere table_type = 'BASE TABLE' Help us help YOU!Read this blog entry for more details: http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx*need more coffee*SELECT * FROM Users WHERE CLUE > 0(0 row(s) affected) |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-07-07 : 01:09:23
|
quote: Originally posted by DonAtWork howzabout select table_name from information_schema.tableswhere table_type = 'BASE TABLE' Help us help YOU!Read this blog entry for more details: http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx*need more coffee*SELECT * FROM Users WHERE CLUE > 0(0 row(s) affected)
I already suggested that in my first reply MadhivananFailing to plan is Planning to fail |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-07-07 : 09:51:34
|
quote: Originally posted by DonAtWork i somehow missed that.. did you edit? Help us help YOU!Read this blog entry for more details: http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx*need more coffee*SELECT * FROM Users WHERE CLUE > 0(0 row(s) affected)
See if you able to find Last edited by ... MadhivananFailing to plan is Planning to fail |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-07-07 : 09:52:03
|
Don,Looks like you need more coffee  KH |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-07-07 : 09:54:00
|
quote: Originally posted by khtan Don,Looks like you need more coffee  KH
Yes it is MadhivananFailing to plan is Planning to fail |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-07-07 : 11:41:43
|
rotflol!quote: Originally posted by DonAtWork a WHOLE lot more.. wtf... i will go and cry in the corner now...Help us help YOU!Read this blog entry for more details: http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx*need more coffee*SELECT * FROM Users WHERE CLUE > 0(0 row(s) affected)
--------------------keeping it simple... |
 |
|
|
|