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

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, 4772👍, 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, 4768👍, 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, 4766👍, 0💬

How To Update Values in a Table
How To Update Values in a Table? - MySQL FAQs - Understanding SQL INSERT, UPDATE and DELETE Statements If you want to update some values in one row or multiple rows in a table, you can use the UPDATE statement. The tutorial script below shows a good example: mysql> UPDATE fyi_links SET counts = 999,...
2007-05-11, 4763👍, 0💬

How To Test a New User Account and Password
How To Test a New User Account and Password? - MySQL FAQs - Managing User Accounts and Access Privileges 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 ...
2007-05-10, 4762👍, 0💬

How To Create a New Table by Selecting Rows from Another Table
How To Create a New Table by Selecting Rows from Another Table? - MySQL FAQs - Understanding SQL CREATE, ALTER and DROP Statements Let's say you have a table with many data rows, now you want to create a backup copy of this table of all rows or a subset of them, you can use the "CREATE TABLE ... SEL...
2007-05-11, 4758👍, 0💬

How To Write a Query with a Left Outer Join
How To Write a Query with a Left Outer Join? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqueries If you want to query from two tables with a left outer join, you can use the LEFT OUTER JOIN ... ON clause in the FROM clause. The following query returns output with a left outer join from two...
2007-05-11, 4757👍, 0💬

How To Get a List of Indexes of an Existing Table
How To Get a List of Indexes of an Existing Table? - MySQL FAQs - Understanding SQL CREATE, ALTER and DROP Statements If you want to see the index you have just created for an existing table, you can use the "SHOW INDEX FROM tableName" command to get a list of all indexes in a given table. The tutor...
2007-05-11, 4754👍, 0💬

How To Create a New Table
How To Create a New Table? - MySQL FAQs - Understanding SQL CREATE, ALTER and DROP Statements If you want to create a new table, you can use the "CREATE TABLE" statement. The following tutorial script shows you how to create a table called "tip": mysql> CREATE TABLE tip (id INTEGER PRIMARY KEY, subj...
2007-05-11, 4754👍, 0💬

How To Filter Out Duplications in the Returning Rows
How To Filter Out Duplications in the Returning Rows? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY If there are duplications in the returning rows, and you want to remove the duplications, you can use the keyword DISTINCT in the SELECT clause. The DISTINCT applies to the combination of a...
2007-05-11, 4751👍, 0💬

How To Return Query Output in XML Format
How To Return Query Output in XML Format? - MySQL FAQs - Command-Line End User Interface mysql By default, "mysql" returns query output in text table format. If you want to receive query output in XML format, you need to use the "-X" command option. Here is a good tutorial exercise: >cd \mysql\bin >...
2007-05-10, 4751👍, 0💬

How To Insert Multiple Rows with One INSERT Statement
How To Insert Multiple Rows with One INSERT Statement? - MySQL FAQs - Understanding SQL INSERT, UPDATE and DELETE Statements If you want to insert multiple rows with a single INSERT statement, you can use a subquery instead of the VALUES clause. Rows returned from the subquery will be inserted the t...
2007-05-11, 4749👍, 0💬

How To Return Query Output in HTML Format
How To Return Query Output in HTML Format? - MySQL FAQs - Command-Line End User Interface mysql By default, "mysql" returns query output in text table format. If you want to receive query output in HTML format, you need to use the "-H" command option. Here is a good tutorial exercise: >cd \mysql\bin...
2007-05-10, 4748👍, 0💬

How To Get the Number of Rows Selected or Affected by a SQL Statement
How To Get the Number of Rows Selected or Affected by a SQL Statement? - PHP Script Tips - Working with MySQL Database There are two functions you can use the get the number of rows selected or affected by a SQL statement: mysql_num_rows($rs) - Returns the number of rows selected in a result set obj...
2007-04-19, 4747👍, 0💬

Can SELECT Statements Be Used on Views
Can SELECT Statements Be Used on Views? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY Select (query) statements can be used on views in the same way as tables. The following tutorial exercise helps you creating a view and running a query statement on the view: mysql> CREATE VIEW myLinks A...
2007-05-11, 4743👍, 0💬

How To Drop an Existing Database
How To Drop an Existing Database? - MySQL FAQs - PHP Connections and Query Execution If want to drop an existing database from the MySQL server, you can use the DROP DATABASE statement. Here is a good example of dropping an existing database: $con = mysql_connect('localhost:8888' ,'dev', 'iyf'); $sq...
2007-05-10, 4739👍, 0💬

What Is a User Account
What Is a User Account? - MySQL FAQs - Managing User Accounts and Access Privileges A user account is identified by a user name and defines the user's attributes, including the following: Password for connection authentication. User privileges, for examples: Shutdown_priv, Create_priv, Drop_priv, In...
2007-05-10, 4737👍, 0💬

What Are User Privileges
What Are User Privileges? - MySQL FAQs - Managing User Accounts and Access Privileges MySQL offers many user privileges to control user accesses to different funtions and data objects. Here are some commonly used privileges: ALL - All privileges. CREATE - Allows the user to use CREATE TABLE commands...
2007-05-10, 4736👍, 0💬

What Are String Data Types
What Are String Data Types? - MySQL FAQs - Introduction to SQL Basics MySQL supports the following string data types: CHAR(n) same as CHARACTER(n) - Fixed width and " " padded characters strings. Default character set is ASCII. NCHAR(n) same as NATIONAL CHARACTER(n) - Fixed width and " " padded char...
2007-05-11, 4735👍, 0💬

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

How To Query Tables and Loop through the Returning Rows
How To Query Tables and Loop through the Returning Rows? - PHP Script Tips - Working with MySQL Database The best way to query tables and loop through the returning rows is to run the SELECT statement with the catch the mysql_query() function, catch the returning object as a result set, and loop thr...
2007-04-19, 4733👍, 0💬

What Is "mysql"
What Is "mysql"? - MySQL FAQs - Administrator Tools for Managing MySQL Server "mysql" is a command-line interface for end users to manage user data objects. You can use "mysql" to run any standard SQL statements against the server. For example, you use the following SQL statements to manage tables a...
2007-05-11, 4732👍, 0💬

How To Get a List of All Tables in a Database
How To Get a List of All Tables in a Database? - MySQL FAQs - Understanding SQL CREATE, ALTER and DROP Statements If you want to see the table you have just created, you can use the "SHOW TABLES" command to get a list of all tables in database. The tutorial script gives you a good example: mysql> SH...
2007-05-11, 4731👍, 0💬

How Do You Know the Version of Your MySQL Server
How Do You Know the Version of Your MySQL Server? - MySQL FAQs - Downloading and Installing MySQL on Windows If you want to know the version number of your MySQL server, you can use the "mysqladmin" program in a command window as shown in the following tutorial: >cd \mysql\bin >mysqladmin -u root ve...
2007-05-10, 4720👍, 0💬

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