用C#实现SQL查询
用C#将这段SQL查询实现SELECTR.Name,C.name,st_Length(st_Intersection(R.Shape,C.Shape))AS"Length...
用C#将这段SQL查询实现
SELECT R.Name,C.name,st_Length(st_Intersection(R.Shape,C.Shape))
AS"Length"
FROM River3 R,Sheng C
WHERE st_Crosses(R.Shape,C.Shape)=True 展开
SELECT R.Name,C.name,st_Length(st_Intersection(R.Shape,C.Shape))
AS"Length"
FROM River3 R,Sheng C
WHERE st_Crosses(R.Shape,C.Shape)=True 展开
1个回答
展开全部
using(sqlconnection conn=new sqlconnection("连接字符串")){
using(sqlcommand cmd=new conn.createcommand()){
conn.open();
cmd.commandtext="sql语句";
cmd.commandtype=commandtype.text
sqldatareader reader= cmd.executereader();//执行sql命令
}
}
using(sqlcommand cmd=new conn.createcommand()){
conn.open();
cmd.commandtext="sql语句";
cmd.commandtype=commandtype.text
sqldatareader reader= cmd.executereader();//执行sql命令
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |