Additional idea:
Leave the select empty and put a null condition on an index etc (a column that must contain values), then you get an empty table with the column names, that you can use to fill in your JSL Query Object with the column names ...
Names Default To Here( 1 );
New SQL Query(
Version( 130 ),
Connection( "JMP" ),
JMP Tables( ["Big Class" => "$SAMPLE_DATA\Big Class.jmp"] ),
QueryName( "SQLQuery1" ),
Select,
From( Table( "Big Class", Alias( "t1" ) ) ),
Where( Is Null( Column( "name", "t1" ), UI( NullTest( Base( "Categorical" ) ) ) ) )
) << Run;
Georg