List:General Discussion« Previous MessageNext Message »
From:vishesh kumar Date:July 10 2011 9:53am
Subject:Re: Mysql Trigger
View as plain text  
Thanks for reply , but i want to do only for certain record that i will put
using IF

On Sun, Jul 10, 2011 at 2:42 PM, Reindl Harald <h.reindl@stripped>wrote:

>
>
> Am 10.07.2011 10:32, schrieb vishesh kumar:
> > Hi Members
> >
> > Whats wrong i am doing in following create trigger statement
> >
> >   Create trigger test before insert on user
> >    for each row
> >    begin
> >       set New.host=upper(new.host)
> >    end
> >
> > Above statement giving error check sql syntax , please  guide me. I want
> to
> > put host field value in uppercase in user table
>
> a) why "before insert"
> b) why "for each row" when a single update can do this
> c) update table_name set fieldname=upper(fieldname)
>
>


-- 
http://linuxmantra.com

Thread
Mysql Triggervishesh kumar10 Jul
  • Re: Mysql TriggerReindl Harald10 Jul
    • Re: Mysql Triggervishesh kumar10 Jul
  • Re: Mysql TriggerPeter Brawley10 Jul