下面关于SQL Server中变量的操作正确的是( )。
A: DECLARE @name varchar(8) SET @name='lkl' print '姓名是'+@name
B: DECLARE name varchar(8) SET name='lkl' print '姓名是'+name
C: print @@VERSION AS '版本', @@SERVERNAME AS '服务器'
D: SELECT @@VERSION AS '版本', @@SERVERNAME AS '服务器’
A: DECLARE @name varchar(8) SET @name='lkl' print '姓名是'+@name
B: DECLARE name varchar(8) SET name='lkl' print '姓名是'+name
C: print @@VERSION AS '版本', @@SERVERNAME AS '服务器'
D: SELECT @@VERSION AS '版本', @@SERVERNAME AS '服务器’
举一反三
- 如果name=”全国计算机等级考试二级Python”,下面输出错误的是 A: >;>;>;print(name[0],name[8],name[-1]) 全 试 B: >;>;>;print(name[:]) C: >;>;>;print(name[11:]) D: >;>;>;print(name[:11])
- Python中类的定义正确的是 A: class Phone: name = "" call(self, name) print(name, "打电话") B: class Phone: name = "" call(self, name) print(name, "打电话") C: class Phone: name = "" def call(self, name): print(name, "打电话") D: class Phone name = "" def call(self, name): print(name, "打电话")
- 如果name="全国计算机等级考试二级Python",以下选项中输出错误的是 A: >>>print(name[:])全国计算机等级考试二级Python B: >>>print(name[11:])Python C: >>>print(name[:11])全国计算机等级考试二级 D: >>>print(name[0],name[8],name[–1])全试
- 用print( )函数打印输出姓名的姓,即姓名中第一个汉字,姓名存储在name中,以下方法正确的是: A: format(name[0]) B: format(name[-1]) C: format(name[1]) D: format(name)
- 如果name=“全国计算机等级考试二级Python”,下面输出错误的是 A: >>>print(name[0].name[8],name[-1])全试 B: >>prin(name[:])全国计算机等级考试二级Python C: >>>prin(name[11:])Python D: >>>print(name[:11])全国计算机等级考试二级