列名TSQL无效.. [英] Invalid Column Name TSQL..

查看:135
本文介绍了列名TSQL无效..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用带有where子句的select语句来提取特定列。我知道这个用户名kimS在行用户名中,但我不断收到错误'列名无效'。这可能是如此简单,以至于它不好笑,但我是一个新手,这是在惹恼我,哈哈。感谢您提供的任何帮助。



  SELECT  * 
FROM 用户其中用户名= kimS

解决方案

  SELECT  *  FROM 用户 WHERE 用户名= '  kimS' 



文字字符串总是需要用单引号括起来。欢呼声。


Trying to pull a specific column, using a select statement with a where clause. I know this username kimS is in the row username, but I keep getting the error ''Invalid Column Name''. This is probably so simple that its not funny but Im a newb and this is pissing me off, lol. Thanks for any help available.

SELECT *
FROM  Users Where Username = kimS

解决方案

SELECT * FROM Users WHERE Username = 'kimS'


Literal strings always need to be enclosed in single quotes. Cheers.


这篇关于列名TSQL无效..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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