隨筆-167  評論-65  文章-0  trackbacks-0

          1,查詢table中某個字段的值不是指定的值

          String sql = "select * from students where getmoney != '0元' ";

          2,查詢table中某個字段的值不是null

          String sql = "select * from students where getmoney is not null ";

          3,查詢一個table中的字段值在另一個表中的一個字段值存在

          String sql = "select name,number,department,class,toschool from students where department = '"+department+"' and name in(select name from applys) ";

          4,mysql 單表多字段查詢

          SELECT * FROM `magazine` WHERE CONCAT(`title`,`tag`,`description`) LIKE ‘%關鍵字%

          5,sql server 單表多字段查詢

          String sql = "select * from students where name like '%"+keyword+"%' or number like '%"+keyword+"%'";

          ..........



          write by feng
          posted on 2009-06-02 17:17 fl1429 閱讀(233) 評論(0)  編輯  收藏 所屬分類: Mysql/Sqlserver/Oracle

          <2009年6月>
          31123456
          78910111213
          14151617181920
          21222324252627
          2829301234
          567891011

          常用鏈接

          留言簿(6)

          隨筆分類(173)

          隨筆檔案(165)

          Links

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          已訪問數:
          free counters
          主站蜘蛛池模板: 望都县| 常宁市| 临漳县| 师宗县| 瓮安县| 宜春市| 四平市| 绥德县| 宁夏| 壶关县| 鄱阳县| 吉隆县| 图片| 桃江县| 成都市| 西和县| 云林县| 伊金霍洛旗| 阿坝| 津南区| 呈贡县| 西乡县| 安乡县| 邵武市| 沁水县| 孟村| 沐川县| 贵溪市| 特克斯县| 黄陵县| 贺州市| 阿尔山市| 唐山市| 济阳县| 眉山市| 灵寿县| 宁都县| 兰考县| 磐石市| 阳朔县| 吕梁市|