default的错误?
1:create table post
2:(id number(8) not null primary key
3:,fid char not null
4:,clicks number(5) not null default 0
5:,thread number(8) not null default 0
6:,reply timestamp not null
7:,post timestamp not null
8:,title varchar2(255 char)
9:,author varchar2(16 char)
A:,body varchar2(2000 char))
如上SQL,为何执行到4行出错,显示没找到右刮号,是不是default用法有误?
问题点数:20、回复次数:5Top
1 楼lisam(redplane)回复于 2002-06-19 16:00:09 得分 20
将default 和not null的顺序换一下就行了。Top
2 楼3yugui(亿硅)回复于 2002-06-19 16:03:11 得分 0
不是,DEFAULT没错。
create table post(id number(8) not null primary key,
fid char not null,
clicks number(5) not null default 0,
thread number(8) not null default 0,
reply timestamp not null,
post timestamp not null,
title varchar2(255 ),
author varchar2(16 ),
body varchar2(2000 ))
Top
3 楼nicholaz(九思·逢尤)回复于 2002-06-19 16:03:40 得分 0
not null 和default写反了Top
4 楼3yugui(亿硅)回复于 2002-06-19 16:03:41 得分 0
不是,DEFAULT没错。
create table post(id number(8) not null primary key,
fid char not null,
clicks number(5) not null default 0,
thread number(8) not null default 0,
reply timestamp not null,
post timestamp not null,
title varchar2(255 ),
author varchar2(16 ),
body varchar2(2000 ))
Top
5 楼nicholaz(九思·逢尤)回复于 2002-06-19 16:04:54 得分 0
not null和default写反了Top
6 楼3yugui(亿硅)回复于 2002-06-19 16:06:26 得分 0
还有,not null 和default写反了Top
7 楼xinpingf(白开心)回复于 2002-06-19 18:24:33 得分 0
varchar2后面的括号里写char做什么用?Top
相关问题
- ant编译脚本的错误"Default target 'dist' does not exists in project"
- ACCESS2000为什么 create table 表1 (字段1 single default 0) 提示default出错误
- 错误
- ','错误
- 错误???
- 错误?
- 安装完Exchange server2k后,Default POP3 Virtual Server和Default SMTP Virtual Server都是错误符号,不能启动?
- 错误 '800a03f6' 和 错误 '800a0046'
- 错误:Data source name not found and no default driver specified,但是我用的是(local)和SQLOLEDB,ODBC中已有Local Server的System
- 出现no appropriate default constructor available错误,不知是什么原因,各位大哥来看看啊!




