关于Max()空返回 [英] Regarding Max() null returns
本文介绍了关于Max()空返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只想在数据库中为高管创建ID.
如果SQL Server返回null,如何获取Max(ID),以及如何在我的窗口中显示该第一条记录
如果Max()为null
I just want to create ID for my Executives in my database.
how do I get Max(ID) if sql server returns null and how to show that first record in my window
Is there any function in sql server to return variable as 1 if Max()were null
推荐答案
尝试此方法,
Try this,
Isnull(Max(ID),1)
这篇关于关于Max()空返回的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文