Welcome to plsql4all.blogspot.com SQL, MYSQL, ORACLE, TERADATA, MONGODB, MARIADB, GREENPLUM, DB2, POSTGRESQL.

Wednesday, 6 August 2014

Field, Records & Column in Oracle

What are field, record and column in oracle?
To understand this we are required to create and insert values in a table. So let’s create an employee table.
You know the syntax:-
CREATE TABLE EMPLOYEE (EMPNO NUMBER, EMPNAME VARCHAR2 (10), SALARY NUMBER (6, 2));
INSERT INTO EMPLOYEE VALUES (1, ’CHANCHAL’, 5000);
SELECT * FROM EMPLOYEE;
What is field?
In above case fields are the name of the all the columns so list of empno, empname and salary is collectively called field.
What is record?
Record is a collection of all the values in one row. In above case records consist of 1, CHANCHAL and 5000.
What is column?
Column is a list of values in one field. In above case column can be empno, empname, or salary.
IS� � o p p�N �W span>

CREATE INDEX MUL_INDX ON EMPLOYEE (EMPNO, SALARY);

=MsoNorY < p p�N �W 'font-family:"Arial","sans-serif";background: white'> 




Type required info like database name, scheme name (username) and password:-
Select connect as Normal. Since we are programmer we can connect only as normal (without sys privileges)as shown below:-
Click OK to connect.
Sql*plus:-
It’s another oracle supplied tool which gets install when you install oracle. It is similar to toad.
Let’s see how to connect to oracle by using sql*plus:-
Click on the START > ALL PROGRAMS > ORACLE > APPLICATION DEVELOPMENT > SQL PLUS.
 

Once you click on sql plus it will open sql * plus window:-

Type username (schema name), password and host string:-
Click OK.
Oracle sql developer:-
Install oracle sql developer or click on sql developer.exe file, it will show you initialization process:-
Click on
Once you click on  you will land onto the below screen. Type the name of the connection as you want, type the username, password, and then click on save password checkbox, type host name or ip_address of the machine, specify the port number and database SID or Service name, after putting all the information click on test  or you can directly click on connect button:-

Once you click on save button, the connection will be saved in the connection tab so you can use it again and again. You can see below the name CONNECTION_TO_SCOTT is present in the connection tab.


If you want to add more connection then just click on  and put all the required information. After you saved it, it will be listed in connection tab.


No comments:

Post a Comment

Please provide your feedback in the comments section above. Please don't forget to follow.