表是存在的,数据也是存在的,单条数据检索是可以检索到的,请大神解答一下小菜鸟
è¿æ¯ä¸ä¸ªå¸¦åæ°çSQLè¯å¥
è·è¸ªSQLè¯å¥ï¼SQLæç»è¢«æ§è¡çæ¶åï¼æ¯ä»ä¹æ ·å
æè å¯ä»¥ä½¿ç¨SQLäºä»¶æ¢æ¥å¨ï¼çè§è¢«æ§è¡çSQLè¯å¥æ¯ä»ä¹
è½çå°æç»è¢«æ§è¡çSQLè¯å¥ï¼å°±åºè¯¥ç¥é为ä»ä¹æ²¡æ°æ®äº
追é®å¦ä½ç¨ä¸ä¸ªSQLè¯å¥æ¥è¯¢è¡¨å
ææè®°å½ï¼
select * from [dbo].[xxx] where username=ï¼ï¼ï¼
æä¹åå¯ä»¥å®ç°å¢ï¼
ï¼ï¼ï¼åºè¯¥æä¹å
select * from [dbo].[xxx] where username=username
æè
select * from [dbo].[xxx]
select * from [dbo].[xxx] where 1=1
温馨提示:答案为网友推荐,仅供参考
第1个回答 2018-09-02
select * from [dbo].[xxx] where username=???
select * from [dbo].[xxx] where username='" & AA & "' ; '其中AA是你需要查询的变量值,例如 AA = "用户",那么执行后 select * from [dbo].[xxx] where username='用户' 。
select * from [dbo].[xxx] where username='" & AA & "' ; '其中AA是你需要查询的变量值,例如 AA = "用户",那么执行后 select * from [dbo].[xxx] where username='用户' 。