Lets learn the basic of Oracle Programming in this blog
Select statement to query a table
Select * from emp;
Select * From Dept ;
Here * denotes that every column of the table has been selected.
emp -> table_name
Select statement to query a table with a filter condition.
Select * From EMP Where Employee_name = 'Joe' ;
Here
1) We are selecting all the columns of table EMP
2) The Query has been filtered for Employee name 'Joe'
Describe columns name present in the table "Dept"
Desc Dept ;
Insert statement
Now , Let try to insert a new row with values like dept no = 10 , dept name = eee , job = e
Insert into Dept values(10,'eee','e');
The above Query will insert a row into the table Dept and it will be displayed by using the Select Statement.
Now , Let try to insert a new row with values like Emp no = 100 , Emp Name = "John", Designation = "Manager",
Manager id = 200 , Hired Date = 26-Aug-2010 , Salary = 25000 , Tax = 2000 , Dept no = 10
Insert into Emp values(100,'John','Manager',200,'26-Aug-2010',25000,2000,10) ;
Different table Join
Inner join
Select A.Emp_name , B.Dept_name From Emp AS A
Inner Join Dept AS B
On A.Dept_id = B.Dept_id;
Check out : Oracle Programming Advanced
Select statement to query a table
Select * from emp;
Select * From Dept ;
Here * denotes that every column of the table has been selected.
emp -> table_name
Select statement to query a table with a filter condition.
Select * From EMP Where Employee_name = 'Joe' ;
Here
1) We are selecting all the columns of table EMP
2) The Query has been filtered for Employee name 'Joe'
Describe columns name present in the table "Dept"
Desc Dept ;
Insert statement
Now , Let try to insert a new row with values like dept no = 10 , dept name = eee , job = e
Insert into Dept values(10,'eee','e');
The above Query will insert a row into the table Dept and it will be displayed by using the Select Statement.
Now , Let try to insert a new row with values like Emp no = 100 , Emp Name = "John", Designation = "Manager",
Manager id = 200 , Hired Date = 26-Aug-2010 , Salary = 25000 , Tax = 2000 , Dept no = 10
Insert into Emp values(100,'John','Manager',200,'26-Aug-2010',25000,2000,10) ;
Different table Join
Inner join
Select A.Emp_name , B.Dept_name From Emp AS A
Inner Join Dept AS B
On A.Dept_id = B.Dept_id;
Check out : Oracle Programming Advanced
No comments:
Post a Comment
Please Give Your Comments!!
Note: Only a member of this blog may post a comment.