Welcome Guest, Not a member yet? Register   Sign In
select all the fields (exclude a few fields) from a table.
#4

[eluser]jedd[/eluser]
[quote author="searain" date="1268277973"]In MySQL, say if I have twenty fields (cols) in a table, I want to select 18 of these 20 fields (cols), except two fields which I don't want to select.
[/quote]

My initial responses to this question are:

Your schema is likely badly designed - twenty columns suggests (but it's not definitive) that you are a long way from 3NF.

SELECT *'s are bad, and should be avoided. If you have to type in 18 fields once into your application, this doesn't seem hugely onerous. Use the mouse if keyboard shortcuts elude you.

Okay - that second one was a bit too sarcastic. I blame the sherry. (Yes. I'm old.)


Messages In This Thread
select all the fields (exclude a few fields) from a table. - by El Forum - 03-10-2010, 04:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB