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.
SET nocount ON
4.
SELECT * INTO target_table FROM source_table;
INSERT INTO target_table(column1,column2) SELECT column1,5 FROM source_table;