常用SQL语句集合

1.根据一个表创建另外一个表

SqlServer: 

select * into PHB_TEMP from phb

Oracle:

create table PHB_TEMP  as select * from phb

2.拼接SQL中float类型需不需要加''

加不加都可以执行(SqlServer),但是最好加,因为如果插入的值为空的时候,就会出现,,之间什么东西都没有,这种sql是会报错的

varchar,char,nvarchar,nchar,text,ntext,datetime都需要加单引号
int,numeric,bit不需要加

原文地址:https://www.cnblogs.com/yz1311/p/5359655.html