sql中临时表的建立

来源:百度知道 编辑:UC知道 时间:2024/09/22 07:55:11
比如select * into #temp from table
这样就直接建立了一张内容和table表一样的临时表#temp吗?不用create table
#temp了?
还有 convert(varchar(60),'') 这句大概是什么意思啊

不需要,就你写的那个就可以创建临时表了,还有convert(varchar(60),'')转化字段类型,并且控制长度.

不用
convert 函数 用来转换数据类型
例子:SELECT CONVERT (VARCHAR(5),12345)
返回:字符串 '12345'