[原创]oracle和SQLSERVER的多字段赋值
create table tablea(id int,ip varchar(15),apps varchar(10))insert into tablea select 23,'127.0.0.1','aaa'godeclare @Variable1 varchar(15),@Variable2 varchar(10)select @Variable1 = ip ,@Variable2 = apps from tablea where id = 23select @Variable1,@Variable2godrop table tablea SQLSERVER的多字值赋值方式如上所示,直接SELECT就可以 但在ORACLE的PLSQL下 select into 只能赋值单个变量,不能进行多变量同时赋值。 如 : select count(*) into nb_count from t_khz where fzbh=V_fzbh; 多变量赋值一般