{"id":14,"date":"2020-01-02T12:00:00","date_gmt":"2020-01-02T12:00:00","guid":{"rendered":"https:\/\/molecularsciences.org\/content\/?p=14"},"modified":"2024-02-09T13:40:01","modified_gmt":"2024-02-09T18:40:01","slug":"listing-objects-in-oracle","status":"publish","type":"post","link":"https:\/\/molecularsciences.org\/content\/listing-objects-in-oracle\/","title":{"rendered":"Listing Objects in Oracle"},"content":{"rendered":"\n<p>If you want to list tables in MySQL, you simply type the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>show tables<\/code><\/pre>\n\n\n\n<p>Oracle does not provide such a short cut. You have to type the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select * from user_objects where object_type = 'TABLE'<\/code><\/pre>\n\n\n\n<p>The word TABLE must be uppercase. This would lisl all tables in the database. The same query could be modified slightly to list functions, procedures, sequences, view and more.<\/p>\n\n\n\n<p><em>List functions<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select * from user_objects where object_type = 'TABLE'<\/code><\/pre>\n\n\n\n<p><em>List indices<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select * from user_objects where object_type = 'INDEX'<\/code><\/pre>\n\n\n\n<p><em>List packages<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select * from user_objects where object_type = 'PACKAGE'<\/code><\/pre>\n\n\n\n<p><em>List package bodies<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select * from user_objects where object_type = 'PACKAGE BODY'<\/code><\/pre>\n\n\n\n<p><em>List procedures<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select * from user_objects where object_type = 'PROCEDURE'<\/code><\/pre>\n\n\n\n<p><em>List sequences<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select * from user_objects where object_type = 'SEQUENCE'<\/code><\/pre>\n\n\n\n<p><em>List synonyms<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select * from user_objects where object_type = 'SYNONYM'<\/code><\/pre>\n\n\n\n<p><em>List triggers<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select * from user_objects where object_type = 'TRIGGER'<\/code><\/pre>\n\n\n\n<p><em>List views<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select * from user_objects where object_type = 'VIEW'<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to list tables in MySQL, you simply type the following command: Oracle does not provide such a short cut. You have to type the following command: The word TABLE must be uppercase. This would lisl all tables in the database. The same query could be modified slightly to list functions, procedures, sequences, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,515],"tags":[14,3],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-database","category-oracle","tag-database","tag-oracle"],"_links":{"self":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":1,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":15,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/14\/revisions\/15"}],"wp:attachment":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}