MySQL的where子語句in,between的寫法

1.expr1 between expr2 and expr3:表示expr1的值在expr2和expr3之間 
例子:$delete = "delete from user where id between 20 and 25";let

2.expr1 in(expr2,expr3,expr4,…)表示expr1等於後面括號裏面的任意一個表達式的值 
例子:$delete = "delete from user where id in(20,25,30,28)";delete

相關文章
相關標籤/搜索