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 difference between stored procedure and trigger?
How can we connect an Android App to an Oracle database and use the PL/SQL procedural code?
How can multiply values of a column? OR How can multiply value of a row of a column using a single query in SQL?
What is pivot in sql?
Write a query to find five highest salaries from EMP table. (there is a column SALARY)
24 Answers Cap Gemini, iNautix,
What are all the ddl commands?
when is the use of update_statistics command? : Sql dba
What are Anti joins
How many unique keys can a table have?
Is drop table faster than truncate?
Explain the uses of a database trigger?
How to fetch records from a partitioned table?
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)