answersLogoWhite

0

How do you create a primay key in Oracle?

Updated: 8/17/2019
User Avatar

Wiki User

14y ago

Best Answer

You can create a primary key column in an oracle table using the PRIMARY KEY keyword. Assuming you have an employee table that has employee information and has a column called emp_num. you can create a primary key in the table using the below command.

ALTER TABLE tbl_employee_info add CONSTRAINT emp_pk PRIMARY KEY (emp_num)

If you execute the above command in your database, emp_num will become the primary key of the table tbl_employee_info.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you create a primay key in Oracle?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Why must create database in oracle?

gfhgfhgfhjgfjghk


What is the difference between oracle and oracle?

Oracle is one of the popular database and DBA (DataBase Administrator) is the person who maintain the database (install oracle software, create,setup,maintain database)


How can one create tables in Oracle?

If one is wanting to create a table in Oracle one must use the "Create Table" statement. These tables are partially defined by the columns contained and the information in the column. One must first decide the proper column type and then these data types are used in the Create Table statement. One must be somewhat familiar with Oracle in order to create these tables and additional information can be found on the DBA-Oracle website.


Is the relational database an example of oracle database?

A relational database is a type of database design. Oracle is a brand of database. You can create a relational database using Oracle. You can also create relational databases using other database applications.


How do you use foreign key in to oracle?

the foreign key referential between two tables.


How do you create an Excel to Oracle converter?

From MS Excel, there is nothing you can create. You can save an Excel file in various formats, that might make it easier to import the data into Oracle.


How do you enter a primary key in oracle when information repeats?

1024


What are the components of oracle database?

DDL - Data Definition Language Create,Alter,Drop and Truncate are the components of oracle database.


Set oracle sid in windows registry?

I windows 2008 R2: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb11g_home1 Create ORACLE_SID as a string


How can we create directories in oracle database?

A directory for Oracle is created on the Unix OS. There is a "OFA" which is Oracle's standard directory structure. One of the reasons for adhering to this OFA is ease of administration. All Oracle databases are set up the same--therefore, a new DBA knows where to look for certain files in specific places. The Unix System Administration creates an Oracle DBA account. That account is allowed to create directories under an Oracle/database designated section only.


How old is Glen Waverley Primay School?

2006


What is the primay source of chemical energy?

ATP (Adenosine tri-phosphate)