-
Why Insert and update sql has different syntax ?
Hi,
Why Insert and Update sql statements needs to be different in syntax? I really
get frustrated when I need to generate them dynamically and do the same editing
stuff differently for both. Won't it be really easy if preferably a) also
become standard with each database. This way I can build these statement
dynamically from a hash table and just plug the insert/update/where statement
as required.
Those who can affect the decision making on these, pls consider the extra
effort being put by developers across the world, each time they write these
queries.
Insert example: Insert into department (id, name) values (1, 'dept01');
update example: Update department set name='dept001' where id=1;
can't one of the option would be good:
a) Insert into department set id=1, name='dept01';
Update department set name='dept001' where id=1;
b) Insert into department (id, name) values (1, 'dept01');
Update department (name) values ('dept001') where id=1;
Thanks,
Krishna Baderia
San Onofre Nuclear Generating Station, CA
-
Re: Why Insert and update sql has different syntax ?
the syntax for INSERT and UPDATE is an ANSI standard so it is never changing
in any true RDBMS.
--
HTH,
David Satz
Principal Web Engineer
Hyperion Solutions
"Krishna" <kk@diaspark.com> wrote in message
news:3f143e72$1@tnews.web.devx.com...
>
> Hi,
>
> Why Insert and Update sql statements needs to be different in syntax? I
really
> get frustrated when I need to generate them dynamically and do the same
editing
> stuff differently for both. Won't it be really easy if preferably a) also
> become standard with each database. This way I can build these statement
> dynamically from a hash table and just plug the insert/update/where
statement
> as required.
>
> Those who can affect the decision making on these, pls consider the extra
> effort being put by developers across the world, each time they write
these
> queries.
>
> Insert example: Insert into department (id, name) values (1, 'dept01');
> update example: Update department set name='dept001' where id=1;
>
> can't one of the option would be good:
> a) Insert into department set id=1, name='dept01';
> Update department set name='dept001' where id=1;
>
> b) Insert into department (id, name) values (1, 'dept01');
> Update department (name) values ('dept001') where id=1;
>
> Thanks,
>
> Krishna Baderia
> San Onofre Nuclear Generating Station, CA
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|