登录注册
上海交通大学论坛 > 数据库 > 浏览当前帖子 手机版 关闭左侧栏
ReSQL*PLUS @ @@用法
返回本版】  【发表帖子】  【回复帖子 浏览量  4001      回帖数 1
菜鸟半个    等级  

楼主 发表于  2007/3/23 2:08:38    编 辑   


如果我没有理解错的话是不是他们的区别在于搜索文件的目录 

 
@ ("at" sign) 
@{uri|file_name[.ext] } [arg...]  

Runs the SQL*Plus statements in the specified command file. The command file  
can be called from the local file system or from a web server. uri is only  
supported on Windows platforms in this release. Only the uri form is  
supported in iSQL*Plus.  

@@ (double "at" sign) 
@@file_name[.ext]  

Runs a command file. This command is identical to the @ ("at" sign)  
command. It is useful for running nested command files because it has the  
additional functionality of looking for the specified command file in the  
same path or uri as the command file from which it was called. uri is only  
supported on Windows platforms in this release. Only the uri form is  
supported in iSQL*Plus.  

Suppose that you have the following command file named PRINTRPT 


SELECT DEPARTMENT_ID, CITY FROM EMP_DETAILS_VIEW WHERE SALARY>12000; 
@EMPRPT 
@@ WKRPT 

When you START PRINTRPT and it reaches the @ command, it looks for the  
command file named EMPRPT in the current working directory and runs it.  
When PRINTRPT reaches the @@ command, it looks for the command file named  
WKRPT in the same path as PRINTRPT and runs it.  

Suppose that the same command file PRINTRPT was located on a web server and  
you ran it with START HTTP://HOST.DOMAIN/PRINTRPT. When it reaches the @  
command, it looks for the command file named EMPRPT in the current local  
working directory and runs it. When PRINTRPT reaches the @@ command, it  
looks for the command file named WKRPT in the same uri as PRINTRPT and runs  
it.  






  
teaman    等级  

2 楼 发表于  2016/3/2 3:02:44    编 辑   


看看@@@的效果是什么. 
SQL> @@@test 
SP2-0310无法打开文件"hlssid0test.sql" 
SQL> @@@@test 
SP2-0310无法打开文件"hlssid0hlssid0test.sql" 
:) 
1
表情
所有内容均为会员自愿发表,并不代表本站立场.
论坛帮助 会员认证删帖申请 联系我们