Re: Urgent -
update TABLENAME set Mark2 = Mark1 where SEM = 1
<gold.study@gmail.com> wrote in message
news:1162018244.021126.326050@m7g2000cwm.googlegro ups.com...
> Hi all,
>
> I need ur .
>
> I have data like this.
>
>
> Table name : mytable.
>
> ------------------------------------------------------------
> sno Sem mark1 mark2
> -----------------------------------------------------------
> 1 1 71 0
> 2 1 85 0
> 3 1 80 0
> 4 2 10 0
> 5 2 20 0
> 6 2 30 0
> ---------------------------------------------------------------
>
> I want an update query to update all mark2 field have the same as mark1
> field where SEM = 1
>
> that is , The output after the updation is like :
>
> ------------------------------------------------------------
> sno Sem mark1 mark2
> -----------------------------------------------------------
> 1 1 71 71
> 2 1 85 85
> 3 1 80 80
> 4 2 10 0
> 5 2 20 0
> 6 2 30 0
> ---------------------------------------------------------------
>
> Please give me the update Query.
>
>
> Thanks in Advance.
>
> with warm Regards,
> Thangaraju
>
|