Sql server SQL Server初学者问题
我是SQL Server新手,下周有一个测试,我有一些问题 如果我想选择一列,例如包含字母n的国家名称,我是否将其写为Sql server SQL Server初学者问题,sql-server,select,Sql Server,Select,我是SQL Server新手,下周有一个测试,我有一些问题 如果我想选择一列,例如包含字母n的国家名称,我是否将其写为 select countryname from <table name> where country name like '%n%', %n', 'n%'; 选择countryname 从…起 其中,国家名称如“%n%”、%n”、“n%”; 如果我需要找到以字母c开头或以字母y结尾的列,例如国家名称,我是否将其分阶段显示为 select countryname
select countryname
from <table name>
where country name like '%n%', %n', 'n%';
选择countryname
从…起
其中,国家名称如“%n%”、%n”、“n%”;
如果我需要找到以字母c开头或以字母y结尾的列,例如国家名称,我是否将其分阶段显示为
select countryname
from <tablename>
where countryname like 'y%' and countryname like '%y'
选择countryname
从…起
其中countryname如“y%”和countryname如“%y”
任何帮助都将不胜感激!:-)
好的,如果我想选择一列,例如包含
字母n,我写的是从哪个国家选择国家名吗
名称,如“%n%”、%n”、“n%”
为此,您需要编写类似“%n%”的
如“%n”
查找以“n”结尾的任何国家/地区
如“n%”
查找任何以“n”开头的国家/地区
如果我需要找一个以字母开头的列,例如国家名称
字母c或以字母y结尾,我是否将其分阶段作为选择
countryname,其中countryname如“y%”和countryname如“%y”
为此,您需要编写类似于“c%”的countryname或类似于“%y”的countryname
我建议你读一下这篇文章