1 2 3 4 5 6 > >>   Sort: Rank

What Is a Result Set Object in MySQL
What Is a Result Set Object in MySQL? A result set object is a logical representation of data rows returned by mysql_query() function on SELECT statements. Every result set object has an internal pointer used to identify the current row in the result set. Once you get a result set object, you can us...
2017-09-20, 207👍, 0💬

Inserting Rows with a SELECT Statement in MySQL
How To Insert Multiple Rows with a SELECT Statement in MySQL? If want to insert rows into a table based on data rows from other tables, you can use a sub-query inside the INSERT statement as shown in the following script example: <?php include "mysql_connection.php"; $sql = "INSERT INTO fyi_l...
2017-09-20, 191👍, 0💬

What Is a Subquery in MySQL
What Is a Subquery in MySQL? A subquery is a SELECT statement used as part of the selection criteria of the main SELECT statement. The subquery specified in the WHERE clause will be evaluated repeated on each row of the selection base table. The output of the subquery will be used in the final evalu...
2017-09-17, 205👍, 0💬

Using Subqueries with the IN Operator in MySQL
How To Use Subqueries with the IN Operator in MySQL? A subquery can be used with the IN operator as "expression IN (subquery)". The subquery should return a single column with one or more rows to form a list of values to be used by the IN operation. The following tutorial exercise shows you how to u...
2017-09-17, 198👍, 0💬

Using Subqueries with the EXISTS Operator in MySQL
How To Use Subqueries with the EXISTS Operator in MySQL? A subquery can be used with the EXISTS operator as "EXISTS (subquery)", which returns true if the subquery returns one or more rows. The following statement is a good example of "EXISTS (subquery)". It returns rows from fyi_links table that th...
2017-09-17, 193👍, 0💬

Storage Engines: MyISAM, InnoDB and BDB in MySQL
Where to find answers to frequently asked questions on Storage Engines: MyISAM, InnoDB and BDB in MySQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Storage Engines: MyISAM, InnoDB and BDB in MySQL. Clear explanations and tutorial exercises ar...
2017-09-12, 232👍, 0💬

Tables Using MyISAM Storage Engine in MySQL
How To Create a New Table Using MyISAM Storage Engine in MySQL? MyISAM storage engine is based on the ISAM (Indexed Sequential Access Method) concept, which was first developed at IBM to store and retrieve data on secondary storage systems like tapes. MyISAM storage engine offers fast data storage a...
2017-09-12, 219👍, 0💬

Retrieving the Last Sequence ID in MySQL
How To Get the Last ID Assigned by MySQL in MySQL? If you use an ID column with AUTO_INCREMENT attribute, you can use the mysql_insert_id() function to get the last ID value assigned by the MySQL server, as shown in the sample script below: <?php include "mysql_connection.php"; $sql = "INSERT...
2017-09-12, 214👍, 0💬

Major Storage Engines Supported in MySQL in MySQL
What Are Storage Engines in MySQL? Storage engines are programs that are integrated into MySQL database management system to manage data tables. MySQL 5.0 supports the following major storage engines: MyISAM Storage Engine - MySQL default storage engine. Based on ISAM database concept. MyISAM is not...
2017-09-12, 211👍, 0💬

Define the ID Column as Auto-Incremented in MySQL
How To Define the ID Column as Auto-Incremented in MySQL? Many tables require an ID column to assign a unique ID number for each row in the table. For example, if you have a table to hold forum member profiles, you need an ID number to identify each member. To allow MySQL server to automatically ass...
2017-09-12, 205👍, 0💬

Testing New User Account and Password in MySQL
How To Test a New User Account and Password in MySQL? If you have new user created with a password, you test it using "mysql" program with the "-u" and "-p" options. The following tutorial exercise shows you some interesting use cases of connecting to the server with user names and passwords: &g...
2017-09-08, 288👍, 0💬

Predefined User Accounts in MySQL
What Are the Predefined User Accounts in MySQL? There is only one predefined user account called "root": "root" was created during the installation process. "root" has no password initially. You need to assign a new password as soon as you finishes the installation. "root" has all access privileges ...
2017-09-08, 239👍, 0💬

Chaning Other User's Password in MySQL
How To Change the Password of Another User Account in MySQL? If you want to change the password of someone else's user account, you can connect to the server as "root" and use the "SET PASSWORD FOR userName ..." command to change the password of another user account. There are two ways to use this c...
2017-09-08, 233👍, 0💬

Changing Your Own Password in MySQL
How To Change the Password for Your Own User Account in MySQL? If you want to change the password of your own user account, you should use your user account connect to the server "mysql" first. You should then use the "SET PASSWORD ..." command to change the password of the current user account. The...
2017-09-08, 230👍, 0💬

Adding a New User Account in MySQL
How To Add a New User Account in MySQL? If you want to add a new user account, you can connect to the server as "root" and use the "CREATE USER ..." command. The command syntax for create a new user account with a specified user name and password is: CREATE USER userName IDENTIFIED BY 'passwordStrin...
2017-09-08, 226👍, 0💬

Backup Tables by Copying MyISAM Files in MySQL
How To Backup Tables by Copying MyISAM Table Files in MySQL? To easiest way to backup MyISAM tables is to copy the data files to a backup directory. But this is not the recommended way to do backups. Read the backup FAQ collections for more details. The following tutorial exercise shows you how to a...
2017-09-01, 246👍, 0💬

Data File for MyISAM Storage Engine in MySQL
Where Table Data Is Stored by the MyISAM Storage Engine in MySQL? By default, MySQL provides \mysql\data directory for all storage engines to store table data. Under \mysql\data directory, each database will have its own subdirectory to store table data. If a new table is created with the MyISAM sto...
2017-09-01, 235👍, 0💬

Tables Using InnoDB Storage Engine in MySQL
How To Create a New Table Using the InnoDB Storage Engine in MySQL? InnoDB storage engine was developed by Innobase Oy, which is an Oracle company now. InnoDB is transaction safe, and has been used by a number of large Websites, like Slashdot.org. InnoDB is not the default storage engine. You need t...
2017-09-01, 233👍, 0💬

Repair MyISAM Tables in MySQL
How To Check and Repair MyISAM Tables in MySQL? If you have a corrupted MyISAM table, like the one resulted from the previous tutorial exercise, you can use the "CHECK TABLE" and "REPAIR TABLE" commands to try to repair it. The following tutorial exercise gives you a good example of repairing a corr...
2017-09-01, 229👍, 0💬

Restore Tables by Copying MyISAM Files in MySQL
How To Restore Tables by Copying MyISAM Table Files in MySQL? If you have old copies of MyISAM table files, you can restore them easily by copying them back to the data directory to replace the current table files. However you may need to shut down MySQL server to do this, because the current table ...
2017-09-01, 209👍, 0💬

"ALTER USER" - Changing the Name of a Database User in SQL Server
How To Change the Name of a Database User in SQL Server? If you want to change the name of an existing database user, you can use the "ALTER USER" statement as shown in the tutorial exercise below: -- Login with "sa" USE FyiCenterData; GO ALTER USER Fyi_User WITH NAME = Dba_User; GO -- List all user...
2017-08-25, 484👍, 0💬

sys.database_principals - Listing All User Names in SQL Server
How To List All User Names in a Database in SQL Server? If you want to see a list of all user names defined in a database, you can use the system view, sys.database_principals as shown in this tutorial exercise: -- Login with sa -- Select a database USE FyiCenterData; GO -- List all user names SELEC...
2017-08-25, 347👍, 0💬

Verifying a User Name with SQLCMD Tool in SQL Server
How To Verify a User name with SQLCMD Tool in SQL Server? The quickest way to verify a user name in a database is probably to use the SQLCMD tool. You can connect to the server, select the database, and check which user name is linked the current login name as shown below. Start a command window and...
2017-08-25, 312👍, 0💬

Finding the Login Name Linked to a Given User Name in SQL Server
How To Find the Login Name Linked to a Given User Name in SQL Server? If you know a user name in a database and you want to find out which login name is linked this user name, you need to check the Security ID (SID) of the user name based on the following rules: Each login name is associated a uniqu...
2017-08-25, 284👍, 0💬

1 2 3 4 5 6 > >>   Sort: Rank