MySQL

/** 查看表字段注释 **/
SELECT t.* FROM Information_schema.COLUMNS t WHERE table_Name = 't_ms_user';


SELECT 
  u.id,
  u.account,
  u.PASSWORD,
  u.createTime,
  u.lastLoginTime,
  u.updatePwdTime,
  u.email,
  u.telephone,
  u.STATUS,
  u.description,
  r.id AS roleId,
  r.roleName 
FROM
  T_MS_USER u 
  INNER JOIN
  T_MS_USERROLE ur 
  ON u.id = ur.userid 
  INNER JOIN
  T_MS_ROLE r 
  ON ur.roleid = r.id 
WHERE 1 = 1;

你可能感兴趣的:(mysql)