During validation you need to check, if Table exists or not. You can verify the data if Table exists. Here’re the top methods to verify if Table exists.
Listed below are useful SQL queries to check if Table exists in Oracle. Note: This question asked in all major IT companies – HCL/TCS. So, you can use anyone of the below SQL queries to find if Table exists in Oracle using SQL developer.
Create a Table & Insert Values
First I have created a Table
create table
srini_table_one(
name char(20),
rollnum int
);
Inserted values
insert
into srini_table_one
values(
'rama',20
);
Selected rows
select *
from
srini_table_one;
Check if Table Exists
Method:1
desc srini_table_one;
Method:2
select *
from srini_table_one
where rownum=1;
Method:3
select table_name
from
user_tables;
Conclusion
- These three SQL queries useful to check if table exists or not
References
Don’t Hesitate to Share If you’re Happy with these Methods
Get new content delivered directly to your inbox.
You must be logged in to post a comment.