Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我在 cusror.execute 的 sql 中使用 """..""" 会有区别吗?即使有任何细微的差异,请告诉
它用于将查询拆分为多行以很好地格式化它:
db.query(""" SELECT * FROM employee, department WHERE employee.DepartmentID = department.DepartmentID; """)
在字符串周围使用也"""..."""可以让您不转义"并'进入该字符串。
"""..."""
"
'
不,除了字符串可以包含换行符。