MySQL Using function at definition level

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

MySQL Using function at definition level

Post by dude81 »

Hi I was wondering how one can define a function at definition level. Say I have an application which needs to be in uppercase of any string by default. How to do this. Anybody has any ideas on this


Thanks
Sai Krishna
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

Can you clarify what the question is a little bit better? :?
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Post by dude81 »

I mean to say using a function at definition level.
Like I define

Code: Select all

ID int(55) default some_function_here()
The some_function_here should check every field that enters here. Exactly you define a standard format for date, is it possible to do for strings also... I hope I'm clear
Is this possible, so that whatever values that comes goes through that function
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Do it code-side.
Post Reply