使用sql語句時如果數據庫中的字段中存在關鍵字,直接書寫
select * from dm_test where from = 1;
是錯誤的。
正確的寫法是
select * from dm_test where `from` = 1;
其中的`符號不是分號,而是鍵盤左上角的和數字1相鄰的鍵在英文狀態下輸入。
使用sql語句時如果數據庫中的字段中存在關鍵字,直接書寫
select * from dm_test where from = 1;
是錯誤的。
正確的寫法是
select * from dm_test where `from` = 1;
其中的`符號不是分號,而是鍵盤左上角的和數字1相鄰的鍵在英文狀態下輸入。