从数据库中获取Null和非null值 [英] Getting Null and non-null values from database

查看:140
本文介绍了从数据库中获取Null和非null值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个场景,用户注册并填写他的基本个人资料字段,即电子邮件,用户名,密码,电话和cnin no。成功注册后很晚。我必须显示该用户的整页以进一步更新他的个人资料,其中包括他的DOB,地址,派对所有权,兴趣,电影,其他内容。



我如何做出一个查询,返回针对该用户ID的哪个字段的值不是。



我有两个相关的表有一个 - 一个 - 关系

TblAppUser TblUserDetails



TblAppuser 存储id passwrd用户名电子邮件等基本信息和

tbluserdetials 还有其他字段,如dob,兴趣,电影等。

I have a scenario where user signup and fill his basic profile field i.e email,username, password, phone and cnin no. Late after successful signup . i have to show a full page for that user to update his Profile further, that includes his DOB, addresses, party belonging, interest, movies, an other stuff.

How would i have to made a query that return which field against that user id has a value of which is not.

I have two related table having One-one-relationship
TblAppUser and TblUserDetails.

TblAppuser stores basic information such id passwrd username email etc and
tbluserdetials has other fields such as dob, interest, movies etc.

推荐答案

您好,

您可以在MS SQL中使用ISNULL函数来识别该列是否具有空值或非空值。

如果有,请告诉我满足您的需求提供原始数据和预期结果的一些细节。



谢谢,

Hitesh Varde
Hi,
You can use ISNULL function in MS SQL to identify whether the column has null value or not null value.
Let me know if it satisfy your need else give some detail about raw data and expected result.

Thanks,
Hitesh Varde


这篇关于从数据库中获取Null和非null值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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