专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Sybase

Sybase isql有关问题

发布时间:2010-05-20 14:01:29 文章来源:www.iduyao.cn 采编人员:星星草
Sybase isql问题
我的输入的sql文件内容
$more 1.sql
create table test1(c1 numeric(1));
go;
commit;
go;
isql命令如下:
isql -S** -U** -P** -i 1.sql -o 1.log
这样执行的话,会生成一个log文件,但是test1表并没有创建成功.

我这样执行的话又可以成功
isql -S** -U** -P** -i
1> create table test1(c1 numeric(1));
2> go
1> commit;
2> go
1> quite
我刚接触sybase,请各位高手不吝赐教,多谢!

------解决方案--------------------
分号和go都是语句结束符号。不要弄错了。 

在sybase ase 里面create table test1(c1 numeric(1)) 
go
这个创建表的语句好像是不返回任何结果信息的。

我还没有在iq里面试验。 

在ase里面可以这么写:
if exists(select 1 from sysobjects where type ='U' and name = 'test' )
print "test has been created!"
else
print "test not exists!"



友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: