sql - Fast way to determine if an field exist in a ORACLE table -
I'm looking for a quick SQL sentence to determine when a field exists or does not exist in a table .
In fact, I am using this sentence
Select 1 to Dual where exists (Select 1 from all_tab_colymes where table_name = 'mast' and 'Column_name =' MYCOLUMN '') I think the fastest way to determine whether or not a column in Oracle is in existence should be.
UPDATE
I can not modify source code, because a large software system that makes many calls to this query; (Only I can modify the query that is stored in an external file.
The table has more than one million records of all_tab_column record
is the primary key of all_tab_columns owner, table_name, column_name therefore the search for a particular owner will be faster (or < Code> user_tab_columns .).
Comments
Post a Comment