On Tue, 15 Feb 2011 03:30:23 -0800 (PST), venkat easwar <hareas...@yahoo.com> wrote:
>Oh... Thanks Kennedy. Between any options on run time to enable the feature? No, it's a compile-time option, compiling without SQLITE_ENABLE_UPDATE_DELETE_LIMIT makes SQLite a bit lighter. Without that feature, if you want to update one row, use it's unique key in a WHERE clause. In your schema, it would make sense to create the table like this: create table check_update( a INTEGER PRIMARY KEY, b TEXT, c INTEGER ); The INSERTs will stay the same, and the update statement becomes something like: UPDATE check_update SET b='venkat n' WHERE a = ( SELECT min(a) FROM check_update WHERE b='venkat' ); Hpoe this helps. >________________________________ >From: Dan Kennedy <danielk1...@gmail.com> >To: sqlite-users@sqlite.org >Sent: Tue, February 15, 2011 4:48:24 PM >Subject: Re: [sqlite] UPDATE WITH ORDER BY LIMIT ERROR > >On 02/15/2011 06:04 PM, venkat easwar wrote: >> Forgot to mention what error I am getting. >> >> near "order": syntax error >> near "limit": syntax error - if i remove the order by clause > >See under the "Optional LIMIT and ORDER BY Clauses" heading >on this page: > > http://www.sqlite.org/lang_update.html > >You need to build SQLite with SQLITE_ENABLE_UPDATE_DELETE_LIMIT >defined. > > http://www.sqlite.org/compile.html#enable_update_delete_limit -- ( Kees Nuyt ) c[_] _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users