question

coolanup33 avatar image
coolanup33 asked

how can I select a table from a database If I have created 2 tables in a same database?

If I am entering the command SHOW TABLES; it will show two tables which I was created but, I want to select one table from it so how can I select it?
mysql
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
sajikumar.vk avatar image
sajikumar.vk answered
Add parameter to your functionality to accept the table name and show the given table or always show the first table like select top 1 * from sys.tables in MySQL : select table_name from information_schema.columns limit 1
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.