Skip navigation links

MySQL Forums :: Oracle :: USER_TABLES in MySQL


Advanced Search

USER_TABLES in MySQL
Posted by: cprietom ()
Date: October 21, 2006 08:23AM

Hello,

I would like to know if there are equivalent tables for the oracle predefined tables: USER_TABLES, USER_TAB_COLUMNS, USER_CONS_COLUMNS and USER_CONSTRAINTS.

The thing is that I would like to write these trhee oracle queries in MySQL, could you give me a little piece of advice?:

SELECT TABLE_NAME ID, TABLE_NAME NAME
FROM USER_TABLES
WHERE TABLE_NAME NOT LIKE '%$%'

SELECT UT.COLUMN_NAME NAME,DATA_TYPE TYPE
FROM user_tab_columns UT
WHERE UT.TABLE_NAME = ?

SELECT UCC.COLUMN_NAME NAME
FROM USER_CONS_COLUMNS UCC ,user_constraints UC
WHERE UCC.TABLE_NAME = ?
AND UC.TABLE_NAME = UCC.TABLE_NAME
AND UC.CONSTRAINT_NAME = UCC.CONSTRAINT_NAME
AND UC.CONSTRAINT_TYPE = 'P'

Thanks in advance,
Carlos.

Options: ReplyQuote


Subject Views Written By Posted
USER_TABLES in MySQL 15218 cprietom 10/21/2006 08:23AM
Re: USER_TABLES in MySQL 6275 Bob Field 10/21/2006 08:37AM
Re: USER_TABLES in MySQL 4176 cprietom 10/25/2006 01:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.