<< < 4 5 6 7 8 9 10 11 12 13 > >>   Sort: Date

How To Select an Exiting Database
How To Select an Exiting Database? - MySQL FAQs - PHP Connections and Query Execution The first thing after you have created a connection object to the MySQL server is to select the database where your tables are located, by using the mysql_select_db() function. If your MySQL server is offered by yo...
2007-05-10, 4759👍, 0💬

How To Show All Tables with "mysql"
How To Show All Tables with "mysql"? - MySQL FAQs - Administrator Tools for Managing MySQL Server If you want to see all the tables in a database, you run the non-SQL command "SHOW TABLES" at the "mysql" prompt. See the following tutorial exercise for example: >cd \mysql\bin >mysql -u root test Welc...
2007-05-11, 4757👍, 0💬

How To Select Some Columns from a Table
How To Select Some Columns from a Table? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY If you want explicitly tell the query to return some columns, you can specify the column names in the SELECT clause. The following select statement returns only two columns, "id" and "url" from the tabl...
2007-05-11, 4756👍, 0💬

How To Insert a New Row into a Table
How To Insert a New Row into a Table? - MySQL FAQs - Understanding SQL INSERT, UPDATE and DELETE Statements To insert a new row into a table, you should use the INSERT INTO statement with values specified for all columns as shown in the following example: mysql> INSERT INTO fyi_links VALUES (101, 'd...
2007-05-11, 4750👍, 0💬

What Is TIMESTAMP
What Is TIMESTAMP? - MySQL FAQs - Introduction to SQL Date and Time Handling A TIMESTAMP data type allows you to record a date and time like DATETIME data type. But it has some interesting features when used on a table column: The first TIMESTAMP column in a table will be assigned with the current d...
2007-05-11, 4750👍, 0💬

How To Drop an Existing View
How To Drop an Existing View? - MySQL FAQs - Understanding SQL CREATE, ALTER and DROP Statements If you have an existing view, and you don't want it anymore, you can delete it by using the "DROP VIEW viewName" statement as shown in the following script: mysql> DROP VIEW faqComment; Query OK, 0 rows ...
2007-05-11, 4748👍, 0💬

How To Create a Table Index
How To Create a Table Index? - MySQL FAQs - Understanding SQL CREATE, ALTER and DROP Statements If you have a table with a lots of rows, and you know that one of the columns will be used often as a search criteria, you can add an index for that column to improve the search performance. To add an ind...
2007-05-11, 4747👍, 0💬

What Happens to the Current Transaction If the Session Is Ended
What Happens to the Current Transaction If the Session Is Ended? - MySQL FAQs - Transaction Management: Commit or Rollback If a session is ended, the current transaction in that session will be rolled back and ended. All the database changes made in the current transaction will be removed. This is c...
2007-05-11, 4746👍, 0💬

How To Show Table Names with "mysqlshow"
How To Show Table Names with "mysqlshow"? - MySQL FAQs - Administrator Tools for Managing MySQL Server If you want to show table names with "mysqlshow", you need to specify a database name. The followings tutorial exercise shows you how to get all table names that match a pattern: If you want analyz...
2007-05-11, 4745👍, 0💬

How To Delete Multiple Rows from a Table
How To Delete Multiple Rows from a Table? - MySQL FAQs - Understanding SQL INSERT, UPDATE and DELETE Statements You can delete multiple rows from a table in the same way as deleting a single row, except that the WHERE clause will match multiple rows. The tutorial exercise below deletes 3 rows from t...
2007-05-11, 4744👍, 0💬

How To See the CREATE TABLE Statement of an Existing Table
How To See the CREATE TABLE Statement of an Existing Table? - MySQL FAQs - Understanding SQL CREATE, ALTER and DROP Statements If you want to know how an existing table was created, you can use the "SHOW CREATE TABLE" command to get a copy of the "CREATE TABLE" statement back on an existing table. T...
2007-05-11, 4744👍, 0💬

What Are Date and Time Data Types
What Are Date and Time Data Types? - MySQL FAQs - Introduction to SQL Basics MySQL supports the following date and time data types: DATE - A date in the range of '1000-01-01' and '9999-12-31'. Default DATE format is "YYYY-MM-DD". DATETIME - A date with the time of day in the range of '1000-01-01 00:...
2007-05-11, 4744👍, 0💬

Can You Select Someone Else Database
Can You Select Someone Else Database? - MySQL FAQs - PHP Connections and Query Execution If your MySQL server is provided by an Internet service company, they will provide you one database for your use only. There are many other databases on the server for other users. But your user account will hav...
2007-05-10, 4740👍, 0💬

How To Restore Tables by Copying MyISAM Table Files
How To Restore Tables by Copying MyISAM Table Files? - MySQL FAQs - Storage Engines: MyISAM, InnoDB and BDB 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 shutdown MySQL ...
2007-05-10, 4738👍, 0💬

How To Specify Default Values in INSERT Statement
How To Specify Default Values in INSERT Statement? - MySQL FAQs - Understanding SQL INSERT, UPDATE and DELETE Statements If a column is defined with a default value in a table, you can use the key word DEFAULT in the INSERT statement to take the default value for that column. The following tutorial ...
2007-05-11, 4734👍, 0💬

How To Use "mysql" to Run SQL Statements
How To Use "mysql" to Run SQL Statements? - MySQL FAQs - Administrator Tools for Managing MySQL Server If you want to run SQL statement to your server with "mysql", you need to start "mysql" and enter your SQL statement at the "mysql" prompt. Here is a good tutorial exercise that shows you how to ru...
2007-05-11, 4731👍, 0💬

How To Create a Testing Table with Test Data
How To Create a Testing Table with Test Data? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY If you want to follow the tutorial exercises presented in this collection, you need to create a testing table and insert some test data, as shown in the following sample script: mysql> CREATE TABLE...
2007-05-11, 4730👍, 0💬

What Do You Need to Connect PHP to MySQL
What Do You Need to Connect PHP to MySQL? - PHP Script Tips - Working with MySQL Database If you want to access MySQL database server in your PHP script, you need to make sure that MySQL module is installed and turned on in your PHP engine. Check the PHP configuration file, php.ini, to make sure the...
2007-04-18, 4729👍, 0💬

How To Select an Exiting Database
How To Select an Exiting Database? - PHP Script Tips - Working with MySQL Database The first thing after you have created a connection object to the MySQL server is to select the database where your tables are locate, by using the mysql_select_db() function. If your MySQL server is offered by your W...
2007-04-18, 4728👍, 0💬

What Are DML Statements
What Are DML Statements? - MySQL FAQs - Understanding SQL INSERT, UPDATE and DELETE Statements DML (Data Manipulation Language) statements are statements to change data values in database tables. The are 3 primary DML statements: INSERT - Inserting new rows into database tables. UPDATE - Updating ex...
2007-05-11, 4727👍, 0💬

How To Use CASE Expression
How To Use CASE Expression? - MySQL FAQs - Introduction to SQL Basics There are 2 ways to use the CASE expression. The first way is to return one of the predefined values based on the comparison of a given value to a list of target values. The second way is to return one of the predefined values bas...
2007-05-11, 4724👍, 0💬

What Are Group Functions
What Are Group Functions? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY Group functions are functions applied to a group of rows. Examples of group functions are: COUNT(*) - Returns the number of rows in the group. MIN(exp) - Returns the minimum value of the expression evaluated on each r...
2007-05-11, 4721👍, 0💬

How To Quote Text Values in SQL Statements
How To Quote Text Values in SQL Statements? - PHP Script Tips - Working with MySQL Database Text values in SQL statements should be quoted with single quotes ('). If the text value contains a single quote ('), it should be protected by replacing it with two single quotes (''). In SQL language syntax...
2007-04-19, 4720👍, 0💬

How To Convert Character Strings to Numeric Values
How To Convert Character Strings to Numeric Values? - MySQL FAQs - Introduction to SQL Basics You can convert character strings to numeric values by using the CAST(string AS DECIMAL) or CAST(string AS SIGNED INTEGER) function as shown in the following examples: SELECT CAST('4123.45700' AS DECIMAL) F...
2007-05-11, 4719👍, 0💬

<< < 4 5 6 7 8 9 10 11 12 13 > >>   Sort: Date