如何在 html 的文本中嵌入 URL?

How to embed URL inside text in html?

我在 sql 存储过程中有这个简单的代码:

Declare  @EmailBody varchar(MAX),
 @MyURL varchar(2000);
SET @MyURL ='www.google.com';

SET @EmailBody = 'Please go here: <a href="' + @MyURL + '">'; 

现在,EmailBody 包含:“请转到此处:www.google.com”。 相反,我希望 url (www.google.com) 嵌入 here 一词中。

我认为你的 html 是错误的。试试这个:

SET @EmailBody = 'Please go <a href="' + @MyURL + '">here</a>:';