MySQL Forums
Forum List  »  General

Problem: Using varchar as primary key
Posted by: Tim Reynolds
Date: May 14, 2005 01:45PM

I have agreed to port some software for the comp sci department from MSSql to MySql and I am having a problem.

I can not change much of the core design in this software, which is unfortunate, because some of its design is quite poor. I can only adjust the scripts used to create the database and write to it.

For whatever reason, the person who created the software decided to use varchar(8000) as a primary key in almost every table... now, I have already searched on the usual problem with doing that (creating an index) and have fixed that part. The problem I am having now is when I try to add constraints to the tables based on this primary key, it throws an error saying I must give it a lenght.

I can't, for the life of me, figure out how to give it a lenght in the conditional statement.

Please help if you can, and if you need more information just ask. I am looking to finish up this portion of the code soon, put it behind me hehe.

Tim

Options: ReplyQuote


Subject
Written By
Posted
Problem: Using varchar as primary key
May 14, 2005 01:45PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.