DECLARE @sql VARCHAR(200)SET @sql='select * from m_userlogin where user_code=''ryq'''EXEC(@sql) 注意:1.在这里Exec后加括号; 2.两个单引号带替一个单引号; 相关文章: