---
title: "Oracle 中修改Table的主键的方法 "
author: "geshenyi"
date: "2011-08-29T10:21:51Z"
tags: []
categories: ["数据库"]
slug: "oracle-table"
draft: false
lastmod: "2011-08-29T10:21:51Z"
id: 1160123
url: "https://geshenyi.iteye.com/blog/1160123"
---

Oracle 中修改Table的主键的方法

1. ALERT TABLE table_name ADD CONSTRAIN T1_C1 (PRIMARY KEY(column1, column2...));

2. ALERT TABLE table_name MODIFY( column1 PRIMARY KEY);