简体   繁体   English

42601:令牌*对于IBM i(AS400)不是有效的DB2

[英]42601:Token * was not valid DB2 for IBM i (AS400)

I would like to insert in a DB2 AS 400 database. 我想插入一个DB2 AS 400数据库。 I would like to insert a string that includes an asterisk. 我想插入一个包含星号的字符串。 I receive the error 我收到错误

42601:Token * was not valid (list of valid tokens) SQL code 104

Searching in the Internet generally, and stackoverflow specifically has not revealed relevant information. 一般在Internet上搜索,而stackoverflow并未透露相关信息。

String literals in SQL are denoted by single quotes ( ' ). SQL中的字符串文字用单引号( ' )表示。 It seems your statement had omitted them, and hence the error. 您的陈述似乎已省略它们,因此出现了错误。 Applying them to your value should do the trick: 将它们应用于您的价值应该可以解决问题:

INSERT INTO tableName (columnName) VALUES ('*text') 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM