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

һЩ¼òµ¥µÄmysql SQLÓï¾ä±¸Íü

·ÅÔÚÕâÀﱸÍü,ÀÏÊÇÍü¼ÇÔõôд¡£
mysql> create database book;
mysql> use book;
Database changed
mysql> create table email_message(key_mail_messages INTEGER,
-> date_created VARCHAR(19),
-> date_updated varchar(19),
-> date_email varchar(19),
-> addr_from varchar(100),
-> addr_reply_to varchar(100),
-> subject varchar(100),
-> message mediumtext);
mysql> describe email_message;
+-------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+--------------+------+-----+---------+-------+
| key_mail_messages | int(11) | YES | | NULL | |
| date_created | varchar(19) | YES | | NULL | |
| date_updated | varchar(19) | YES | | NULL | |
| date_email | varchar(19) | YES | | NULL | |
| addr_from | varchar(100) | YES | | NULL | |
| addr_reply_to | varchar(100) | YES | | NULL | |
| subject | varchar(100) | YES | | NULL | |
| message | mediumtext | YES | | NULL | |
+-------------------+--------------+------+-----+---------+-------+
mysql> alter table email_message add column temp_field integer;
mysql> describe email_message;
+-------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+--------------+------+-----+---------+-------+
| key_mail_messages | int(11) | YES | | NULL | |
| date_created | varchar(19) | YES | | NULL | |
| date_updated | varchar(19) | YES | | NULL | |
| date_email | varchar(19) | YES | | NULL | |
| addr_from | varchar(100) | YES | | NULL | |
| addr_reply_to | varchar(100) | YES |


Ïà¹ØÎĵµ£º

Á¬½ÓMysqlÊý¾Ý¿âС³£Ê¶

1.¼ÓÔØmysqlÇý¶¯°üProperties->java Build Path->Libraries->Add External JARs...
2.Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/Êý¾Ý¿âÃû?user=root&password=ÃÜÂë"); ......

Ò»²½Ò»²½Ñ§Linq to sql£¨ËÄ£©£º²éѯ¾ä·¨


select
 
ÃèÊö£º²éѯ¹Ë¿ÍµÄ¹«Ë¾Ãû¡¢µØÖ·ÐÅÏ¢
²éѯ¾ä·¨£º
var ¹¹½¨ÄäÃûÀàÐÍ1 = from c in ctx.Customers
                      select new
    ......

SQL ѧϰ±Ê¼Ç Like²Ù×÷·û

LIKE ²Ù×÷·ûÓÃÓÚÔÚ WHERE ×Ó¾äÖÐËÑË÷ÁÐÖеÄÖ¸¶¨Ä£Ê½¡£
SQL LIKE ²Ù×÷·ûÓï·¨
SELECT column_name(s) from table_name WHERE column_name LIKE pattern
SQL ͨÅä·û
ÔÚËÑË÷Êý¾Ý¿âÖеÄÊý¾Ýʱ£¬SQL ͨÅä·û¿ÉÒÔÌæ´úÒ»¸ö»ò¶à¸ö×Ö·û¡£
SQL ͨÅä·û±ØÐëÓë LIKE ÔËËã·ûÒ»ÆðʹÓá£
ÔÚ SQL ÖУ¬¿ÉʹÓÃÒÔÏÂͨÅä·û£º
ͨÅä·û
Ãè ......

SQL µ¼³öµ½ Ö¸¶¨ACCESS±í ÍêÃÀ·½°¸

ÓÉÓÚ³ÌÐòÐèÒª°ÑSQL SERVER ÀïµÄÊý¾Ýµ¼Èëµ½ACCESSÀï.
¸Õ¿ªÊ¼Ê¹ÓÃDataSetÀ´Ñ­»·.
Êý¾ÝÁ¿ÉÙµÄʱºò»¹Ëã¿ÉÒÔÓ¦¸¶µÄ¹ýÀ´.
µ«µ±Êý¾Ý¶àµÄʱºò.
»á±¨´í"λÖôíÎó"
ÔÚÍøÉÏËÑѰһ·¬.ÕÒµ½Ò»¸ö·½·¨.
ʹÓÃinsert into openrowset
½Ó×Å´íÎóÒ»¸ö½ÓÒ»¸öµÄÀ´..
"²åÈë´íÎó: ÁÐÃû»òËùÌṩֵµÄÊýÄ¿Óë±í¶¨Ò岻ƥÅä¡£"
"δÄÜÕÒµ½ OLE DB Ì ......

Èí¼þϵͳÐÔÄÜÓÅ»¯²ßÂÔSQLÓÅ»¯

    ¶øÕâһƪÖУ¬ÎÒÃǾÍÎ§ÈÆSQLÓÅ»¯À´¿ªÊ¼Õâ´Î½²½â£¬ÎªÊ²Ã´µÚÒ»½²ÒªËµSQLÓÅ»¯£¿ÒòΪÎÒÈÏΪÕâÊdzÌÐòÔ±µÄ»ù±¾¹¦£¬¶øÇÒÒ²ÊÇÎÒÃDZØÐëÒªÈ¥ÕÆÎյģ¬ËäÈ»ÄãдµÄ SQLÓï¾äÄÜÍê³ÉÏàÓ¦µÄ¹¦ÄÜ£¬µ«ÊÇÄãÊÇ·ñ¿¼ÂǹýÕâЩÓï¾äÅöµ½º£Á¿Êý¾Ý»òÕß±©Á¦·ÃÎÊʱ»á²»»á´øÀ´Ð§ÂʵĴó·ù¶ÈµÄ¼õÂý£¿Ò²ÐíºÜ¶à³ÌÐòÔ±ºÍÎÒÒ»ÑùÔÚÅöµ½ÏµÍ³ÏìÓ¦Ê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ