Hello I am a programmer using SQLite3 to create a database for an application. I have been running into some problems with my SQL queries which I dont think are correct. Can you check them & correct them where relevant?
Right now only one table exists, its layout is like so: [quote] Table = element 2 columns = property TEXT PRIMARY KEY, value TEXT ie, CREATE TABLE element(property TEXT PRIMARY KEY, value TEXT)[/quote] Are these queries correct? Check if property already exists in table: [code] SELECT property FROM element WHERE property == 'color';[/code] If I get NULL back that will mean that this property does not exist in the table? Is this correct? Change the value in a row where property equals color: [code] DELETE value FROM element WHERE property == 'color'; INSERT INTO element(value) VALUE('orange') WHERE property == 'color'; commit;[/code] Also I want to create a new TABLE with the name '#element' or '.element' but I always get an error because of the '#' & '.' characters. Is it possible to create a table with a '#' or '.' character in its name? -- View this message in context: http://old.nabble.com/How-to-fix-Syntax---Check-exists-tp28274195p28274195.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users