Press "Enter" to skip to content

How to Set Primary Key in Toad for Oracle?

In this tutorial, you will learn how to set the primary key in Toad for Oracle.

Follow These Steps to Set the Primary Key for a Table in Toad for Oracle

  1. Open Toad for Oracle and login to your database.
  2. Then click on the menu Database > Schema Browser.
  3. In the schema browser window, select the table for which you want to set the primary key.
  4. Then do the right click on the selected table and select Alter Table option from the shortcut menu.
  5. Now table will open in edit mode in Toad for Oracle.
  6. Then click the checkbox for the columns you want to set the primary key as shown in the below image.

Set primary key for a table using Toad for Oracle

  1. After selecting the columns click on the OK button to apply.

Also, before clicking on the OK button, you can click on the Show SQL button to view the SQL statement for the current changes you have made. For example, for the above change below is the script.


You can run the above Alter Table statement in SQL editor of Toad and press F9 to run.

Vinish Kapoor

Hi, I am a full stack developer and writing about development. I document everything I learn and help thousands of people. is created, written, and maintained by me; it is built on WordPress, and hosted by Bluehost. Connect with me on Facebook, Twitter, GitHub, and get notifications for new posts.

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *