background preloader

DB

Facebook Twitter

MariaDB

Conditional COUNT in MySQL. SQL Commands. SQL commands are instructions used to communicate with the database to perform specific task that work with data.

SQL Commands

SQL commands can be used not only for searching the database but also to perform various other functions like, for example, you can create tables, add data to tables, or modify data, drop the table, set permissions for users. SQL commands are grouped into four major categories depending on their functionality: SQL Subquery. Subquery or Inner query or Nested query is a query in a query.

SQL Subquery

A subquery is usually added in the WHERE Clause of the sql statement. Most of the time, a subquery is used when you know how to search for a value using a SELECT statement, but do not know the exact value in the database. Subqueries are an alternate way of returning data from multiple tables. Subqueries can be used with the following sql statements along with the comparision operators like =, <, >, >=, <= etc.

MySQL

Delete a column from an existing MySQL table. Add a column to an existing MySQL table. MySQL tables are easy to extend with additional columns.

Add a column to an existing MySQL table

To add a column called email to the contacts table created in Create a basic MySQL table with a datatype of VARCHAR(80), use the following SQL statement: ALTER TABLE contacts ADD email VARCHAR(60); This first statement will add the email column to the end of the table. MySQL Tutorial,Free MySQL Tutorials,MySQL Programming Tutorials,Online MySQL Help for Beginners. Database,Database Tutorials. A Database Management System (DBMS) sometimes called a database manager or database system is a set of computer programs that controls the creation, organization, maintenance, and retrieval of data from the database stored in a computer.

Database,Database Tutorials

It allows the individuals or entities to easily access and use the data from database. An excellent database system helps the end users to easily access and use the data and also stores the new data in a systematic way. TRIGGERS, Create Trigger, Drop Trigger, Example Trigger. Question #2: Trigger on One Table To Insert Data into Another. Question #2 from the September MySQL User Group was whether or not a TRIGGER can affect a different table. Apparently the documentation (perhaps for an earlier version??) Specified this was not possible. Tom Hanlon, MySQL employee, put up this example (modified from the original, special thanks to Ralph Navarro for copying it down): Database Administrators - Stack Exchange. Re: ERROR 1153: Got a packet bigger than 'max_allowed_packet' bytes. Indexing - What's the difference between Primary Key, Unique Key and Index in MySQL. MySQL: ERROR 1227 (42000): Access denied - Cannot CREATE USER. To create a MySQL database and set privileges to a user.

MySQL is a widely spread SQL database management system mainly used on LAMP (Linux/Apache/MySQL/PHP) projects.

To create a MySQL database and set privileges to a user

In order to be able to use a database, one needs to create: a new database, give access permission to the database server to a database user and finally grant all right to that specific database to this user. This tutorial will explain how to create a new database and give a user the appropriate grant permissions. For the purpose of this tutorial, I will explain how to create a database and user for the music player Amarok. In order to index its music collection, Amarok quand use a mysql backend. The requirement for this set up is to have access to a database. S MySQL Blog. Are you already a MySQL User Group Leader?

s MySQL Blog

Or Are you thinking about taking this role in the near future? MySQL Documentation: MySQL Reference Manuals.