我正在尝试在我的sql数据库中按名称查询某行,并且它有一个&符。我试图先设置一个转义字符,然后再对“&”符号进行转义,但是由于某种原因,这是行不通的,而且我不确定我到底是什么问题。
Set escape '\'
select * from V1144engine.T_nodes where node_id in(
select node2_id from V1144engine.T_edges where node1_id in(
select node2_id from V1144engine.T_edges where node1_id in(
select node2_id from V1144engine.T_edges where node1_id =
(select node_id from V1144engine.T_nodes where node_name = 'Geometric Vectors \& Matrices')))
and edge_type_id = 1)
and node_type_id = 1
and node_id in (
select node2_id from V1144engine.T_edges where node1_id =
(select node_id from V1144engine.T_nodes where node_name = 'Algebra II')
and edge_type_id = 2);
set define off
是最简单的方法。