从table_name中选择*,其中“& nbsp"之类的列 [英] select * from table_name where column like '&nbsp'
本文介绍了从table_name中选择*,其中“& nbsp"之类的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要查找包含html代码(例如'& nbsp')的记录,但是当我尝试运行select * from table_name where column like ' %'
时
我得到提示询问nbsp的值.我猜数据库认为nbsp是一个参数.我想知道s是否是转义字符,以便可以告诉数据库&".是我的查询字符串的一部分.我尝试了'\& nbsp',但是没有用.
I need to find records containing html code such as ' ' But when I try to run the select * from table_name where column like ' %'
I got prompt asking for the value of nbsp. I guess the database thinks that nbsp is a parameter. I am wondering if the is an escape character so that I can tell the database that "&" is part of my query string. I tryed '\ ' but didn't work.
我的环境是带有sqlplus客户端的Oracle 9i.
My environment is Oracle 9i with sqlplus client.
谢谢.
推荐答案
看看这个:
例如
SET ESCAPE '\'
SELECT '\&abc' FROM dual;
这篇关于从table_name中选择*,其中“& nbsp"之类的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文