常用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不需要加

posted @ 2016-04-06 15:51  做一个清醒者  阅读(243)  评论(0编辑  收藏  举报