> My requirement was 6 fields and 2nd guy need 12 filed.

You should setup two tables. The first one will track common
data for each user (e.g. name, address...) like:

create table users (
   name varchar(255), 
   address varchar(255),
   ...
   userid integer unsigned auto_increment primary key
);

Using this table, each user will be assigned a unique, numeric,
userid.

Next, you setup a table for 'qualifications':

create table qualifications (
    userid integer unsigned,
    qualification varchar(255),
    primary key (userid, qualification));

you will first insert a record into the 'users' table,
and next one record for each qualification.

Later, if you need all qualifications for a given user,
enter:

select qualification from users u, qualifications q where
  u.userid=q.userid and u.userid=12345;


-- 
----------------------------------------------------------------
Johannes Ullrich                     [EMAIL PROTECTED]
pgp key: http://johannes.homepc.org/PGPKEYS
contact: http://johannes.homepc.org/contact.htm
----------------------------------------------------------------
There are two kinds of system administrators:
The first kind solves problems with little shell scripts.
The second kind are the problem.
----------------------------------------------------------------


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to