MySQL Forums
Forum List  »  Newbie

Re: IS NOT NULL
Posted by: Peter Brawley
Date: March 21, 2013 11:09AM

SHOW is sometimes convenient, but it's archaic and its syntax is non-standard and arbitrary. Rather than waste time trying to divine how to make SHOW behave as if it were SELECT, consider using information_schema, eg for a table named 'tbl' in the current DB ...

select column_name
from information_schema.columns
where table_schema=database() and table_name='tbl' and column_default is NULL;

Options: ReplyQuote


Subject
Written By
Posted
March 21, 2013 09:08AM
Re: IS NOT NULL
March 21, 2013 11:09AM
March 21, 2013 11:55AM
March 21, 2013 08:54PM
March 22, 2013 10:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.