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

ارجو المساعدة .... سئلت في مقابلة اسئله احتاج حلها


MOSAP8MOH

Recommended Posts

السلام عليكم ازيكم يا شباب انا كنت في انترفيو امس وجتلي الأسئلة السهلة جدا دي بس مش عارف جاوبت صح ولا غلط ياريت
حد يتبرع يجاوب عليها اجابه نموزجيه:
1.HOW do I eliminate the duplicate rows?
2. What is the types of view?explain in detail?
3. What is deifference between pl sql library,object library ,object gruop?
4. can I create the table space and the index of that table on another table space ?
5. Whit's the report triggers ?
6. How do I display row number with records in employee table ?
7. what is the difference between implicit & Explicit cursors ?
8. Find out the highest salary from employee table ?
9. Which date function returns number value?
10. Wat is the output of SIGN function ?
11. What is the maximum number of triggers, can apply to a single table ?
12. To view installed Oracle version information ?

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

How do I eliminate the duplicate rows ?



SQL> delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name); or SQL> delete duplicate_values_field_name dv from table_name ta where rowid <(select min(rowid)  from table_name tb where ta.dv=tb.dv); 
Example. 
Table Emp 
Empno Ename 
101               Scott 
102               Jiyo 
103               Millor 
104               Jiyo 
105               Smith 
delete ename from emp a where rowid < ( select min(rowid) from emp b where a.ename = b.ename); 
The output like, 
Empno Ename 
101               Scott 
102               Millor 
103               Jiyo 
104               Smith



2. What is the types of view?explain in detail?


Simple Views and Complex Views
(INSERT , UPDATE, DELETE ) DML الاختلاف الأساسي بينهم مرتبط بعمليات
: Simple View*
تاخذ البيانات من جدول واحد فقط. •
. Group by أو فقرة function لا تحتوي علي •
يمكن أن يؤدي بها عمليات • DML .
: Complex View*
تاخذ البيانات من اآثر من جدول. •
function تحتوي علي
او فقرة group by 
. DML عادة لا تسمح بعمليات •



12. To view installed Oracle version information ?



SQL> select banner from v$version;




11. What is the maximum number of triggers, can apply to a single table ?



12 trigger for each table



10. Wat is the output of SIGN function ?



-1 , 1 , 0



9. Which date function returns number value?



months_between



8. Find out the highest salary from employee table ?



select max(salary)  from employees



7. what is the difference between implicit & Explicit cursors ?




For SQL queries returning a single row, PL/SQL declares all implicit cursors. 
For queries that returning more than one row, the cursor needs to be explicitly declared

.

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

اخي mmsalman87 انا بجد عاجز عن الشكر جزاك الله كل خير
سعدت جدا بتفاعلك معي والرد والحمد لله ذهبت لمقابلة اخري اول امس
وكانت بها اسئلة متفرقة لكل مادة وساطرحها ايضا للإفادة

SQL:
1. List any 5 single row character functions ?
2.List any 2 conversion functions with examples ?
3. List any 3 gruop functions ?
4. Write a query to display 5 years salary in each department ?
5. Write a query to increas the salary of all the emplyee by 10% who joined before 24 months ?
6. Write a query to display the following information from dept and emp tables
a. Empno, ename,job,sal,deptno,dname,loc for department 20 ?
7. Write a query to display the SALESMAN earning more than their manegers from emp table ?
8. Write a query to display the SALESMAN joined before their managers ?
9. Write a query to delete duplicate rows from Emp table ?
10. Write a query to display 3 highest salaries of employee ?
11. Create a master (primary key )and detail (foreign key)table by your own ?
12. Create a cmplex view ?

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

وهذا امتحان البي ال
PL/SQL
1.Write a pl/sql Block to display the following information for the given employee on. use Exceptions.
a.Empno,Ename,Job,sal,Deptno
2.Writie pl/sql Block to display integers from 1...n where n is the given number using the while loop.
3.Write aPL/SQL Blocke to display even numbers from 1...n where n is the giben number using for loop
4.Write a PL/SQL Block to display employee information working in department 10 .
5.Write a Procedure to accept employee number from the user and increase the salary of the given employee by 10%
6.Write a Fucntion to accept 3 numbers from the user and display the Smallest number.
7.Write a database trigger to insert a record in Emp 1 table when the data is insrted in Emp table.

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

  • بعد 5 شهور...

روح ياشيخ الله يباركلك اوى على الاجابات الجميلة ديه بجد ربنا يعين كل واحد يقدر يساعد اى حد فى اى حاجه

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



السلام عليكم ورحمة الله وبركاته

بعد إذن أساتذتى أريد أن أوضح لكم معلومة بالنسبة ل implicit & Explicit cursors ?


ان ال implicit cursors لا تحتاج لجملة اقفال ولكن أوراكل يقفلها أوتوماتيك بمجرد تنفيذها

بعكس ال Explicit cursors لازم يقفلها المبرمج بالكود والا سوف يظل الكيرسور فى العمل مالم يتوقف ب Exception


وبالتوفيق ان شاء الله

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




السلام عليكم ورحمة الله وبركاته

بعد إذن أساتذتى أريد أن أوضح لكم معلومة بالنسبة ل implicit & Explicit cursors ?


ان ال implicit cursors لا تحتاج لجملة اقفال ولكن أوراكل يقفلها أوتوماتيك بمجرد تنفيذها

بعكس ال Explicit cursors لازم يقفلها المبرمج بالكود والا سوف يظل الكيرسور فى العمل مالم يتوقف ب Exception


وبالتوفيق ان شاء الله

واضافه على الفروق بين الاتنين implicit cursors لايجوز استخدم %FOUND او %ISOPEN او %NOTFOUND او %ROWCOUNT
وبالتوفيق لجميع .
رابط هذا التعليق
شارك

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

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

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

×   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.

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

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

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