Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2055723
  • 博文数量: 454
  • 博客积分: 10921
  • 博客等级: 上将
  • 技术积分: 5396
  • 用 户 组: 普通用户
  • 注册时间: 2006-06-15 15:20
个人简介

伪IT男

文章分类

全部博文(454)

文章存档

2016年(2)

2013年(6)

2012年(17)

2011年(29)

2010年(24)

2009年(54)

2008年(53)

2007年(202)

2006年(67)

分类: 数据库开发技术

2006-08-29 19:57:48

下午在写一段VB ADO调用数据库的代码,一条SQL语句总是说"

WHERE 子句中的语法错误。(错误 3145)

"  看了看MSDN,解释是:

输入的含有无效的 WHERE 子句。

可能的原因:

  • 或名称拼写错误或者没有写。
  • 标点符号无效。

这才想起我的SQL中有个字段的名字是 Group ,本来是用来表示分组的.可能被SQL保留了,搜索了一下SQL的保留字.果然如此.立此存照.

 

sql中的保留字

action  add  aggregate  all  
alter  after  and  as  
asc  avg  avg_row_length  auto_increment  
between  bigint  bit  binary  
blob  bool  both  by  
cascade  case  char  character  
change  check  checksum  column  
columns  comment  constraint  create  
cross  current_date  current_time  current_timestamp  
data  database  databases  date  
datetime  day  day_hour  day_minute  
day_second  dayofmonth  dayofweek  dayofyear  
dec  decimal  default  delayed  
delay_key_write  delete  desc  describe  
distinct  distinctrow  double  drop  
end  else  escape  escaped  
enclosed  enum  explain  exists  
fields  file  first  float  
float4  float8  flush  foreign  
from  for  full  function  
global  grant  grants  group  
having  heap  high_priority  hour  
hour_minute  hour_second  hosts  identified  
ignore  in  index  infile  
inner  insert  insert_id  int  
integer  interval  int1  int2  
int3  int4  int8  into  
if  is  isam  join  
key  keys  kill  last_insert_id  
leading  left  length  like  
lines  limit  load  local  
lock  logs  long  longblob  
longtext  low_priority  max  max_rows  
match  mediumblob  mediumtext  mediumint  
middleint  min_rows  minute  minute_second  
modify  month  monthname  myisam  
natural  numeric  no  not  
null  on  optimize  option  
optionally  or  order  outer  
outfile  pack_keys  partial  password  
precision  primary  procedure  process  
processlist  privileges  read  real  
references  reload  regexp  rename  
replace  restrict  returns  revoke  
rlike  row  rows  second  
select  set  show  shutdown  
smallint  soname  sql_big_tables  sql_big_selects  
sql_low_priority_updates  sql_log_off  sql_log_update  sql_select_limit  
sql_small_result  sql_big_result  sql_warnings  straight_join  
starting  status  string  table  
tables  temporary  terminated  text  
then  time  timestamp  tinyblob  
tinytext  tinyint  trailing  to  
type  use  using  unique  
unlock  unsigned  update  usage  
values  varchar  variables  varying  
varbinary  with  write  when  
where  year  year_month  zerofill  

阅读(2968) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~