一、 简单查询
简单的transact-sql查询只包括选择列表、from子句和where子句。它们分别说明所查询列、查询的表或视图、以及搜索条件等。
例如,下面的语句查询testtable表中姓名为“张三”的nickname字段和email字段。
| select nickname,email from testtable where name='张三' |
| select * from testtable |
| select nickname,email from testtable |
| select 昵称=nickname,电子邮件=email from testtable |
| select username,citytable.cityid from usertable,citytable where usertable.cityid=citytable.cityid |
| select username,citytable.cityid from usertable,citytable where usertable.cityid=citytable.cityid |
| select username,b.cityid from usertable a,citytable b where a.cityid=b.cityid |
| select a.au_fname+a.au_lname from authors a,titleauthor ta (select title_id,title from titles where ytd_sales>10000 ) as t where a.au_id=ta.au_id and ta.title_id=t.title_id |
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器