0

When creating a table in mysql, if I declare multiple columns to have the same type, is it possible to declare it without repeatedly mentioning the type?

For example:

create table courseMarks ( mark1 integer, mark2 integer, mark3 integer, mark4 integer, mark5 integer, mark6 integer);

I googled "mysql create table several columns same type" but can't find a solution, or I miss something.

Thanks.

Tim
  • 1
  • 141
  • 372
  • 590
  • If you have a long series of columns of same data type and similar names like your example, it's likely a case of [Repeating Groups](https://stackoverflow.com/questions/23194292/normalization-what-does-repeating-groups-mean) — violating 1st normal form. – Bill Karwin Dec 21 '17 at 17:15

1 Answers1

1

No it's not possible the data type is not a facultative argument as you can see it in the Mysql Documentation

The facultative arguments are in [... ]

Daniel E.
  • 2,440
  • 1
  • 14
  • 24