EXCELתÊý¾Ýµ½SQL(ÒÑÓбí½á¹¹)
insert into Country123 ([Country_Id], [Region_ID], [Country_EN_Name], [Country], [Country_ALL_ID], [Country_Order_Id]) select [Country_Id], [Region_ID], [Country_EN_Name], [Country], [Country_ALL_ID], [Country_Order_Id] from openrowset( 'Microsoft.Jet.OLEDB.4.0', 'EXCEL 5.0;HDR=YES;IMEX=1; DATABASE=C:\Documents and Settings\Administrator.SM-8K7POQCBNFWO\My Documents\Google Talk Received Files\12-24.XLS',Country)
Ïà¹ØÎĵµ£º
1. µ±Ç°ÏµÍ³ÈÕÆÚ¡¢Ê±¼ä
select getdate()
2. dateadd ÔÚÏòÖ¸¶¨ÈÕÆÚ¼ÓÉÏÒ»¶Îʱ¼äµÄ»ù´¡ÉÏ£¬·µ»ØÐ嵀 datetime Öµ
ÀýÈ磺ÏòÈÕÆÚ¼ÓÉÏ2Ìì
select dateadd(day,2,'2004-10-15') --·µ»Ø£º2004-10-17 00:00:00.000
3. datediff ·µ»Ø¿çÁ½¸öÖ¸¶¨ÈÕÆÚµÄÈÕÆÚºÍʱ¼ä ......
Linq to SQL uses a DataContext to manage it's access to the database as well as tracking changes made to entities retrieved from the database. Linq to SQL has a persistent approach to managing its 'connection' to the database via this data context and it basically assumes that you use a single Dat ......
PL/SQL DEVELOPER »ù±¾Ó÷¨Ïê½â(½¨Òéд¹ýµÚÒ»¸ö´æ´¢¹ý³ÌºóµÄ³õÊֱضÁ)
ÓùýoracleµÄ¶¼±§Ô¹£¬ÎªÁËÎȶ¨ ËüÌṩµÄͼÐλ¯²Ù×÷ ËÙ¶ÈÂýµÄÈÃÈËÉËÐÄѽ£¬p4+128MµÄ»úÆ÷Ö»ÒªÆô¶¯Ò»¸ö
oracle·þÎñ¾Í¹»ÈÃÈËÉËÐĵģ¬ÔÙÔÚdba studioÀïÃæ²Ù×÷ÕæÄÜÈÃÈ˿ޡ£
pl/sql developerÕýÊǽâ¾öÕâ¸öÎÊÌâµ ......
PL/SQL¿é
declare
begin
--SQLÓï¾ä
--Ö±½ÓдµÄSQLÓï¾ä(DML/TCL)
--¼ä½Óдexecute immediate <DDL/DCLÃüÁî×Ö·û´®>
--select Óï¾ä
<1>±ØÐë´øÓÐinto×Ó¾ä
......
±ÈÈçÔÚNorthwindÊý¾Ý¿âÖÐ
ÓÐÒ»¸ö²éѯΪ
SELECT c.CustomerId, CompanyName
from Customers c
WHERE EXISTS(
SELECT OrderID from Orders o
WHERE o.CustomerID = cu.CustomerID)
ÕâÀïÃæµÄEXISTSÊÇÈçºÎÔË×÷ÄØ£¿×Ó²éѯ·µ»ØµÄÊÇOrderId×ֶΣ¬¿ÉÊÇÍâÃæµÄ²éѯҪÕÒµÄÊÇCustomerIDºÍCompanyName×ֶΣ¬ÕâÁ½¸ö×Ö¶Î¿Ï ......