OracleÖÐÈçºÎÓÃÒ»ÌõSQL¿ìËÙÉú³É10ÍòÌõ²âÊÔÊý¾Ý
OracleÖÐÈçºÎÓÃÒ»ÌõSQL¿ìËÙÉú³É10ÍòÌõ²âÊÔÊý¾Ý
×öÊý¾Ý¿â¿ª·¢»ò¹ÜÀíµÄÈ˾³£Òª´´½¨´óÁ¿µÄ²âÊÔÊý¾Ý£¬¶¯²»¶¯¾ÍÐèÒªÉÏÍòÌõ£¬Èç¹ûÒ»ÌõÒ»ÌõµÄ¼È룬
ÄÇ»áÀË·Ñ´óÁ¿µÄʱ¼ä£¬±¾ÎĽéÉÜÁËOracleÖÐÈçºÎͨ¹ýÒ»ÌõSQL¿ìËÙÉú³É´óÁ¿µÄ²âÊÔÊý¾ÝµÄ·½·¨¡£
²úÉú²âÊÔÊý¾ÝµÄSQLÈçÏ£º
SQL> select rownum as id,
2 to_char(sysdate + rownum / 24 / 3600, 'yyyy-mm-dd hh24:mi:ss') as inc_datetime,
3 trunc(dbms_random.value(0, 100)) as random_id,
4 dbms_random.string('x', 20) as random_string
5 from dual
6 connect by level <= 10;
ID INC_DATETIME RANDOM_ID RANDOM_STRING
---------- ------------------- ---------- --------------------------------------------------------------------------------
1 2009-12-08 19:43:14 76 GWMU280MIVBKKOCZV620
2 2009-12-08 19:43:15 34 GNV88O6TDHD3TWC5GWI5
3 2009-12-08 19:43:16 77 LI6H4O5IAHQIMO4B0WMH
4 2009-12-08 19:43:17 99 LP7XP49I0YOJIYSJDQZO
5 2009-12-08 19:43:18 55 V3284X9RXW4UZI8BQMO3
6 2009-12-08 19:43:19 16 T0OA52UAOGHL1TT46H25
7 2009-12-08 19:43:20 61 UY6RUOF7HWTO86942FLP
&nbs
Ïà¹ØÎĵµ£º
public class SqlCheck
{
public SqlCheck()
{
//
// TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼
//
}
public SqlConnection oconn()
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString = ConfigurationManager.ConnectionStrings["StudyConnectionString"] ......
Ëæ×ÅB/SģʽӦÓÿª·¢µÄ·¢Õ¹£¬Ê¹ÓÃÕâÖÖģʽ±àдӦÓóÌÐòµÄ³ÌÐòÔ±Ò²Ô½À´Ô½¶à¡£µ«ÊÇÓÉÓÚÕâ¸öÐÐÒµµÄÈëÃÅÃż÷²»¸ß£¬³ÌÐòÔ±µÄˮƽ¼°¾ÑéÒ²²Î²î²»Æ룬Ï൱´óÒ»²¿·Ö³ÌÐòÔ±ÔÚ±àд´úÂëµÄʱºò£¬Ã»ÓжÔÓû§ÊäÈëÊý¾ÝµÄºÏ·¨ÐÔ½øÐÐÅжϣ¬Ê¹Ó¦ÓóÌÐò´æÔÚ°²È«Òþ»¼¡£Óû§¿ÉÒÔÌá½»Ò»¶ÎÊý¾Ý¿â²éѯ´úÂ룬¸ù¾Ý³ÌÐò·µ»ØµÄ½á¹û£¬»ñµÃijЩËûÏëµÃÖªµÄÊ ......
SQL Server 2005 ÖеÄÊý¾ÝÀàÐ͹éÄÉΪÏÂÁÐÀà±ð£º
¾«È·Êý×Ö
Unicode ×Ö·û´®
½üËÆÊý×Ö
¶þ½øÖÆ×Ö·û´®
ÈÕÆÚºÍʱ¼ä
ÆäËûÊý¾ÝÀàÐÍ
×Ö·û´®
ÔÚ SQL Server 2005 ÖУ¬¸ù¾ÝÆä´æ´¢ÌØÕ÷£¬Ä³Ð©Êý¾ÝÀàÐͱ»Ö¸¶¨ÎªÊôÓÚÏÂÁи÷×飺
´óÖµÊý¾ÝÀàÐÍ£ºvarchar(max)¡¢nvarchar(max) ºÍ varbinary(max)
´óÐͶÔÏóÊý¾ÝÀàÐÍ£ºtext¡¢ntext¡¢ima ......
Ê×ÏÈÎÒÏëлл԰×ÓµÄÅóÓÑÃÇ£¬ÊÇÄãÃÇÌáÐÑÎÒдÄÚÈÝÓдíÎ󣬼ǵÃÔø¾µç×ÓÉÌÎñÖ®Êý¾Ý´æ´¢Á÷³Ì£¨Î壩ÀïÃæ˵µ½“Ñ¡´æ´¢¹ý³Ì+´«µÝ²ÎÊýÓÃSqlParameterÊÇÒòΪ£¬³ý·ÇÊÇADO.NETÓЩ¶´£¬ÄÇô¾Í¾ø¶Ô²»»á·¢ÉúSQL×¢È딡£Keep Walking´ó¸çÒ²ÔÚ¹ØÓÚ·ÀÖ¹sql×¢ÈëµÄ¼¸ÖÖÊֶΣ¨¶þ£©ÖоٳöÀ´Ò»¸öÀý×Ó˵Ã÷ÎÒ˵µÄÉϾ仰ÊÇ´íÎóµÄ¡£ËµÊµ»°µ± ......
¡¡¡¡Êý¾Ý¿â¿ª·¢ÈËÔ±»òÊý¾Ý¿â¹ÜÀíÔ±(DBA)ΪÁË·¢²¼Êý¾Ý¿â»ò±¸·ÝÊý¾Ý¿â¶ÔÏ󣬳£ÐèÒªÉú³ÉT-SQL½Å±¾¡£±ÊÕßÔÚÕâÀï¶Ô³£Ó÷½·¨½øÐÐÁË×ܽᣬ¹©ÅóÓÑÃDzο¼¡£
¡¡¡¡·½·¨Ò»£ºÊ¹ÓÃÆóÒµ¹ÜÀíÆ÷
¡¡¡¡½øÈë“ÆóÒµ¹ÜÀíÆ÷”£¬ÓÒ»÷Êý¾Ý¿â£¬Ñ¡Ôñ“ËùÓÐÈÎÎñ→Éú³ÉSQL½Å±¾”¼´¿É¡£
¡¡¡¡·½·¨ÆÀ¼Û£ºÓŵãÊÇ·½±ã£¬ÇÒ²Ù×÷¼òµ¥¡ ......