Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用列名(where 子句)检索 matlab 数据库中的数据?我已经尝试过了,但它不起作用:
catgQuery = strcat('select ID from MyTable where ColumnName= ', Category); catgCurs = exec(conn,catgQuery); catgResult = fetch(catgCurs); r1 = catgResult.data
你需要在周围加上引号category
category
catgQuery = strcat('select ID from MyTable where ColumnName= ''', Category, '''');