我主要用过的数据库为Oracle10g和SqlServer2008,通过实际运用和查阅资料整理如下: 主题 Oracle 10g SQLServer 2008 存储过程格式 Create Or Replace Procedure 存储过程名 (参数列表) IS Begin ---存储过程内容 End 存储过程名; Create Procedure 存储过程名 (参数列表) AS Begin --存储过程内容 End 存储过程参数 1.指定参数类型,但不指定长度; 2.在参数及类型间要加入输入输…
oracle中,如何将两个字段数据合并成一个字段显示,接下来看一下在sql server和pl/sql的区别 sql server中如何合并(用Cast()函数) --1.创建模拟的数据表--- create table GoodsCate( Mid int not null, Code ) not null, Name ) not null, ) --2.添加模拟数据-- ,','电子仪器') ,','激光仪器') ,','扫描仪器') --3.未合并的结果-- select * from G…
oracle: select * from (select rownum r,t1.* from tablename t1 where rownum <M+N ) t2 where t2.r>M; 说明:从tablename表里筛选出从M条记录开始,筛选N条记录. mysql: select * from tablename limit n,m; 说明:从tablename表筛选出,从第n条记录开始,筛选出m条记录. 备注:记录位置从0开始. sqlserver: select top n *…