Retrieving All Rows (Node-SQLite)


Retrieving All Rows

I have a problem with third question (3.):

Replace your query with a new query that will only SELECT the rows in the TemperatureData table with the year 1970.

I used:

db.all("SELECT * FROM TemperatureData WHERE year='1970'",
      (error, rows) =>{

But site told me that this is wrong code.


1970 can just be an integer value, it doesn’t have to be a string

some spacing around the equal sign of where clause seems required:

WHERE year = 1970