Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

Tagged as

The Evil That is "Select *"

, 2 Aug 2011
Rate this:
Please Sign up or sign in to vote.
I agree with this. However, typing all of the columns can be tedious! Now imagine you are working with a table with DOZENS of columns?! SELECT * FROM DENORMALIZEDTABLE1If you are using MS-SQL or writing a query in MS Visual Studio then there is a trick. You can: * write the select *...
I agree with this. However, typing all of the columns can be tedious! Now imagine you are working with a table with DOZENS of columns?!
SELECT * FROM DENORMALIZEDTABLE1
 
If you are using MS-SQL or writing a query in MS Visual Studio then there is a trick. You can:
* write the select * like above
* hilight the query
* right click
* and select "Design query in editor.."
* Click Ok to close the query editor
 
Poof! The SELECT * has been replaced with explicit column names! No excuses!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

RichYards

United States United States
No Biography provided

Comments and Discussions

 
GeneralWhat are you in when you're able to highlight that query and... PinmemberMember 77966779-Aug-11 4:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140814.1 | Last Updated 2 Aug 2011
Article Copyright 2011 by RichYards
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid