How to determine tables size in Oracle [duplicate]
If you don’t have DBA rights then you can use user_segments table: select bytes/1024/1024 MB from user_segments where segment_name=”Table_name”
If you don’t have DBA rights then you can use user_segments table: select bytes/1024/1024 MB from user_segments where segment_name=”Table_name”
Or slightly more readable: select * from mytable where lastupdatedDate > sysdate – interval ’10’ minute
SELECT table_name, column_name, data_type FROM all_tab_columns WHERE table_name=”VIEWNAME” AND owner=”OWNER” ORDER BY column_id You can also use USER_TAB_COLUMNS and/or DBA_TAB_COLUMNS depending on your privileges and whether you have permission to query the view.
SQLPLUS COMMAND Skipped: set heading off That message is most likely because you are not executing it through SQL*Plus, but some GUI based tool. You are using SQLPlus command in SQL Developer. Not all SQL*Plus commands are guaranteed to work with SQL Developer. I would suggest you execute the script in SQLPlus and you would … Read more
You’ve got a couple of issues here. Firstly, the different versions of Oracle you’re using is the reason for the table statistics error – I had the same issue when some of our Oracle 10g Databases got upgraded to Release 2, and some were still on Release 1 and I was swapping .DMP files between … Read more
to_date converts the input to a DATE type which does not support fractional seconds. To use fractional seconds you need to use a TIMESTAMP type which is created when using to_timestamp pst’s comment about the ff3 modifier is also correct. “Constant” values in the format mask need to be enclosed in double quote So the … Read more
Pressing ctrl+shift+N will open a new unshared worksheet that can run queries in parallel. In that case you have to paste a query in each tab and run them manually though, but it is handy when just testing a few queries.
Try this: (select * from T1 minus select * from T2) — all rows that are in T1 but not in T2 union all (select * from T2 minus select * from T1) — all rows that are in T2 but not in T1 ; No external tool. No performance issues with union all.
As Rene also commented, it’s quite uncommon to check first and then create the table. If you want to have a running code according to your method, this will be: declare nCount number; v_sql clob; begin select count(*) into nCount from dba_tables where table_name=”EMPLOYEE”; if ncount <= 0 then v_sql := ‘ create table employee … Read more
ORA-00904-invalid identifier errors are frequently caused by case-sensitivity issues. Normally, Oracle tables and columns are not case sensitive and cannot contain punctuation marks and spaces. But if you use double quotes to create a quoted identifier, that identifier must always be referenced with double quotes and with the correct case. For example: create table bad_design(“goodLuckSelectingThisColumn … Read more