Home » SQL & PL/SQL » SQL & PL/SQL » whether view or table?
whether view or table? [message #200715] Wed, 01 November 2006 01:13 Go to next message
ashish_pass1
Messages: 114
Registered: August 2006
Location: delhi
Senior Member
hello orafaq team

i have created a table & a view. after a day when i want to know which one is view & which is table, i unable to recognise them.

ashish>select * from invasion;

CITY CONDIT TEMPERATURE LONGITUDE LATITUDE
--------------- ------ ----------- --------- --------
athens sunny 97 23 38
chicago rain 66 87 42
lima rain 45 77 12
manchester fog 66 45 43
paris cloudy 81 23 47
sparta cloudy 74 98 36
sydney snow 29 87 78

7 rows selected

this is a view (invasion) but i unable to differentiat them.

please provide me some help so that i could defferentiat it.


with regards
ashish
Re: whether view or table? [message #200720 is a reply to message #200715] Wed, 01 November 2006 01:28 Go to previous messageGo to next message
rameshuddaraju
Messages: 69
Registered: June 2005
Location: India
Member

you can get information about an object whether it is a view,table,procedure, function etc from

Select * from user_objects;
Re: whether view or table? [message #200730 is a reply to message #200715] Wed, 01 November 2006 01:59 Go to previous messageGo to next message
ashish_pass1
Messages: 114
Registered: August 2006
Location: delhi
Senior Member
Thankx Rameshuddaraju

thanx for ur response

with regards
ashish
Re: whether view or table? [message #200743 is a reply to message #200730] Wed, 01 November 2006 02:42 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Although Oracle does not enforce you to strictly use naming convention, it is good to have one. For example, prefix your tables with T_, views with V_, materialized views with MV_, packages with PKG_, etc. Doing so, you wouldn't be confused as you stated in your first post.

Internet is full of "naming convention" pages; here is one on Ask Tom, if you're interested in reading.
Re: whether view or table? [message #200853 is a reply to message #200715] Wed, 01 November 2006 11:55 Go to previous message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
Just as a shortcut, if you want to see tables and views in your own schema, you can use the TAB view.

select tname,tabtype from tab;
Previous Topic: DB report in Browser
Next Topic: select records in proper order
Goto Forum:
  


Current Time: Fri Dec 06 22:34:58 CST 2024