对于在录入数据时,需要立即响应对错的约束,应该用delphi完成。*/
create rule rule_mark
as @mark between 0 and 100
go
sp_bindrule rule_mark,"student_course.mark"
go
insert student_course values('1001','011611443',200)
/*对数据库对象的操作权限进行授权管理。不同的用户具有不同的权限*/
use Mydata
sp_addlogin "cheng","123456",Mydata,"us_english"
exec sp_adduser "cheng"
grant select on class to cheng
/*将数据库备份为操作系统下面的文件*/
sp_addumpdevice "Disk",
mylogdumpdev,
"d:\sybase\mylogdumpdev.bkp"
go
/*将教师表导出到操作系统下面的名字为teacher.out的文件中*/
bcp xsgl..teacher out teacher.out -Usa -P -c -t,-r \\r