sqlÓïÑÔ
select *from customers
select *from orders
select customers.cust_id, orders.order_num from customers inner join orders on customers.cust_id=orders.cust_id
select customers.cust_id, orders.order_num from customers left outer join orders on customers.cust_id=orders.cust_id
ʹÓôø¾Û¼¯º¯ÊýµÄÁ¬½Ó
select customers.cust_id,count(orders.order_num) as num_ord from customers inner join orders on customers.cust_id = orders.cust_id group by customers.cust_id
select customers.cust_id,count(orders.order_num) as num_ord from customers left outer join orders on customers.cust_id = orders.cust_id group by customers.cust_id
Ïà¹ØÎĵµ£º
¼Æ»®ÓÚ2008ÄêµÚÒ»¼¾¶È·¢²¼µÄSQL Server 2008²»½ö¶ÔÔÓÐÐÔÄܽøÐÐÁ˸Ľø£¬»¹Ìí¼ÓÁËÐí¶àÐÂÌØÐÔ£¬±ÈÈçÐÂÌíÁËÊý¾Ý¼¯³É¹¦ÄÜ£¬¸Ä½øÁË·ÖÎö·þÎñ£¬±¨¸æ·þÎñ£¬ÒÔ¼°Office¼¯³ÉµÈµÈ¡£
¡¡¡¡SQL Server¼¯³É·þÎñ
¡¡¡¡SSIS(SQL Server¼¯³É·þÎñ)ÊÇÒ»¸öǶÈëʽӦÓóÌÐò£¬ÓÃÓÚ¿ª·¢ºÍÖ´ÐÐETL(½âѹËõ¡¢×ª»»ºÍ¼ÓÔØ)°ü¡£SSIS´úÌæÁËSQL 2000µÄDTS¡£Õ ......
1¡¢½¨Á¢Ò»¸öjdbc.jsp Îļþ£º
2¡¢½«ÏÂÃæÏàÓ¦µÄ´úÂ븴ÖƵ½jdbc.jspÖÐ
3¡¢±àдҪÁ¬½Óµ½Êý¾Ý¿âµÄjspÎļþʱ£¬Ö»Ð轫jdbc.jspÎļþ°üº¬µ½¸ÃjspÎļþÖоÍÐÐÁË
·½·¨£ºÌí¼Ó<%@ include file="jdbc.jsp">µ½jspÎļþÖм´¿É
//sql server2005:
<%@ page language="java" import ="java.util.*"%>
<%
& ......
1:replace º¯Êý
µÚÒ»¸ö²ÎÊýÄãµÄ×Ö·û´®£¬µÚ¶þ¸ö²ÎÊýÄãÏëÌæ»»µÄ²¿·Ö£¬µÚÈý¸ö²ÎÊýÄãÒªÌæ»»³Éʲô
select replace('lihan','a','b')
-----------------------------
lihbn
£¨ËùÓ°ÏìµÄÐÐÊýΪ 1 ÐУ©
============================================== ......
ASP.NETÈçºÎÁ¬½ÓAccess»òSQL ServerÊý¾Ý¿â
Ê×ÏÈ¿´Ò»¸öÀý×Ó´úÂëƬ¶Ï:
³ÌÐò´úÂë:
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+ ......
Case¾ßÓÐÁ½ÖÖ¸ñʽ¡£¼òµ¥Caseº¯ÊýºÍCaseËÑË÷º¯Êý¡£
--¼òµ¥Caseº¯Êý
CASE sex
WHEN '1' THEN 'ÄÐ'
WHEN '2' THEN 'Å®'
ELSE 'ÆäËû' END
--CaseËÑË÷º¯Êý
CASE WHEN sex = '1' THEN 'ÄÐ'
  ......