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 are the differences among rownum, rank and dense_rank? : Sql dba
What is #table in sql?
What will happen after commit statement ?
How to use distinct and count in sql query? Explain
what is the difference between a having clause and a where clause? : Sql dba
How to look at the current sql*plus system settings?
How to get the 3rd column(i.e all the data along with the column name)in a table?
Its possible to add more than one primary key for the table
Is it possible to pass parameters to triggers?
Does indexing improve query performance?
Which language is used in sql?
Differentiate between syntax and runtime errors.
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)