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.
私はこのようなテーブルを持っています
id name pid 101 Animal null 102 Dog 101 103 pug 102
私は動物>犬>パグが欲しい
私はあなたのRDBMSについて知らないので、このようなものがあなたのために働くと思います多分それはいくつかの変更が必要です
WITH NewAnimal AS (SELECT CAST((a.Desc + '>' + t.Name) AS VARCHAR(1000)) AS "Desc" FROM Table AS t JOIN NewAnimal AS a ON t.PID = a.id ) SELECT * FROM NewAnimal