sql 中@是什么意思
1 回答
一只斗牛犬
TA贡献1784条经验 获得超2个赞
对于 SQL Server 来说 @ 用于标示变量名字。
例如:
1>
2>
3> DECLARE
3 @testvalue AS VARCHAR(20);
5> BEGIN
3 SET @testvalue = ‘First Test!’;
3 PRINT( @testvalue );
8> END;
9> go
First Test!
对于 Oracle , @ 可能是标示 链接数据库
例如:
SQL> CREATE DATABASE LINK mydblink
2 CONNECT TO test IDENTIFIED BY test123
3 USING '(DESCRIPTION =
4 (ADDRESS_LIST =
5 (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.210)(PORT = 1521)))
6 (CONNECT_DATA = (SERVICE_NAME = orcl)
7 )
8 )';
Database link created.
SQL> select count(1) from user_tables@mydblink;
COUNT(1)
----------
6
- 1 回答
- 0 关注
- 2064 浏览
添加回答
举报
0/150
提交
取消