左联接中的问题 [英] Problem in Left Joining

查看:83
本文介绍了左联接中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在表之间使用了左连接,我的问题是当左表在右侧找不到数据时,它显示NULL.我希望它不会显示任何内容,我的意思是NULL字不会出现,而是一个空白单元格.我的意思是看到单词NULL看起来非常丑陋.请有人帮忙.

hi i used left join between to tables n my prob is when the left table doesn''t find data in the right it shows NULL . I want that it wouldn''t show any thing i mean the NULL word will not be there rather a blank cell. I mean it looks really ugly seeing the word NULL. Somebody please help.

推荐答案

看看:
ISNULL(Transact-SQL) [ CAST或CONVERT [
Take a look at:
ISNULL (Transact-SQL)[^]

You can use this to convert the NULL to '''' - an empty string. You may need to use CAST or CONVERT[^] if the column is not a string or char type.

Best regards
Espen Harlinn


select isnull([column name],'') from [TableName]


这些值应为null(那里没有值).用于显示结果的UI控件应该对此做出明智的选择.您已将问题标记为C#–据我所知,标准控件(DataGridView或DataGrid)已经做到了.

不必担心数据库查询结果窗口中的外观,它的目的不是看起来很漂亮.
Those values should be null (there is no value there). The UI control you use to display the result should do something sensible with it. You tagged the question C# – as far as I know the standard controls (DataGridView or DataGrid) already do that.

Don''t worry about what it looks like in a database query result window, the purpose of that is not to look pretty.


这篇关于左联接中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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