Click here to Skip to main content
15,896,318 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have encountered in a problem that is am not able insert data into table..
beacuse table having 4 pk ..that column is not allowing to insert data properly.so i need to drop primary key once and aging reset it back to same table..is it possible please help me out..
Posted

1 solution

Of course you can. As long as there is no foreign key referring to that primary key. If there is, you need to drop that too. The actual syntax depends on the RDBMS you are using. SQL is just a language name.
Here is how you can do it in SQL Server: https://msdn.microsoft.com/en-us/library/ms190621.aspx[^]

Once it is dropped you can recreate is as easy as you created it before.
Here is the SQL Server way to do it: https://msdn.microsoft.com/en-us/library/ms189039.aspx[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900