oracle视图转换成表,SQL 如何将视图转换成表

oracle :

create table tablename as select * from viewname

sqlserver:

select * into tablename from viewname

ps:

create view viewName AS select * from table (创建视图)

create view TaskRecordView as

SELECT TaskId as taskId ,p2.UserId as buyerId,OrderNo as orderNo,backCase as bankCase,RefusedReason as refusedReason,p2.CreatedDate as createDate,Status as status,StoreName as storeName,ProductName as productName,ProductURL as productURL,ProductImage as ProductImage,TaskType as taskType,TaskNum as taskNum ,u.Name as name ,u.UserName as userName,WxAccount as wxAccount FROM

(SELECT * from TaskProgressDetails as p where state=1) as p2

INNER JOIN TaskBaseInfo as b ON p2.TaskId=b.Id

INNER JOIN [User] as u ON u.id=p2.UserId;

(内联查询)

http://zhidao.baidu.com/link?url=uZSNnsza82gFxpPT6uJhTb85zI96lIRQiQrCnBygSmJAY_AMwpJUSUnPjjB26hW569Ppz7Ce8ujNZiPMNiH5za

  • 0
    点赞
  • 0
    收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:1024 设计师:我叫白小胖 返回首页
评论
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值