![]() |
|
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Junior Member Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 4 | 1.What is the fastest query u can execute for just checking to c if a value exists in a certain column on a certain table? 2.Can a foreign key reference a field which is not a UNIQUE or a PRIMARY KEY? 3.Can v call atored function in the contraint of a table? |
| | |
| | #2 (permalink) |
| Junior Member Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 4 | Re: Oracle Queries The third question is Can v call stored function in the constraint of a table? Few more Questions... can a named notation be used while passing parameters to a stored function called in a SQL stmt? |
| | |
| | #3 (permalink) |
| Junior Member Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 4 | Re: Oracle Queries Answer to 2nd question NO If v try to add a foreign key constraint which references a field that is neither unique nor primary key then v get the following error. SQL> alter table emp1 add constraint dname_fk foreign key(dname) references dept(dname); alter table emp1 add constraint dname_fk foreign key(dname) references dept(dname) * ERROR at line 1: ORA-02270: no matching unique or primary key for this column-list can a named notation be used while passing parameters to a stored function called in a SQL stmt? NO...When calling stored functions from SQL, named notation is not supported. Answer to First Question 1.What is the fastest query u can execute for just checking to c if a value exists in a certain column on a certain table? If there is no value then SQL> select 'X' from dual where exists (select 'X' from emp where deptno=40); no rows selected If there is atleast one value then 1* select 'X' from dual where exists (select 'X' from emp where deptno=30) SQL> / ' - X Answer to third question Can v call stored function in the constraint of a table? NO..it will not recognise function and it will give invalid identifier. I wrote one function and tried to use it in check constraint and it gave invalid identifier error. |
| | |
| The Following User Says Thank You to Mrs Chepeni For This Useful Post: | sk_kireeti (27-10-06)
|
| | #4 (permalink) |
| Junior Member Join Date: Sep 2006
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 4 | Re: Oracle Queries Hi sir this is sabarinath i want to join the course oracle pl/sql plz suggest me which books are preferable.and also send me material and faqs on pl/sql Thank u sir your's Sabarinathbabu |
| | |
![]() |
| Tags |
| oracle , queries |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| which course is better in oracle | linas | ORACLE , SQL SERVER , SYBASE & Others | 7 | 24-08-08 01:04 PM |
| Hi frs this is venki-some oracle Queries | venkishankar | DATA STRUCTURES, C, C++, VC ++ | 1 | 20-09-06 01:52 PM |
| oracle apps hrms queries | msandeemi@gmail.com | ORACLE , SQL SERVER , SYBASE & Others | 1 | 20-09-06 03:49 AM |
| ORACLE INDIA - CHENNAI - 20 AUG | sridhar | Walk-ins | 4 | 23-08-06 10:03 AM |
| Sonata software calls Oracle app Techno-functional consultants | sridhar | Experienced Jobs | 0 | 27-07-06 07:18 PM |
| More Interview Questions Here... |