MySQL系列-查询语句

先准备两张表: tb1 tb2 1.查询所有字段 select * from tb1; 2.查询指定的列 select id from tb1; 3.给表取别名  select id from tb1 t1; 或者 select id from tb1 as t1; 4.给列取别名 select id as ip from tb2 as t1 where t1.id=1; 在sql语句里面要t1.
相关文章
相关标签/搜索