SQL isset且未显示空白“单元格" [英] SQL isset and not showing blank 'cells'

查看:129
本文介绍了SQL isset且未显示空白“单元格"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用我的一个MySQL数据库表作为实际表,每一天的时间作为每一列,其中一列称为day.您猜对了,在白天是星期几,在其余单元格中是在说当时的情况.

I'm using one of my MySQL database tables as an actual table, with times of the day as each column, and one column called day. You guessed it, in day it says the day of the week, and in the rest of the cells it says what is happening at that time.

我想做的只是显示其中具有价值的单元格.就我而言,我总是要把所有的行和2列都填满.这2列分别是天"和"19:00",但是将来我可能会添加"18:00"等值.

What I want to do is only show the cells that have value in it. In my case, I'm always going to have all the rows and 2 columns full. The 2 columns are 'day' and '19:00', however in the future I might add values for '18:00' etc.

那么,如何仅选择其中包含数据的列和行?某些类型的哪里:有数据"?

So, how can I only SELECT the columns and rows which have data in them? Some type of 'WHERE: there is data'?

谢谢!

图片

推荐答案

根据我的收集,您正在沿着……的方向寻找事物

From what I gathere you are looking something along the lines of

WHERE col1 IS NOT NULL

但是,如果您可以详细说明架构,那将是有帮助的,特别是如果您可以绘制示例表.

But it would be helpful if you could elaborate more on your schema, especially if you could draw a sample table.

这篇关于SQL isset且未显示空白“单元格"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆