Database Articles

Page 542 of 546

How to get a list of MySQL user accounts?

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 222 Views

To get the list of MySQL user accounts, we can use “SELECT USER”. The following is the query to display the list. SELECT User FROM mysql.user; Here is the output. +------------------+ | User | +------------------+ | John | | Mac | | Manish | | mysql.infoschema | | mysql.session ...

Read More

MySQL's DESCRIBE command?

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 9K+ Views

The MySQL’s DESCRIBE or DESC both are equivalent. The DESC is the short form of DESCRIBE command and used to dipslay the information about a table like column names and constraints on column name. The DESCRIBE command is equivalent to the following command − SHOW columns from yourTableName command. The following is the query that display information about a table with the help of DESCRIBE command. The query is as follows. mysql> DESCRIBE Student; Above, Student is the table name in my database. The above query generates the following output. +-------+--------------+------+-----+---------+-------+ | Field | Type ...

Read More

What is the benefit of zerofill in MySQL?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 2K+ Views

ZEROFILL pads the displayed value of the field with zeros up to the display width set in the column definition. Let us understand the role of zero fill in MySQL using an example. Creating a table with two columns, one has zerofill and the second one does not. The query to create a table. mysql> create table ZeroFillDemo -> ( -> First int(18) zerofill, -> Second int(18) -> ); Query OK, 0 rows affected (0.63 sec) We can insert records in the table with the help ...

Read More

How to get the size of the tables of a MySQL database?

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 453 Views

To get the size of the tables of a MySQL database, you can use the “information_schema.tables”. Here is the syntax to know the size of all tables. SELECT TABLE_NAME AS `ALLTABLESNAME`, ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `TABLESIZEIN(MB)` FROM information_schema.TABLES WHERE TABLE_SCHEMA = "yourDatabaseName" ORDER BY (DATA_LENGTH + INDEX_LENGTH) ASC; Let us apply the above syntax to get the size of the tables. mysql> SELECT TABLE_NAME AS `ALLTABLESNAME`, ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `TABLESIZEIN(MB)` -> FROM information_schema.TABLES WHERE TABLE_SCHEMA = "business" ...

Read More

SQL Operation supported in SAP HANA SPS06 SDA

John SAP
John SAP
Updated on 30-Jul-2019 257 Views

With use of SAP HANA SPS06 Smart Data Access, you can only perform SELECT operation on virtual tables moved using new remote data source.

Read More

SQL Operation supported in SAP HANA SPS07 SDA

John SAP
John SAP
Updated on 30-Jul-2019 240 Views

With use of SAP HANA SPS06 Smart Data Access, you can only perform Select, Insert, Update and Delete operation on virtual tables moved using new remote data source.

Read More

Are MySQL database and table names case-sensitive?

Monica Mona
Monica Mona
Updated on 30-Jul-2019 1K+ Views

Actually, the case sensitivity of database and table name depends a lot on the case sensitivity of the underlying operating system. Hence, we can say that such names are not case sensitive in Windows but are case sensitive in most varieties of Unix.

Read More

How to get the list of tables in default MySQL database?

George John
George John
Updated on 30-Jul-2019 521 Views

As we know that the default MySQL database would be the database that is currently in use for subsequent queries. We can get the list of tables in that database by using SHOW TABLES statement. mysql> SHOW TABLES; +------------------+ | Tables_in_sample | +------------------+ | employee | | new_student | | student | +------------------+ 3 rows in set (0.00 sec) The above statement shows the list of table in Sampledatabase.

Read More

In the query [SELECT column1, column2 FROM table_name WHERE condition; ] which clause among ‘SELECT’, ‘WHERE’ and ‘FROM’ is evaluated in the last by the database server and why?

Sai Subramanyam
Sai Subramanyam
Updated on 30-Jul-2019 532 Views

As we know that SELECT clause is used to show all the rows and columns hence SELECT clause is evaluated in the last by the database server.

Read More

What will happen if the MySQL AUTO_INCREMENT column reaches the upper limit of the data type?

vanithasree
vanithasree
Updated on 30-Jul-2019 853 Views

When the AUTO_INCREMENT column reaches the upper limit of data type then the subsequent effort to generate the sequence number fails. That is why it is advised to use a large enough integer data type for the AUTO_INCREMENT column to hold the maximum sequence value required by us. For example, if we will use TINYINT then AUTO_INCREMENT would be able to generate only 127 sequence numbers and in case of UNSIGNED TINYINT, this value can be extended up to 255.

Read More
Showing 5411–5420 of 5,456 articles
« Prev 1 540 541 542 543 544 546 Next »
Advertisements