mysql 和 postgresql中将关键字作为列名时避免查询错误的方法

mysql:

select `desc` from user_info

将列名使用1左边那个键的``包起来;

postgresql:

select "desc" from user_info

 使用双引号即可;

猜你喜欢

转载自blog.csdn.net/myth_g/article/details/82417965