Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 5555

Procedural Language/Structured Query Language is Oracle Corporation's procedural language extension for SQL. IBM supports PL/SQL for DB2 since version 9.7. Questions about PL/SQL should probably be tagged "oracle" or "db2" as well.

5
votes
You need to pass in a REFCURSOR for the procedure to use as its output (OUT) parameter. Quick procedure to test with: CREATE OR REPLACE PROCEDURE passenger_details (p_passenger_details OUT SYS_REFCU …
answered Jul 31 '17 by Philᵀᴹ
3
votes
Several things. 1) Your trigger doesn't look right - I think you need the trigger to be on the locomotive table, rather than the locamotive_class table, and have a newly inserted/updated train have …
answered Mar 26 '13 by Philᵀᴹ
11
votes
As you can see from the output below, a test anonymous PL/SQL block works in SQL Plus as expected: [oracle@node1 ~]$ sqlplus phil/phil SQL*Plus: Release 11.2.0.2.0 Production on Mon Oct 1 21:55:35 2 …
answered Oct 11 '12 by Philᵀᴹ
1
vote
I suspect you're using multiple sessions and the other session cannot "see" the work performed because it is currently uncommitted. The default Oracle transaction Isolation Level is Read Committed. T …
answered Oct 1 '14 by Philᵀᴹ
1
vote
Your question isn't 100% clear, but if you just want to insert the larger of two dates you can use a case statement (there are lots of other ways of doing this too!): with data as ( select DATE'201 …
answered Feb 14 '13 by Philᵀᴹ
25
votes
I think this is what you're after: V_COUNT := MY_ARRAY.COUNT;
answered Jan 24 '12 by Philᵀᴹ
1
vote
Many ways, but as you suggested, you can use DUAL: CREATE PROCEDURE NODATAFOUND AS nowt VARCHAR(10); BEGIN SELECT * INTO nowt FROM DUAL WHERE 1=0; END; / It'll produce a ORA-01403: no data fo …
answered Jun 4 '16 by Philᵀᴹ
2
votes
There is absolutely nothing about this on the Internet - even the Oracle docs regarding the %_ASSEMBLIES views don't actually state what they show. However, if you go digging around in $ORACLE_HOME/r …
answered Mar 23 '15 by Philᵀᴹ
3
votes
Your analysis is correct. You don't need the trigger because the constraint is doing the same job. Anyway, to drop the constraint use: Alter table train drop constraint train_len;
answered May 6 '13 by Philᵀᴹ
5
votes
HOLIDAY_RESERVATION, which is aliased as R in your UPDATE statement , is not in the FROM clause in the SELECT query.
answered Mar 26 '12 by Philᵀᴹ
5
votes
It is a bug, because the documentation states: USAGE_CONTEXT_ID is a reflexive foreign key to USAGE_ID UPDATE: A bit of troubleshooting... all_identifiers.usage_id comes from sys.plscope_action …
answered Jan 10 '13 by Philᵀᴹ
3
votes
If you want to go down this route (be aware there's a limit of 4000 values per IN, and all of the individual SQL statements are going to flood your shared pool, potentially causing performance problem …
answered Feb 13 '14 by Philᵀᴹ
3
votes
drop, along with create, alter, truncate etc is a DDL (Data definition Language) statement. DDL is not allowed in PL/SQL blocks. Your script is a PL/SQL block (it has begin and end, along with variabl …
answered May 23 '14 by Philᵀᴹ
2
votes
Depends on the client you're using really, but this should work in SQL*Plus, SQL Developer etc. set serveroutput on; declare call_charge VARCHAR(10); MSG_OUT VARCHAR(50); BEGIN FOR RE …
answered Jun 14 by Philᵀᴹ
2
votes
GRANT ALL PRIVILEGES ON .... is MySQL privs syntax. You need to do: GRANT ALL ON SCHEMA.TABLE TO USER See the documentation.
answered Nov 13 '15 by Philᵀᴹ

15 30 50 per page