zoukankan      html  css  js  c++  java
  • 将一个数据库中的表复制到另一个数据库中,只需要复制一部分内容,两个数据库在同一服务器中!

    表不存在的情况下
    select 字段1,字段2.....字段n into 数据库名..新表名 from 旧数据库名..旧表 where 条件
    
    表存在的情况下
    insert into 数据库名..新表名 select select 字段1,字段2.....字段n from 旧数据库名..旧表 where 条件
    select * into 数据库.dbo.新表名  from  数据库.dbo.要复制的表



    select * into OA5..SL_AskedForLeaveType from OA..SL_AskedForLeaveType


    从另一个数据库表提供的数据,更新当前数据库表的一列
    update VocationalGuidance2..VGS_ResumeTemplate set TemplateContent=(select TemplateContent from [VGS_ResumeTemplate])

    select * from  labsubject where ISNUMERIC (textbookid )=1

    update labsubject set textbookid=(select bookname from yq_book where id=cast(textbookid as int)) where ISNUMERIC (textbookid )=1

  • 相关阅读:
    免费下载小说
    前段博客云库网
    node发送邮件
    node 发送短信
    node生成uuid
    node 控制台颜色
    OfficeCommandbarDesigner20170202.rar
    OfficeCommandbarViewer20171005.rar
    VB.Net 正则表达式测试器
    Windows_Management_Instrumentation
  • 原文地址:https://www.cnblogs.com/slyzly/p/2769350.html
Copyright © 2011-2022 走看看