Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2011
    Posts
    7

    Unanswered: Convert query from MySQL to Oracle

    Hello,
    I'm in a process of expanding my app to work with other databases and for that I need to convert the MySQL statements to
    DB2, InterBase, Oracle, ODBC, PostgreSQL, SQLite2 and SQLite3.
    It should be an easy task because there are only four statements I have to convert:

    Code:
    SHOW TABLES
    Code:
    SELECT COLUMN_NAME, COLUMN_TYPE, IS_NULLABLE, COLUMN_KEY, COLUMN_DEFAULT, EXTRA FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='<schema_name>' AND TABLE_NAME='<table_name>'
    Code:
    SELECT REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME, TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_SCHEMA='<schema_name>' ORDER BY REFERENCED_TABLE_NAME, TABLE_NAME, REFERENCED_COLUMN_NAME, COLUMN_NAME
    Code:
    SELECT name, param_list FROM mysql.proc WHERE db='<schema_name>' AND type='PROCEDURE'
    Would you be so kind to tell me I it is possible to convert those statements to Oracle compatible ones, and if so what is their Oracle equivalent.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Dba_tables
    dba_tab_columns
    dba_dependencies
    desc schema.procedure_name
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Aug 2011
    Posts
    7
    Thanks guys. You helped me a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •