简体   繁体   English

SQL Server 中的等价物是什么?

[英]What is the equivalent of   in SQL Server?

SPACE() function of SQL Server works in SQL but when select query comes to browser white space is collapsed. SPACE() function of SQL Server works in SQL but when select query comes to browser white space is collapsed. What is the correct representation for    的正确表示是什么? in SQL so that white space is kept in the browser?在 SQL 中,以便在浏览器中保留空白?

Usually you do not want to do that kind of manipulation in the SQL query ;通常你不想在 SQL 查询中做那种操作; it is cleaner to let your web application format the data properly before outputing it to the user (the real solution for that dependends on the software language you use in your web app).在将数据输出给用户之前让您的网络应用程序正确格式化数据会更干净(真正的解决方案取决于您在网络应用程序中使用的软件语言)。

But of you really want to do that in SQL, just replace the SPACE() function in your sql query with ' '但是,如果您真的想在 SQL 中执行此操作,只需将 sql 查询中的SPACE()函数替换为' ' , and it should appear just like that in the query result... ,它应该像查询结果中那样出现......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM