List:General Discussion« Previous MessageNext Message »
From:Reindl Harald Date:July 10 2011 9:12am
Subject:Re: Mysql Trigger
View as plain text  

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)


Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Thread
Mysql Triggervishesh kumar10 Jul
  • Re: Mysql TriggerReindl Harald10 Jul
    • Re: Mysql Triggervishesh kumar10 Jul
  • Re: Mysql TriggerPeter Brawley10 Jul