zoukankan      html  css  js  c++  java
  • 临时表

    --临时表:只能在当前会话中使用。如果当前会话关闭了,那么临时表就生动消失

    --select * into newclasses from classes --生成一张新表,将classes表中的数据复制到一个新表中存储
    --truncate table classes --删除原始物理表的数据,重置标识列值
    --insert into Classes select classname from newclasses --将生成的新表的数据重新添加到原始物理表中
    --drop table newclasses --删除生成的没有用的物理表
    create table #temp
    (
    classid int,
    classname nvarchar(50)
    )
    select * into #newclasses from classes --生成临时表
    select * from #newclasses
    truncate table classes
    insert into Classes select classname from #newclasses
    use Hotel
    select * into classes from #newclasses

    create table ##tep
    (
    id int
    )
    --全局临时表:只要当前会话没有关闭,那么在其它会话中也能使用这个临时表
    select * into ##newc from classes
    select * from ##newc

    人的本事不是与生俱来的,不是你掌握了多少,而是当你面对一个未知问题的时候,你能用多少时间来掌握!
  • 相关阅读:
    podupdate时没有进度
    IOS开发
    ios事件传递
    ioshittest的用法
    Ios中时间无法响应
    OS开发(Objective-C)常用库索引
    IOS时间戳
    iOS- 详解文本属性Attributes
    IOSView显示特性设置
    Xcode的Architectures和Valid Architectures的区别,
  • 原文地址:https://www.cnblogs.com/dianshen520/p/4352032.html
Copyright © 2011-2022 走看看