sql中“@”是什么意思?
3个回答
展开全部
对于 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>
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
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询