i have a problem in choosing data type for this column in SQL..can anybody help me???

result (tournament_id*, player_id*, round)
i've done the first 2 columns, i'm confused about the data type of round=='...i wondered if it was cstring or text or numeric
here's my code :

tournament_id int,
    player_id int,
    PRIMARY KEY (tournament_id,player_id) REFERENCES tournament(id),player(id),
    round  ???

and the request is
The result round of a player at a tournament can be one of these values: ‘Won’, ‘Final’, ‘Semi’, ‘Quarter’, ‘4’, ‘3’, ‘2’ and ‘1 round’. Except for ‘Won’, the value denotes in which round of the tournament the player lost.

Re: Data Type for this column in SQL 80 80

I'd use a linked table so you can use an id, but also show the string.

Re: Data Type for this column in SQL 80 80

Hi Ken,

You can maintain separate master table to store the different types of round data that you want


Round_id integer primary key,
Round varchar(100)

Then reference the Round column in result table with Round_id of type integer.

Hope this will solve your problem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.