HOW TO ADD PRIMARY KEY TO TABLE BY PL/SQL PROGRAM
Answers were Sorted based on User's Feedback
Answer / prativa mishra
begin
execute immediate('alter table table_name add constraint constraint_name primary key(column_name)');
end;
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / prativa mishra
BEGIN
EXECUTE IMMEDIATE 'ALTER TABLE TABLE_NAME ADD CONSTRAINT PK1
PRIMARY KEY(COLUMN_NAME)';
END;
| Is This Answer Correct ? | 2 Yes | 0 No |
What is an index and types of indexes. How many number of indexes can be used per table ?
12 Answers Accenture, BirlaSoft, Cognizant, CTS, Symphony,
What is sequence in sql?
How you will create Toad Function?
What are the key differences between SQL and PL SQL?
What is the purpose of primary key?
How can I see all tables in sql?
What is foreign key sql?
what are the system privileges that are required by a schema owner (user) to create a trigger on a table?
What is mutating trigger?How to avoid it??
What is on delete restrict?
what is bcp? When does it used? : Sql dba
What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)