DECLARE @SeiyuuNames TABLE
(
SeiyuuNamesID INT,
SeiyuuNames VARCHAR (100)
)
INSERT INTO @SeiyuuNames
(SeiyuuNamesID, SeiyuuNames)
VALUES
(1, 'Hirakawa Daisuke'),
(2, 'Yasumoto Hiroki'),
(3, 'Tachibana Shinnosuke'),
(4, 'Yonaga Tsubasa')
Query:
SELECT * FROM @SeiyuuNamesResult:
SELECT
SeiyuuNames AS Longest_Name
FROM
@SeiyuuNames
WHERE
LEN(SeiyuuNames) =
(
SELECT
MAX(LEN(SeiyuuNames))
FROM
@SeiyuuNames
)
No comments:
Post a Comment