Rdbms With Mysql-2
Rdbms With Mysql-2
Write the syntax used to connect to MySQL server. To connect to the server, you will usually need to provide a MySQL user name when you invoke mysql and, most likely, a password. If the server runs on a machine other than the one where you log in, you will also need to specify a host name. Contact your administrator to
find out what connection parameters you should use to connect (that is, what host, user name, and password to use). Once you know the proper parameters, you should be able to connect like this:
. host and user represent the host name where your MySQL server is running and the user name of your MySQL account. Substitute appropriate values for your setup. The ******** represents your password; enter it when mysql displays the Enter password: prompt. If that works, you should see some introductory information followed by a mysql> prompt:
2.Write about float and double data types. 1. FLOAT [(M,D)] [UNSIGNED] [ZEROFILL]: A small (single-precision) floating-point number. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38.These are the theoretical limits, based on the IEEE standard. The actual range might be slightly smaller depending on your hardware or operating system. M is the total number of digits and D is the number of digits following the decimal point. If M and D are omitted, values are stored to the limits allowed by the hardware. A single-precision floating-point number is accurate to approximately 7 decimal places. UNSIGNED, if specified, disallows negateve values. These are the theoretical limits, based on the IEEE standard. The actual range might be slightly smaller depending on your hardware or operating system. M is the total number of digits and D is the number of digits following the decimal point. If M and D are omitted, values are stored to the limits allowed by the hardware. A double-precision floating-point number is accurate to approximately 15 decimal places. UNSIGNED, if specified, disallows negative values.
DOUBLE [(M,D)] [UNSIGNED] [ZEROFILL]: A normal size (double-precision) floating-point number. Allowable values are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308
to 1.7976931348623157E+308.
3.Write and explain the ALTER DATABASE Syntax. You can later an existing table with the ALTER TABLE command, which allows you to add, remove, or modify table fields or indices without the need to re-create the entire table
The action component here can be any of the keywords ADD, DROP, ALTER, or CHANGE, and is followed by a field definition similar to that used by the CREATE TABLE command. This definition consists of the name of the field to be modified and (depending on the operation) a field definition consisting of a new field name, type, and constraints.
and its tables have been created, the enter data into them. This is means of the INSERT command, whose basic below:
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. ///////////////////////////////////////////////////////