CREATE TABLE table_name_40 (name VARCHAR2, spouse VARCHAR2)

Which member of house of Habsburg-Lorraine had the spouse Charles II?
SELECT name FROM table_name_40 WHERE spouse = "charles ii"
SELECT "name" FROM "table_name_40" WHERE "charles ii" = "spouse"