Get MySQL Server-Side Help

radhakrishna
Updated on 20-Jun-2020 13:57:21

200 Views

MySQL provides help command to get server-side help. The syntax of this command is as follows −mysql> help search_stringMySQL uses the argument of help command as the search string for accessing the contents of MySQL reference manual. The search will fail if there would be no match for the search string.For example − suppose I want to get server-side help regarding INTEGER data type then the command for the same would be as follows −mysql> help INTEGER Name: 'INTEGER' Description: INTEGER[(M)] [UNSIGNED] [ZEROFILL] This type is a synonym for INT. URL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.htmlRead More

Calculate Date in MySQL Using Functions

Ayyan
Updated on 20-Jun-2020 13:55:26

179 Views

In MySQL, we can use the following functions to calculate the Date −CURDATE() Function − Basically it returns the current date of the computer.YEAR() Function − It returns the year of the specified date.MONTH() function − It returns the month of the specified date.DAY() Function − It returns the day of the specified date.RIGHT() Function − It returns the number of character as specified within the function from the given date. The part of the expression that compares the returns from RIGHT() function evaluates 1 or 0.To understand it, consider the data, as follows, from a table named ‘Collegedetail’ −mysql> ... Read More

Use ORDER BY Clause While Calculating Date

Kumar Varma
Updated on 20-Jun-2020 13:53:46

158 Views

It would be more convenient to find a record if we will use ORDER BY clause while calculating the date. To understand it, we have the data from table ‘Collegedetail’ as follows −mysql> Select * from Collegedetail; +------+---------+------------+ | ID   | Country | Estb       | +------+---------+------------+ | 111  | INDIA   | 2010-05-01 | | 130  | INDIA   | 1995-10-25 | | 139  | USA     | 1994-09-25 | | 1539 | UK      | 2001-07-23 | | 1545 | Russia  | 2010-07-30 | +------+---------+------------+ 5 rows in set (0.00 sec)Now, suppose if ... Read More

Authentication for MySQL Command Line Tool Login

Prabhas
Updated on 20-Jun-2020 13:52:19

164 Views

Yes, we require authentication for login into MySQL command line tool. For example, if we are trying to log in from windows command line then it will prompt for the password every time. The command for login is as follows −C:\Program Files\MySQL\bin>mysql -u root -p Enter password: *****

Web Fonts in CSS

vanithasree
Updated on 20-Jun-2020 13:51:17

90 Views

Web fonts are used to allow the fonts in CSS, which are not installed on a local system. ExampleThe following code shows the sample code of font face:Live Demo                    @font-face {             font-family: myFirstFont;             src: url(/css/font/SansationLight.woff);          }          div {             font-family: myFirstFont;          }                     This is the example of font face with CSS3.       Original Text :This is the example of font face with CSS3.     Output

Combine Strings with Separator in MySQL

Chandu yadav
Updated on 20-Jun-2020 13:50:36

165 Views

In MySQL, we can combine two or more strings along with a separator by using CONCAT_WS() function. The syntax of this function is CONCAT_WS(Separator, String1, String2, …, StringN)Here, the arguments of CONCAT_WS functions are Separator and the strings which need to be concatenated along with that separator as a single string. Separator except for numeric value must enclose within quotes.Examplemysql> Select CONCAT_WS('.', 'www', 'tutorialspoint', 'com'); +---------------------------------------------+ | CONCAT_WS('.', 'www', 'tutorialspoint', 'com') | +---------------------------------------------+ | www.tutorialspoint.com                      | +---------------------------------------------+ 1 row in set (0.00 sec)In this example above, we can see that the separator ... Read More

MySQL Evaluation of Non-Numeric Text Between Numbers in Quotes

Paul Richard
Updated on 20-Jun-2020 13:49:59

99 Views

Suppose if we are trying to add the numbers having non-numeric text between numbers of a string, then MySQL simply use the first number of that string to evaluate the addition along with a warning. Following example will exhibit this −Examplemysql> Select '1525 * 2' + '200'As Total; +-------+ | Total | +-------+ | 1725  | +-------+ 1 row in set, 1 warning (0.00 sec)From the above query, it is clear that MySQL uses only first number i.e. 1525 for evaluating the addition and ignores the non-numeric text.

Find Storage Engine for a Table in MySQL

Govinda Sai
Updated on 20-Jun-2020 13:48:16

127 Views

The following MySQL statement can find out the storage engine used for ‘Student’ table in database named ‘tutorial’ −mysql> SELECT ENGINE FROM information_schema.TABLES   -> WHERE TABLE_SCHEMA = 'tutorial'   -> AND TABLE_NAME = 'Student'; +--------+ | ENGINE | +--------+ | MyISAM | +--------+ 1 row in set (0.13 sec)

Specify Storage Engine When Creating MySQL Table

Ramu Prasad
Updated on 20-Jun-2020 13:47:45

132 Views

While creating a MySQL table, the storage engine can be specified as follows −mysql> CREATE TABLE Student(id INTEGER PRIMARY KEY, Name VARCHAR(15)) -> ENGINE = 'MyISAM'; Query OK, 0 rows affected (0.28 sec)The ENGINE keyword specifies the storage engine used for this particular table.

Break the Line and Wrap onto Next Line with CSS

Chandu yadav
Updated on 20-Jun-2020 13:47:20

809 Views

Use the word-wrap property to break the line and wrap onto next line. You can try to run the following code to implement a word-wrap property in CSSExampleLive Demo                    div {             width: 200px;             border: 2px solid #000000;          }          div.b {             word-wrap: break-word;          }                     word-wrap: break-word property       ThisisdemotextThisisdemotext:       thisisaveryveryveryveryveryverylongword.       The long word wraps to the next line.     Output

Advertisements