-
Data Definition Language (DDL) statements Allow you to define the data structures, such as tables, that make up a database. There are five basic types of DDL statements:
-
CREATE Allows you to create a database structure. For example, CREATE TABLE is used to create a table; another example is CREATE USER, which is used to create a database user.
-
ALTER Allows you to modify a database structure. For example, ALTER TABLE is used to modify a table.
-
DROP Allows you to remove a database structure. For example, DROP TABLE is used to remove a table.
-
RENAME Allows you to change the name of a table.
-
Data Definition Language (DDL) statements?
PMA01:54
Categories: MySQL, MySQL-Interview-Questions
Related Posts:
mysql_query-executes query mysql_query function executes query on the default database, set using mysql_select_db() or by a previous query using mysql_db_query(), on the MySQL server connection referenced by connection . If no connection … Read More
Query Strings Query string data is very easy for the user to alter, because it ’ s visible and editable within the browser ’ s address bar. Therefore, query strings should be used only in situations where sending incorrect data won ’ t co… Read More
Database Backups using mysqldump The MySQL server, and mysql, the MySQL client, a MySQL installation comes with many useful utility programs. We have seen mysqladmin, which is responsible for the control and retrieval of information about an operati… Read More
Table Types-MySQL MyISAM is the default table type in MySQL Version 3.23. It's based on the ISAM code andhas a lot of useful extensions. The index is stored in a le with the .MYI (MYIndex) extension, and the data is storedin a le with the .… Read More
Maximum Performance from MySQL Optimization is a complicated task because it ultimately requires understanding of the whole system. While it may be possible to do some local optimizations with small knowledge of your system/application, the more optimal y… Read More
Advanced SQL Many of the features shown in this chapter are specific to MySQL's version of SQL. For example, MySQL's functions are useful tools for working with strings, dates and times, and math. Also, we'll show some w… Read More
Running MySQL on Windows MySQL supports TCP/IP on all Windows platforms and named pipes on NT. The defaultis to use named pipes for local connections on NT and TCP/IP for all other cases if theclient has TCP/IP installed. The host name species whic… Read More
Web-Based MySQL Administration Web-Based MySQL Administration At http://phpwizard.net/phpMyAdmin you will find a PHP Web application that can help you manage MySQL. It enables you to manage a MySQL database using a browser and makes administrative work… Read More
LOAD DATA INFILE statement MySQL LOAD DATA INFILE provides an alternative to INSERT for adding new records to a table. With INSERT, you specify data values directly in the INSERT statement. LOAD DATA INFILE reads the values from a separate datafile.The… Read More
Managing the Database Creating Users To create users above and beyond the default privileged root user, issue the grant command. The grant command uses this syntax: GRANT PRIVILEGES ON DATABASE.OBJECTS TO'USER'@'HOST' IDENTIFIED BY 'PASSWORD… Read More
SQL inherently SQL, or Structured Query Language, is not really a language. It does not follow all the rules of the typical computer programming language. There are no constructs in SQL to allow decision branches. You can't go to a sp… Read More
Linking Affects the Speed of MySQL Most of the following tests are done on Linux with the MySQL benchmarks, but they should give some indication for other operating systems and workloads. You get the fastest executable when you link with -static. On Linux, yo… Read More
PHP-Database-Basics-DB-Arrays Adding MySQL to PHP and combining the applications for your dynamic web site is a great start. But, it helps tremendously to structure your database right. We'll give you a solid understanding of both database de… Read More
Why NoSQL? Application requirements have fundamentally changed, and traditional RDBMS technology has failed to keep pace. As a result, the use of NoSQL technology is rising rapidly. Massive change is underway, disrupting the databas… Read More
Create the months table With MySQL Create the months table as follows: CREATE TABLE months ( month_id INT NOT NULL AUTO_INCREMENT, month VARCHAR (20), days INT, PRIMARY KEY (month_id)); To add the months to the new table, s… Read More