Tom
Tom

Reputation: 2418

How do I use two sql syntax keywords

I have a sqlite database with a column named 'name'.

The name column contains 30 rows.

5 are populated with data and 25 give a null value.

I am trying to get sqlite to return only populated rows AND then order by asc.

I thought it be as easy as

SELECT * FROM students WHERE name IS NOT NULL AND ORDER BY name ASC.

But I was wrong.

Any idea's?

Thanks

Upvotes: 0

Views: 31

Answers (1)

Justin
Justin

Reputation: 6549

SELECT * FROM students WHERE name IS NOT NULL ORDER BY name ASC.

omit the AND.

Upvotes: 3

Related Questions