Click here to Skip to main content
11,495,049 members (53,491 online)
Click here to Skip to main content

Tagged as

The Evil That is "Select *"

, 2 Aug 2011 CPOL 2.3K
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... Pin
Member 77966779-Aug-11 5:32
memberMember 77966779-Aug-11 5: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 | Terms of Use | Mobile
Web03 | 2.8.150520.1 | Last Updated 2 Aug 2011
Article Copyright 2011 by RichYards
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid