【问题标题】:What is the Difference between global temp table and local temp table in SYBASE ASE 15SYBASE ASE 15 中的全局临时表和本地临时表有什么区别
【发布时间】:2015-07-03 04:53:26
【问题描述】:

全局临时表和本地临时表SYBASE ASE 15有什么区别?

当使用不同的线程/连接/数据库方法调用从 java 多次访问时,两者的行为如何?

全局临时表的名称以## 开头,本地临时表的名称以# 开头。

没有找到任何好的学习资源。

谁能澄清一下?

【问题讨论】:

    标签: global-temp-tables sybase-ase15


    【解决方案1】:

    根据我对 Sybase ASE 中临时表的回忆,有两种类型,但我不记得它们被称为“全局”和“本地”。

    特定于会话的临时表是用“哈希”或“井号”、# 命名的临时表。比如#foo。

    create table #foo (
        id    int  not null,
        value varchar(255) not null)
    go
    

    永久临时表已创建并保留在临时数据库中,直到它们被删除或 Sybase ASE 实例重新启动。这些表存储在模型数据库中,它们也会在重新启动时创建,但它们也会出现在任何新创建的数据库中。

    永久临时表的命名类似于任何其他用户定义数据库中的表。它们没有前导 #。

    use tempdb
    go
    create table foo (
        id    int  not null,
        value varchar(255) not null)
    go
    

    更多文档可以在这里找到:

    http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc32300.1600/doc/html/san1390612248829.html

    【讨论】:

    猜你喜欢
    • 2010-09-29
    • 2021-03-29
    • 2017-06-27
    • 1970-01-01
    • 2020-07-23
    • 1970-01-01
    • 2020-10-30
    • 1970-01-01
    • 2019-04-14
    相关资源
    最近更新 更多