我们用SQL查询数据时后,基于某些原因不想看到某字段的值,比如密码,我们可以通过创建视图,忽略某一字段的值. 同时我们也可以直接通过SQL语句来让其显示某个固定值: (1)一般查询语句: SELECT id,userName,PASSWORD FROM t_user; (2)让某字段查询结构显示为固定值: SELECT id,userName,'*****' PASSWORD FROM t_user; 或: SELECT id,userName,'*****' AS PASSWORD FROM
Dim mrc As ADODB.Recordset Private Sub cmdQuery_Click() Dim txtSQL As String Dim MsgText As String txtSQL = "select * from student_Info" Set mrc = ExecuteSQL(txtSQL, MsgText) Call viewData '调用该函数 Set txtMoney.DataSource = mrc txtMoney.DataField
1.select 表中重复的字段 from 表名 group by 表中的重复的字段 HAVING count(表中的重复的字段)>1 举例说明 : 表名 : psp_cell_model 重复的字段名:mp_no select mp_no from psp_cell_model group by mp_no HAVING count(mp_no)>1; 举例2: select * from psp_cell_model where mp_no in( select mp_no
SELECT * from t_yymp_auth_role where role_name not like '%测试%' and role_name not like '%部门%' and role_name not like '%方案%' and role_name not like '%项目%'