HOW TO ADD PRIMARY KEY TO TABLE BY PL/SQL PROGRAM

Answers were Sorted based on User's Feedback



HOW TO ADD PRIMARY KEY TO TABLE BY PL/SQL PROGRAM ..

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

HOW TO ADD PRIMARY KEY TO TABLE BY PL/SQL PROGRAM ..

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

HOW TO ADD PRIMARY KEY TO TABLE BY PL/SQL PROGRAM ..

Answer / saran

alter <tablename> attributename,constriantname

Is This Answer Correct ?    3 Yes 8 No

Post New Answer

More SQL PLSQL Interview Questions

what are the advantages and disadvantages of cascading style sheets? : Sql dba

0 Answers  


SELECT flavor, SUM (ice_cream_sales) FROM sales_detail GROUP BY flavor ORDER BY 2 DESC If the "sales_detail" table contains ten records with different values in the flavor column (two "vanilla," three "chocolate," four "strawberry," and one NULL), how many rows are returned by the sample code above? 1. 0 rows 2. 1 row 3. 3 rows 4. 4 rows 5. 10 rows

8 Answers   Sonata,


how can stop the sequence with mention the max value and with out mention the max value

1 Answers   Zensar,


What do you mean by dbms? What are its different types?

0 Answers  


What is user defined functions?

0 Answers  






Table Order_Name has a column Order_Date which gives the date & Time at which the order is passed.Find the table to write a query to find out the latest order.

5 Answers   Thomson,


what is transaction? : Sql dba

0 Answers  


What does count (*) mean?

0 Answers  


Is ms sql is free?

0 Answers  


Explain uses of cursor.

1 Answers  


what is a trigger in mysql? Define different types of trigger. : Sql dba

0 Answers  


Maximum how many triggers can we use in trigger and How to find out how many records it fetched.

1 Answers   TCS,


Categories