---
title: "exists"
author: "heyafang"
date: "2014-03-13T10:55:42Z"
tags: []
categories: ["数据库"]
slug: "exists"
draft: false
lastmod: "2014-03-13T10:55:42Z"
id: 2030352
url: "https://zenman.iteye.com/blog/2030352"
---

select * from tbInformation as i where exists(select it.id from tbInfoType as it where it.schoolID=247 and it.id = i.typeID) and scope like '%老师%' and typeID = 10017