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

´ÓSQLÊý¾Ý¿âÀïËæ»ú¶ÁÈ¡Ò»Ìõ¼Ç¼



ÔõÑù´ÓÊý¾Ý¿âÀïËæ»ú¶ÁÈ¡
Ò»Ìõ¼Ç¼£¬
SELECT TOP 1 * from dbo.Customers ORDER BY  NEWID()
ÕâÑù£¬Èç¹ûÊÇËæ»ú10
Ìõ£¬100Ìõ¡£¡£¡£¡£
SELECT TOP 10 * from dbo.Customers ORDER BY  NEWID()
ºÜ¼òµ¥°É¡£
²»¹ýtopºóÃæÊý×ÖÔ½´ó£¬ÔËÐÐËÙ¶ÈÔ½Âý¡£²»ÍƼöÊý¾Ý×ÖÌ«´ó¡£
ÒÔºó´úÂëÔÚSQL20005ÖвâÊÔͨ¹ý£¬ACCESSºÃÏñ²»ÐС£


Ïà¹ØÎĵµ£º

SQL Server ѹËõÈÕÖ¾¿Õ¼ä

ʹÓÃÁËÒ»¶Îʱ¼äºó£¬SQL Server µÄ LDFÎļþÌå»ý¾Þ´ó.
ÈçºÎ´¦ÀíàÏ, ¶ÔÓÚ SQL Server 2005 ¼°Ö®Ç°µÄ°æ±¾£¬¿ÉÒÔʹÓÃÈçÏ SQL£º
declare @name varchar(50)
set @name='dbname
'
backup
log @name
with truncate_only
dbcc shrinkdatabase (@name,20)
¿ÉÊÇÔÚ SQL Server 2008 ¿ªÊ¼£¬Ö´ÐÐÉÏÃæµÄÓï¾ä»á±¨´í:
'truncate ......

QtÊý¾Ý¿â£¨ËÄ£©ÀûÓÃQSqlQueryÀàÖ´ÐÐSQLÓï¾ä£¨¶þ£©


±¾ÎÄÕÂÔ­´´ÓÚwww.yafeilinux.com ×ªÔØÇë×¢Ã÷³ö´¦¡£
½Ó×ÅÉÏһƪ½Ì³Ì¡£
¶þ£¬ÔÚSQLÓï¾äÖÐʹÓñäÁ¿¡£
ÎÒÃÇÏÈ¿´ÏÂÃæµÄÒ»¸öÀý×Ó£¬½«“²éѯ”°´Å¥µÄ²Ûº¯Êý¸ü¸ÄÈçÏ£º
void Widget::on_pushButton_clicked()
{
    QSqlQuery query;
    query.prepare(“insert i ......

sqlÓï¾äѧϰ±Ê¼Ç(8) Ìí¼ÓÔ¼Êø£¬ÊµÏÖÊý¾ÝÍêÕûÐÔ

USE StudentInfo
--=====================================================
--Author     £ºyangjuncheng  
--Create Date:2010.5.26
--Decription :¸ø±íÌí¼ÓÔ¼Êø£¨¿ÉÒÔÔÚ´´½¨±íʾֱ½ÓÌí¼Ó
--            Ò²¿ÉÒÔʹÓÃalter¹Ø¼ ......

sqlС±Ê¼Ç£¨5.26£©

sql server 2005 ¼òµ¥ÔËÓú¯Êý
1.null º¯Êý
  Ó÷¨ÓëoracleÖÐnvl()ÀàËÆ£¬´¦Àíº¯ÊýΪisnull()£¬
  ÀýÈ磺
    select ename,sal+isnull(comm,0)
    from emp
    go
  isnull(comm,0)µÄÓ÷¨ÊÇ£º commΪnull Ôò·µ»Ø0 ·ñÔòΪ commµÄÖµ¡£
2.V ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ