On Fri, Jul 15, 2011 at 6:19 PM, san long <[email protected]> wrote: > Dear all, > I have an idea related to the safety of the records in a table: if it is > possible to hide some records in a table so the upper user application could > not see them? > For example: > table food has content: > 1, "food A" > 2, "food B" > I want to hide the record whose rowid is 2, so: > sqlite> SELECT * from food; > -------------------------------------------------- > 1, "food A" > --------------------------------------------------- > > Is there any good solution to satisfy my requirement?
Some queries may depend on the hidden items. For example, table food has column price. select sum(price) from food; -> Is the hidden food's price included? Other queries may depend on entries not being present. delete from customers where "customer has not ordered hidden foods" -> Is the customer record gone? Can you look further up in your requirements? A different level of the application may find it easier (Check before "displaying" any column value whether user has read-access) Stephan > Thanks in advance. > long san > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Stephan Wehner -> http://stephan.sugarmotor.org (blog and homepage) -> http://loggingit.com -> http://www.thrackle.org -> http://www.buckmaster.ca -> http://www.trafficlife.com -> http://stephansmap.org -- http://blog.stephansmap.org -> http://twitter.com/stephanwehner / @stephanwehner _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

