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.
要素を列 (varchar) に追加すると、余分なスペースができます。たとえば、次のテーブルStudentがname varchar(10)あり、次のようにします。
Student
name varchar(10)
INSERT INTO Student (id,name) VALUES (1,'student') SELECT name FROM Student WHERE id=1
私は得るstudent[space][space][space]。
student[space][space][space]
タイプを に変更せずに修正するにはどうすればよいtextですか?
text
ほとんどのデータベースは、クエリの結果を固定の表形式で出力します。文字列の実際の開始位置と終了位置を確認するには、別の文字を連結する必要があります。データベースに応じて、次の 3 つの方法があります。
select '"'+name+'"' select '"'||name||'"' select concat('"', name, '"')
おそらく、スペースはクエリ ツールのアーティファクトであることがわかります。