USE pubsGOSELECT length = DATALENGTH(pub_name), pub_nameFROM publishersORDER BY pub_nameGO
下面是结果集:
length pub_name ----------- ---------------------------------------- 20 Algodata Infosystems 16 Binnet & Hardley 21 Five Lakes Publishing 5 GGG&G 18 Lucerne Publishing 14 New Moon Books17 Ramona Publishers 14 Scootney Books(8 row(s) affected)