string upString="UPDATE MonitorSeg SET aCol=@aCol, bCol=@bCol,cCol=@cCol WHERE date = @date and time=@time";string inString=@"insert into MonitorSeg(aCol,bCol,cCol,date,time) values(@aCol,@bCol,@cCol,@date,@time)";两条sql语句,为什么一条在语句前加了@符号,一个没加,我看很多数上sql语句都有这两种写法,到底以哪种写法为主了?还有@在这表示什么意思?
@"c:\windows\system32\123.dll"
"c:\\windows\\system32\\123.dll"
等着学习
*
from
xxx"
举个例子:@"c:\Docs\Source\a.txt" 和 "c:\\Docs\\Source\\a.txt"是等同的。加@在写路径的时候比较方便,不过一些特殊字符如换行等也无法识别了,在用转移字符的时候还要老老实实的写。
string str1 = "abc\n"; // 这里\n当然默认转为换行符
string str2 = @"abc\n" // 这里\n不自动转为换行符号,相当于 str2 = "abc\\n"