请问数据库 select后面可以加函数吗?

请问数据库 select后面可以加函数吗?


GCT1015
浏览 466回答 4
4回答

慕盖茨4494581

select 后面可以加函数啊,是条件的写在后面for example: select avg(chengji) from student

Qyouu

var objSelect=document.getElementById("select的id");objSelect.options.add( new Option(txt, val));

慕运维8079593

cursor xx isSELECT case a when 1 then t1.field1, t1.field2, t1.field3...t1.fieldnwhen 2 then t2.field1, t2.field2, t2.field3...t2.fieldnELSE NULL ENDFROM table1 t1, table2 t2

幕布斯6054654

如果是查询条件,可以用case when 构建,表的话好像没什么好办法。有个办法,比较麻烦,建一个临时表table3 like table1if (a=1) theninsert into table3 select * from table1;elsif (a=2) theninsert into table3 select * from table2;end if;cursor XX isselect * from table3
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

MySQL