Pages

শুক্রবার, অক্টোবর ২৮, ২০১১

MySQL command when we mistake to select PRIMARY KEY


Some time in MySQL we mistake to select PRIMARY KEY. That's no matter. Suppose You create NAME field as PRIMARY KEY of STUDENT table but you need to create ID as PRIMARY KEY. You don't know the command. Ok this is the command.

""  ALTER  TABLE  student  DROP  PRIMARY KEY ;  ""
""  ALTER  TABLE   student  ADD  PRIMARY KEY(id) ;  ""

1 comments:

tens21 on ২৮ অক্টোবর, ২০১১ এ ২:০৭ PM বলেছেন...

tanks

একটি মন্তব্য পোস্ট করুন

 

Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com