Home » SQL & PL/SQL » SQL & PL/SQL » Please can anyone help me sql script equivalent in oracle
Please can anyone help me sql script equivalent in oracle [message #571541] Tue, 27 November 2012 00:46 Go to next message
raghusql
Messages: 2
Registered: November 2012
Location: Hyderabad
Junior Member
SELECT distinct O.NAME AS TABLE_NAME,C.NAME AS FIELD_NAME,O.TYPE FROM SYSCOLUMNS C INNER JOIN SYSOBJECTS O ON O.ID = C.ID LEFT JOIN SYSTYPES T ON T.XTYPE = C.TYPE WHERE O.TYPE = 'U' or O.TYPE='V' AND O.NAME NOT IN('sysdiagrams') AND C.NAME NOT IN('DATA_MONTH','DATA_YEAR','ID')ORDER BY O.NAME,C.NAME
Re: Please can anyone help me sql script equivalent in oracle [message #571542 is a reply to message #571541] Tue, 27 November 2012 01:07 Go to previous messageGo to next message
Littlefoot
Messages: 19474
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try with
select * from user_tab_columns
and see what's offered in there (you'll find table name, column name, datatype - which is what you're after, after all). If that's not it, say so.
Re: Please can anyone help me sql script equivalent in oracle [message #571544 is a reply to message #571541] Tue, 27 November 2012 01:11 Go to previous message
Michel Cadot
Messages: 58856
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Instead of rating your own question when nothing has be done on this topic (and for me the rating of this question is negative) you should read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.

And with any SQL or PL/SQL question, please, post a working Test case: create table and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

Regards
Michel
Previous Topic: How to auto increment
Next Topic: Connect By Query Problem
Goto Forum:
  


Current Time: Thu Aug 21 23:50:35 CDT 2014

Total time taken to generate the page: 0.05145 seconds