我有一个现有的访问查询,例如名为* RunExampleQuery:
select name from table_x where date = [start];
但我似乎无法找到运行此查询的sql代码,即
sql = """SELECT * FROM *RunExampleQuery WHERE [start] = ?"""
params = (datetime.date(2016,11,25))
cursor.execute(sql,params)
提前感谢您的帮助。
答案 0 :(得分:1)
几个问题都是问题:
TouchAction circleTouch = new TouchAction(driver);
circleTouch.tap(continuebutton).perform;
字段必须存在于 RunExampleQuery 中才能在[start]
子句中使用<强> RunExampleQuery 强>
WHERE
元组参数化
select name, [start] from table_x;
列表参数化
sql = """SELECT * FROM [RunExampleQuery] WHERE [start] = ?"""
params = datetime.date(2016,11,25)
cursor.execute(sql, (params,))