SQL view with dynamic count of columns

后端 未结 2 1659
悲&欢浪女
悲&欢浪女 2021-01-24 03:45

I know it is impossible directly, but maybe with help of sql functions it is possible to create view with dynamic column count? What exactly I want to do is - Create view which\

2条回答
  •  甜味超标
    2021-01-24 04:04

    This is not possible in standard SQL, nor in any version of SQL that I am familiar with (SQL Server, Oracle, MySql, Access SQL). Tables, Expressions and Views in SQL have a fixed column-set, by design. I.E., it's intentionally restricted this way. AFAIK, in most versions of SQL, Stored Procedures are the only objects that can return a variable column-set.

提交回复
热议问题