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.
从数据库中检索内容时,仅第一列的第一个字母显示为
SELECT LEFT(`name`, 1) AS first_letter FROM register
我想从数据库中检索多于一列。到底有没有..??
只需在您的选择语句中以逗号分隔列出它们
SELECT LEFT(`name`, 1) AS first_letter_name, LEFT(`second_col`, 1) AS first_col2, LEFT(third_col, 1) AS first_letter_col3, FROM register