½ô¼±ÇóÖú£ºmysql´´½¨Ë÷Òý³öÎÊÌâÁË
´ó¼ÒºÃ£¬ÎÒÔÚ´´½¨Ë÷Òýʱ£¬³öÏÖ´íÎóÌáʾ£¬´úÂëÈçÏ£º
create uique index stu_cou_index on student_info.results (student_id, course_id);
show index from student_info.results;
±£´æÎªindex.sql£¬È»ºóÔËÐУ¬³öÏÖ´íÎó£º
mysql> c:\wamp\www\index.sql
show warnings disabled.
show warnings disabled.
error:
unknown command '\i'
->
²¢ÇÒûÓа취»Øµ½mysql>µÄÌáʾ·û״̬£¬Ö»ÄܹرÕmysqlÔËÐÐ̨£¬ÔÙ´ÓнøÈë¡£¡£¡£
лл¸÷λ´óϺ£¬°ïÎÒ¿´¿´¡£¡£
°ÑÄãµÄ index.sql ÎļþÌù³öÀ´¿´Ò»ÏÂ...
create uique index stu_cou_index on student_info.results (student_id, course_id);
show index from student_info.results;
Ïà¹ØÎÊ´ð£º
ÎÒ°²×°ºÃmysqlºó,ĬÈϵÄÊý¾Ý¿â·¾¶ÊÇÔÚCÅÌÏÂ,ÎÒÏë°ÑËü¸Äµ½EÅÌÀï: ÎÒÏȰÑmysql·þÎñÍ£Ö¹,ÔÙÔÚmysql°²×°Ä¿Â¼(Ò²ÊÇÔÚEÅÌ)ÏÂÕÒµ½my.iniÎļþ,¾Í¸ÄÁËÏÂÃæÄÇô¶à:
#Path to the database root
datadir="E ......
if(mysql_init(&mysql)==NULL)
{
sprintf(ErrMsg,"We are outof Memory");
return(false);
}
if(!mysql_real_connect(&mysql,"localhost","test" ......
ÔÚMySQL5.0Öд¬½¢´æ´¢¹ý³Ìͨ²»¹ý£¬Ìáʾ£º
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' ......
orcle Óï¾ä create table book1(name, price) as select book_name, price form book;
¶ÔÓ¦µÄMySQLµÄÓï¾äÊÇʲô
create table book1 as select book_name, price form book; ÕâÑùÔÚMySQLÀï¿ÉÒÔ£¬µ«ÊÇÈ´² ......