February 2, 2011 at 3:29 am
Guys I need a little bit support on this:
My question is related to the following table:
In the table, I have to create an item that is a meaningless primary key called ''banr''. I need a SQL script that makes this change. I have to use Alter and Drop statements, but I really do not know how I can use ALTER and DROP?
The uniqueness rule for the columns Order, article should be retained.
I think that I have to follow these steps but i am not sure and don't know what is the best way and how it will look like.
1. Create a new table with primary key or ID with name ''banr'' with AUTOINCREMENT and which is meaningles, + other fields.
2. insert into new_table and select from old table
3. Drop old table
4. rename new table to old table
How can I make this script? How does it looks like? If anyone can help a little way. Many thanks!
February 7, 2011 at 6:39 am
We can't see (or at least I can't) your tables. Can you repost?
EDIT: Please post table DDL (the create scripts with all keys and indexes). Pictures don't help us help you.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy