“Sub columns” in MySQL

旧巷老猫 提交于 2020-01-17 03:34:13

问题


I have a project idea which would be much more simple if this exists; Is it possible to create sub-columns in MySQL?

This is an example of what I mean, in table form:

+--------+---------------+
|        |    Weekday    |
|  Time  +-------+-------+
|        |  1ST  |  2ND  |
+--------+-------+-------+
| 8:00   | Jim   | Bob   |
| 9:00   | Steve | Jim   |
| 10:00  | Tod   | Rick  |
+--------+-------+-------+

I have to specify a primary and a secondary point of contact for every day of the week. I figured it would be very easy to have "Primary" and "Secondary" under Sunday, Saturday, etc.

A friend of mine suggested something like this would be possible, which led me to this quest.


回答1:


First think first that all of databases goal is about storing and manipulating data, whatever the type of database. And how data to be shown to user will be done on application level. On application level, data can be shown as table, grid, chart, or whatever you want.

I think you miss conception about this goal.



来源:https://stackoverflow.com/questions/13887626/sub-columns-in-mysql

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!