Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

.NETѧϰÊÖ¼ÇÖ®£ºlinq to SQL(Ò»)


Ò»¸ö¼òµ¥µÄÀý×Ó£º
ÏȽ¨Ò»¸öC#Àࣺ
ÒýÓÃSystem.Data.Linq.dll³ÌÐò¼¯£¬
using System.Data.Linq.MappingºÍ
using System.Data.Linq Á½¸ö¿Õ¼ä¡£
[Table]
public class Inventory
{
   [Column]
   public string Make;
   [Column]
   public string Color;
   [Column]
   public string PetName;
  
   //Ö¸Ã÷Ö÷¼ü¡£
   [Column(IsPrimaryKey = true)]
   public int CarID;
  
   public override string ToString()
   {
       return string.Format(
        "±àºÅ={0};ÖÆÔìÉÌ={1};ÑÕÉ«={2};°®³Æ={3}",
         CarID,Make.Trim(),Color.Trim(),PetName.Trim());
   }
}
ÓëSQL(express°æ)Êý¾Ý¿â½»»¥:
class Program
{
   const string cnStr=
       @"Data Source=(local)\SQLEXPRESS;Initial Catalog=Autolot;"+
            "Integrated Security=True";
   static void Main(string[] args)
   {
       Console.WriteLine("*****LINQ to SQL ¼òµ¥Ó¦ÓÃ*****");
       //´´½¨Ò»¸öDataContext¶ÔÏó¡£
       DataContext db= new DataContext(cnStr);
       //´´½¨Ò»¸öTable<>·ºÐÍʵÀý¡£
       Table<Inventory> invTable = db.GetTable<Inventory>();
       //ÓÃÒ»¸öLINQ²éѯÏÔʾ½á¹û¡£
       foreach(var car in from c in invTable select c)
           Console.WriteLine(car.ToString());
   }
   Console.ReadLine();
}
¶ÔDataContextÀà½øÐÐÀ©Õ¹£º
class MyAutoLotDatabase:DataContext
{
   public Table<Inventory> Inventory;
   public MyAut


Ïà¹ØÎĵµ£º

SQLÊý¾Ý¿âÖÐÓÃimageÀ´´æ´¢Îļþ

SQLÊý¾Ý¿âÖÐÓÃimageÀ´´æ´¢Îļþ,µ«SQLûÓÐÌṩֱ½ÓµÄ´æÈ¡ÎļþµÄÃüÁî.
/*--bcp ʵÏÖ¶þ½øÖÆÎļþµÄµ¼Èëµ¼³ö
 Ö§³Öimage,text,ntext×ֶεĵ¼Èë/µ¼³ö
 imageÊʺÏÓÚ¶þ½øÖÆÎļþ,°üÀ¨:WordÎĵµ,ExcelÎĵµ,ͼƬ,ÒôÀÖµÈ
 text,ntextÊʺÏÓÚÎı¾Êý¾ÝÎļþ
 ×¢Òâ:µ¼Èëʱ,½«¸²¸ÇÂú×ãÌõ¼þµÄËùÓÐÐÐ
  µ¼³öʱ,½ ......

·¢±íÒ»¿îSQL×Ö·û´®µÄ¼ò·±Ì庯Êý

簡體數據庫轉·±體數據庫µÄ問題 °ÝÍÐÁË
ALTER DATABASE DatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE DatabaseName COLLATE Chinese_Taiwan_Stroke_CI_AS
ALTER DATABASE DatabaseName SET MULTI_USER WITH ROLLBACK ......

½â¾öSQL ServerÀïsp_helptextÊä³ö¸ñʽ´íÐÐÎÊÌâ

use Master 
go 
if object_id('SP_SQL') is not null 
  drop proc SP_SQL 
go 
create proc [dbo].[SP_SQL](@ObjectName sysname) 
as 
set nocount on ; 
declare @Print varchar(max) 
if exists(select 1 from syscomments  where ID=objec ......

PL/SQLʵÀý·ÖÎö

PL/SQLʵÀý·ÖÎö
µÚÎåÕÂ
1¡¢PL/SQLʵÀý·ÖÎö
1£©ÔÚ¡¾SQLPlus Worksheet¡¿ÖÐÖ±½ÓÖ´ÐÐÈçÏÂSQL´úÂëÍê³ÉÉÏÊö²Ù×÷¡£(´´½¨±í)
¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D

CREATE TABLE "SCOTT"."TESTTABLE" ("RECORDNUMBER" NUMBER(4) NOT NULL, "CURRENTDATE" DATE NOT NULL)
TABLESPACE "SYSTEM ......

oracle sqlÓï¾äÓÅ»¯»ù´¡

¾¡Á¿ÉÙÓÃIN²Ù×÷·û£¬»ù±¾ÉÏËùÓеÄIN²Ù×÷·û¶¼¿ÉÒÔÓÃEXISTS´úÌæ¡£
²»ÓÃNOT IN²Ù×÷·û£¬¿ÉÒÔÓÃNOT EXISTS»òÕßÍâÁ¬½Ó+Ìæ´ú¡£
OracleÔÚÖ´ÐÐIN×Ó²éѯʱ£¬Ê×ÏÈÖ´ÐÐ×Ó²éѯ£¬½«²éѯ½á¹û·ÅÈëÁÙʱ±íÔÙÖ´ÐÐÖ÷²éѯ¡£¶øEXISTÔòÊÇÊ×Ïȼì²éÖ÷²éѯ£¬È»ºóÔËÐÐ×Ó²éѯֱµ½ÕÒµ½µÚÒ»¸öÆ¥ÅäÏî¡£NOT EXISTS±ÈNOT INЧÂÊÉԸߡ£µ«¾ßÌåÔÚÑ¡ÔñIN»òEXIST² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ