vs2010 ado 啓動的時候創建數據表

        CString strSQL;
	strSQL.Format("CREATE TABLE IF NOT EXISTS bjyzj(id int(10) primary key auto_increment,address int(10) NOT NULL,remark varchar(255))");
	if (g_adoConnection->Execute(strSQL)==NULL)
	{
		OutputDebugString( "創建bjyzj失敗\n" );
	}

刪除表命令:

DROP TABLE table_name ;

參考:

https://www.runoob.com/mysql/mysql-drop-tables.html

https://www.runoob.com/mysql/mysql-drop-tables.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章