---
title: "【转】PLSQL中的&字符处理"
author: "wangyanlong0107"
date: "2012-04-20T13:08:45Z"
tags: []
categories: ["数据库"]
slug: "plsql"
draft: false
lastmod: "2012-04-20T13:08:45Z"
id: 1491362
url: "https://bigdragon.iteye.com/blog/1491362"
---

在SQL语句中的字符串中出现了&符号，当执行的时候会被认为是参数需要传递，如update product set brand = 'D&G';

解决办法是把语句改为：update product set brand = 'D' || '&' || 'G';

或者是：update product set brand = 'D' || chr(38) || 'G';