![]() |
Some Commands while we are retrieving the data from the data base (Condition for WHERE/SELECT/FROM etc) ORACLE Queries Some Condition while we are retrieving the data from the data base consider we have a table of the student. having different records. we want to display some records according to our own choice. e.g. we want to show the records of the students whose subject is English we will enter the following statement. Code: select *select is for selecting the table column, here * indicates that system will display all the column of the table saved in the student data base from student means get data from student's table. where is a simple condition... and it will show only the data of those students whose subject are English saved in data base. :agasp_: Showing the all Columns and Tables by using desc Code: desc table name;Arithmetic Operations:we can perform on the table See this example. Code: Select subject,marks,name,marks+5Null:Null is also used in Oracle data Base systems; Code: Select *Distinct values Display:We can remove the duplication while displaying the data from the table. Code: Select distinct subjectCode: save ABC,Quote:
Between Operation:It is used to display the records between the some range described in the query. Consider we have a Data Base table of Emp (Emplyee) and using following query Code: select *In Operator:Display the record of empno 1,3 and 5 only Code: select *Consider if table records are saved as 01,03 and 05 Code: select *Like Operator:It is used as wild card / you may say for string searching. Code: Select empno,enameCode: where ename like '%A' ; /// it will search all the elements ending on AQuote:
Code: Select empno,enameyour practices : Write the query which display the name of those employees where name of employees containing letter Z; And operator:It is used to find out the column where both of the conditions are true Code: Select empno,enameOrder By:
Code: select empno,ename,salCode: order by sal;we can use two different columns at a time. Code: select empno,ename,sal,cityFinished... Any Question ?:info: |
| All times are GMT +5. The time now is 10:54 AM. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.