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.
相關文章
相關標籤/搜索