الانتقال إلى المحتوى

Oracle Basic Interview Questions


J.DEV

Recommended Posts

[وسط]Oracle Basic interview questions




1. What's the command to see the current user name?

Sql> show user;




2. What is the command to change the SQL prompt name?

SQL> set sqlprompt 'TYRO->'
TYRO-1 >




How do you switch to DOS prompt from SQL prompt?

SQL> host





How do I eliminate duplicate rows in an Oracle database?

DELETE FROM table_name WHERE ROWID NOT IN (SELECT   MAX (ROWID)
                             FROM table_name GROUP BY duplicate_values_field_name);




5. How do I display row number with records?
Use the row-num pseudocolumn with query, like

SQL> select rownum, ename from emp;




6. How do you display the records within a given range?SELECT ROWNUM, empno, ename

FROM emp WHERE ROWID IN (SELECT ROWID
                  FROM emp WHERE ROWNUM < = &rangeend
                MINUS
                SELECT ROWID
                  FROM emp WHERE ROWNUM < &rangebegin);




7. The NVL function only allows the same data type. But here's the task: if the commission field is null, then the text 'Not Applicable' should be displayed, instead of blank space. How do you write the query?

SQL> select nvl(to_char(comm.),'Not Applicable') from emp;





8. How do you view version information in Oracle?

SQL> select banner from $version;





who answer this questions ?[/وسط]

رابط هذا التعليق
شارك

  • بعد 1 شهر...

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية