Home > Mobile >  How to drop the Rows in a sql table for a particular string value
How to drop the Rows in a sql table for a particular string value

Time:02-08

The sql query SELECT * FROM StudentRecord WHERE courseName like "SCIENCE"; gives me all the rows in the studentRecord table's column has "SCIENCE".

What is the query if I want to fetch all the rows in the table except where "SCIENCE" is there?

CodePudding user response:

SELECT * FROM StudentRecord 
WHERE courseName NOT LIKE "SCIENCE%";

you can try this way

ıf you want more info check this doc

https://www.postgresqltutorial.com/postgresql-like/

  •  Tags:  
  • Related