Skip to content
Advertisement

Tag: oracle

Oracle: DBMS_UTILITY.EXEC_DDL_STATEMENT vs EXECUTE IMMEDIATE

Which are the differences between DBMS_UTILITY.EXEC_DDL_STATEMENT and EXECUTE IMMEDIATE? Answer Fundamentally they do the same thing, which is to provide a mechanism to execute DDL statements in PL/SQL, which isn’t supported natively. If memory serves me well, the EXEC_DDL_STATEMENT was available in the Oracle 7 version of the DBMS_UTILITY package, whereas Native Dynamic SQL (EXECUTE IMMEDIATE) was only introduced in

What is the difference between CLOB and NCLOB?

Can you state any difference between the CLOB and NCLOB? Answer A CLOB stores character data encoded in the database character set. A NCLOB stores character data encoded in the national character set will show you the database and national character sets of your database.

Update Query with select and row lock

I got this query as part of a previous answer to my question. Now how to lock the rows in the select query to make sure no other thread over writes my update. Answer It’s not clear to me that you have the problem you seem to think you have. Updating a row in the table inherently places a row-level

How to use “Partition By” or “Max”?

I’ve the following table (my_data): what is the best / smallest SQL statement to retrieve only the data related to the highest year and grouped by ‘X’ , like this: Note that this result table will be used in a join. Answer

What does the following Oracle error mean: invalid column index

I got the following error while testing some code: SQLException: Invalid column index What exactly does that mean? Is there an online document explaining what all the Oracle error codes and statements? Answer If that’s a SQLException thrown by Java, it’s most likely because you are trying to get or set a value from a ResultSet, but the index you

Update statement using with clause

I have a script that uses a stack of with clauses to come up with some result, and then I want to write that result in a table. I just can’t get my head around it, could someone point me in the right direction? Here’s a simplified example that indicates what i want to do: The real thing has quite

Advertisement