MySqlCommand Methods
メニューを表示するにはスワイプしてください
Note
If you're unable to delete objects from the MySQL server, it is possible that the server is running in safe mode. To disable safe mode, you can run the following query:
SET SQL_SAFE_UPDATES=0;.
Important Points
- We use
ExecuteNonQueryfor commands which modify the database; ExecuteReaderandExecuteScalarare for querying commands that retrieve data from the database;ExecuteReaderreturns aMySqlDataReaderobject;MySqlDataReaderhas a method calledread()which reads the rows in a sequential manner; We need toClose()theMySqlDataReaderobject after use;ExecuteScalarreturns anobjectwhich can be type-casted into the appropriate data type.
1. The following command selects and returns all the students that have marks higher than 90, which command is the most appropriate for executing this query?
2. The following command selects and returns the name of the oldest student in the class, which command is the most appropriate for executing this query?
すべて明確でしたか?
フィードバックありがとうございます!
セクション 1. 章 25
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください
セクション 1. 章 25