我的数据没有关系.只需要计算3个表中的各个列,并将它们作为视图显示在页面上.
到目前为止这是代码,但不起作用:
SELECT COUNT(cars) AS A,
(SELECT COUNT(boats) FROM tableBoats) AS B,
(SELECT COUNT(trees) FROM tableTrees) AS C,
FROM tableCars
Run Code Online (Sandbox Code Playgroud) 我有一个txt文件作为字符串,我需要找到两个字符和Ltrim/或Rtrim其他所有字之间的单词.它可能必须是有条件的,因为两个字符可能会根据字符串而改变.
例:
car= (data between here I want) ;
car = (data between here I want) </value>
Run Code Online (Sandbox Code Playgroud)
码:
int pos = st.LastIndexOf("car=", StringComparison.OrdinalIgnoreCase);
if (pos >= 0)
{
server = st.Substring(0, pos);..............
}
Run Code Online (Sandbox Code Playgroud) 我有两个表(Table1和Table2.)如果table1中的id exsits我想删除table2中的所有行
代码到目前为止:
DELETE a.id, a.car, a.boat
FROM Table2 a
LEFT JOIN Table1 b ON b.id = a.id
Run Code Online (Sandbox Code Playgroud)
表:
id, car, boatid, car, boat如果ID与table1中的ID相同,则删除)我有值小数,我想存储在字典中以方便访问.但是在C#中它只允许字符串和int.还有另一种方法可以达到类似的效果吗?
这是我的代码:
littledictionary.Add("price", (float)0.0);
littledictionary["price"] = (float)SQLreader["price"];
Run Code Online (Sandbox Code Playgroud)