Sql Server – 基础

1.

floor函数,它获取提供的值并向下舍入最接近的整数。

2.

存储过程,

1
2
3
4
create procedure|proc proc_name
as
sql statements
   

Exec proc_name — to execute this procedure.

Tips: Before some non-table Create statement you’d better to use ‘go’ keyword to avoid some unexpected behavior.

You can use Alter method to change the procedure statement.

drop proc|procedure proc_name   –to delete the procedure.

 

procedure parameters:
In order to make the parameters optional you can set a default value.

3.

  1. SET nocount ON

4.

  1. SELECT * INTO target_table FROM source_table;
  2. INSERT INTO target_table(column1,column2) SELECT column1,5 FROM source_table;

发布者

690130229

coder,喜欢安静,喜欢读书,wechat: leslie-liya

发表评论