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.
sybase sql クエリがあり、その結果として整数が返されます。
誰でもこのクエリのロジックを説明できますか?
select b.length from sysobjects a, syscolumns b where a.name = 'StuComm' and a.id = b.id and b.name = 'StuCD'
あなたがここで何を求めているのかちょっとわかりませんが、私はそれを突き刺します.
StuCDこのクエリは、テーブル内の列の長さを見つけていStuCommます。sysobjectsから情報を引き出していますsyscolumns
StuCD
StuComm
sysobjects
syscolumns
lengthtype の syscolumns の列でintあるため、整数の結果が得られます。長さはデータ型が宣言されている値であるため、 として宣言された列varchar(255)の長さは 255 になります。
length
int
varchar(255)