0% found this document useful (0 votes)
77 views4 pages

Rdbms With Mysql-2

The document discusses connecting to a MySQL server and provides an example connection string. It also describes the FLOAT and DOUBLE data types in MySQL, including allowed value ranges and precision. Finally, it briefly mentions the ALTER TABLE and INSERT commands' syntax and functionality for modifying tables and inserting data.

Uploaded by

Milan Antony
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views4 pages

Rdbms With Mysql-2

The document discusses connecting to a MySQL server and provides an example connection string. It also describes the FLOAT and DOUBLE data types in MySQL, including allowed value ranges and precision. Finally, it briefly mentions the ALTER TABLE and INSERT commands' syntax and functionality for modifying tables and inserting data.

Uploaded by

Milan Antony
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

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.

4.Discuss the syntax of Insert statement with a suitable example.

Once a database next step is to accomplished by syntax is given

and its tables have been created, the enter data into them. This is means of the INSERT command, whose basic below:

//////////////////////////////////////////////////////// For full Version visit http://smudeassignments.blogspot.com/

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. ///////////////////////////////////////////////////////

You might also like