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

ÁøÓÀ·¨³£ÓÃSQLÓï¾ä±¸Íü

--------------------------Êý¾Ý¿â²Ù×÷--------------------------  
--½¨Êý¾Ý¿â  
create database yongfa365_com  
on 
( name = yongfa365_comt,  
  filename = 'd:\yongfa365_com.mdf',  
  size = 4,  
  maxsize = 10,  
  filegrowth = 1  
)  
 
 
--ɾÊý¾Ý¿â  
drop database yongfa365_com  
 
--±¸·ÝÊý¾Ý¿â  
backup database yongfa365_com to disk='d:\yongfa365_com.bak' 
 
--ÅúÁ¿ÊÕËõËùÓÐÊý¾Ý¿â  
declare cur cursor for select name from Master..SysDatabases where name not in ('master','model','msdb','Northwind','pubs')  
declare @tb sysname   
 
open cur   
fetch next from cur into @tb   
while @@fetch_status=0   
begin   
 exec ('dump transaction ['+@tb+'] with no_log')   
 exec ('backup log ['+@tb+'] with no_log')   
 exec ('dbcc shrinkdatabase(['+@tb+'])')   
 fetch next from cur into @tb   
end   
close cur   
deallocate cur  
--------------------------Êý¾Ý¿â²Ù×÷--------------------------  
 
 
----------------------------±í²Ù×÷----------------------------  
--ɾ³ý±í  
drop table movies  
 
--ͨÓý¨±í½á¹¹  
Create Table [dbo].[±íÃû] (  
  [Id] int primary key identity(1,1),--ID£¬Ö÷¼ü£¬×Ô¶¯ºÅ  
  [txtTitle] varchar(255),--±êÌâ  
  [txtContent] varchar(MAX),--ÄÚÈÝ  
  [AddTime] datetime Default (getdate()),--Ìύʱ¼ä  
  [ModiTime] datetime Default (getdate()),--ÐÞ¸Äʱ¼ä  
  [Hits] int Default (0),--µã»÷Êý  
  [Flags] int Default (0) ,


Ïà¹ØÎĵµ£º

MySQL ×Ö·û¼¯µ¼ÖÂSQLÁ¬½ÓÖ®ºóÖÐÎÄÂÒÂëµÄÎÊÌ⣡

character-set-server = GB2312
collation-server = latin1_general_ci
MySQL×Ö·û¼¯ GBK¡¢GB2312¡¢UTF8Çø±ð ½â¾ö MYSQLÖÐÎÄÂÒÂëÎÊÌâ ÊÕ²Ø
MySQLÖÐÉæ¼°µÄ¼¸¸ö×Ö·û¼¯
character-set-server/default-character-set£º·þÎñÆ÷×Ö·û¼¯£¬Ä¬ÈÏÇé¿öÏÂËù²ÉÓõġ£
character-set-database£ºÊý¾Ý¿â×Ö·û¼¯¡£
character-set-table£ºÊ ......

JAVAÁ¬½ÓACCESS£¬SQL Server,MySQL,Oracle

import java.sql.*;
/*
* JAVAÁ¬½ÓACCESS£¬SQL Server,MySQL,OracleÊý¾Ý¿â
*
* */
public class JDBC {
  
public static void main(String[] args)throws Exception {
  
   Connection conn=null;
  
       //====Á¬½ÓACCESSÊý¾Ý¿â ......

ʹÓÃSQL²éѯ±í×Ö¶ÎÁеı¸×¢ÐÅÏ¢

ÓÃÏÂÃæµÄÊÓͼ£º
SQL> desc user_col_comments;
  Name                            Null?    Type
  ------------------------------- -------- ----
  TABLE_NAME  &nbs ......

Ϊʲôsql ÀïÒªÇóstring×Ö¶ÎÓõ¥ÒýºÅÒýÆðÀ´

select * from student where name=?;
Èç¹û²»Óõ¥ÒýºÅÒýÆðÀ´£¬ pstmt.setString(1,"xx or 1=1");¼´sqlÓ¦¸Ã¾ÍÊÇselect * from student where name=xx or 1=1¾Í¿ÉÒÔÈ«²¿²é³ö¡£
Ç¿ÖƵ¥ÒýºÅÒýÆðÀ´£¬select  * from student where name='xx or 1=1'¡£¾ÍÎÞЧÁË¡£
ÊýÖµÐ͵ÄûÓÐÒªÇóÓõ¥ÒýºÅÒýÆðÀ´£¬Ó¦¸ÃÊÇÓÉÓÚÓÐÒ»¸öת»»¹ý ......

SQL Server2008 Filtered Indexes

SQL Server Filtered Indexes - What They Are, How to Use and Performance Advantages
Written By: Arshad Ali -- 7/2/2009 -
Problem
SQL Server 2008 introduces Filtered Indexes which is an index with a WHERE clause. Doesn’t it sound awesome especially for a table that has huge amount of data and ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ