|
Re: how to display any particular column first using select * query. [message #618377 is a reply to message #618375] |
Fri, 11 July 2014 07:07 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
jgjeetu wrote on Fri, 11 July 2014 17:19Is there any way to display any particular column first using select * query.
NO.
Quote:I do not want to mention column names in select statement as we do to change the display order of columns.
That's being too lazy and waiting for future issues...Writing "Select * from table" in a code is not a good idea.
Quote:i have have table with 50 columns & i want to display a 25th column from table in the begining .
You need to mention the 25th column name at beginning. No shortcuts.
|
|
|
Re: how to display any particular column first using select * query. [message #618380 is a reply to message #618377] |
Fri, 11 July 2014 07:19 |
|
jgjeetu
Messages: 373 Registered: July 2013 Location: www.Orafaq.com/Forum
|
Senior Member |
|
|
Quote:That's being too lazy and waiting for future issues...Writing "Select * from table" in a code is not a good idea.
@lalit ok then what can one do if there are more than 100 columns , will he go to write each and every column , don't you think it will take a lot of time , i think there must be a solution , doesn't matter it should be using select * query or typing column names only.
there can be any other method for which i am searching for.
Thanks
[Updated on: Fri, 11 July 2014 07:20] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: how to display any particular column first using select * query. [message #618568 is a reply to message #618566] |
Sun, 13 July 2014 11:39 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
jgjeetu wrote on Sun, 13 July 2014 21:08@LF , that's what i was looking for thanks
But only for a very few columns, be aware that if the column list in the beginning are too many per your preferences, then you would end up duplicating too many columns. Up to you, YOYO!
jgjeetu wrote on Sun, 13 July 2014 21:08
@lalit , i got the solution bro , i have no problem if the column get repeated again.
Ok, let me know your view when you start working for an application. For example, if you want to send a dataset to frontend application, and you keep changing the column order in display, just imagine the amount of rework you keep doing in BE as well as FE. I think it's simply unnecessary. God knows how would you handle it while returning dataset to multiple screens to a frontend.
And another point, though not much of your concern. Most of the robust applications look for reusable components, and you would never ever be a part of it with this approach.
Regards,
Lalit
|
|
|
|
Re: how to display any particular column first using select * query. [message #618575 is a reply to message #618573] |
Sun, 13 July 2014 13:52 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
No problem using tools like TOAD or PLSQL Developer as far as we know the pros and cons. The question here is not about the tools specifically. Its about to OVERCOME THE LAZINESS TO CODE. Isn't it? Thats what OP kept saying in the entire thread.
Even I use PLSQL Developer for code development and I have my own configured .uew file to take care of the indentation and formatting. I know how to use it so I have no issues using it for specific purpose.
Coming back to the question, whenever I want to look at a specific column values, all I need to do is use the tool's feature to show it in ascending/descending order column wise, I just need to click on the button and rest is taken care by the tool. I know my column name starts with some specific character, so scroll down and look at the corresponding value. And thus my work is done. So far so good, tool helped me to do all the stuff which SQL*Plus would take ages to help me. But, OP's question is to display columns in his own required order which "select *" in any tool would fail to do so. A one time activity is still understood, but modifying the column order every time to display is something which needs manual effort and no tool can ever guarantee to take care of it.
|
|
|