我想用“nowdate”字符串获得当前日期,日期格式为20100212
代码如下:
...
declare nowdate varchar(8);
...
set nowdate=convert(varchar(8),getdate(),112);//出现问题的语句
...错误如下:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'varchar,getdate(),112);
set preStr=concat(prelb,nowdate);
' at line 10
代码如下:
...
declare nowdate varchar(8);
...
set nowdate=convert(varchar(8),getdate(),112);//出现问题的语句
...错误如下:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'varchar,getdate(),112);
set preStr=concat(prelb,nowdate);
' at line 10
解决方案 »
- Can't connect to MySQL server on '183.37.81.152' (10060)
- mysql能够实现存储过程调用异地数据库吗?
- 关于游标和临时表共同使用的问题,请各位大侠指点一二
- 关于mysql插入“—”这个符号后,就报错的问题。[
- 怪事!!MYSQL的安装!
- text类型不能被索引嘛?一个MySQL初学者请各位帮忙!
- 应赋予用户什么权限,才能使该用户具有 SELECT * INTO OUTFILE的功能。
- 除了MYSQL以外还有其他免费的数据库吗?
- “qir2000”您在哪里?快跟我联系.....!(关于MySQL的C&C++接口)
- 游标是否继续问题
- Red Hat Linux下rpm安装mysql 出问题了,求高手
- mysql建表提示Can't create table...(errno: 150)
没办法呀~不会,不过现在会了