0

Are these two statements equivalent? Why or why not?

SELECT * FROM table ~~~ SHOW COLUMNS FROM table ~~~

7th Apr 2016, 7:57 PM
CoJo
CoJo - avatar
2 Answers
+ 1
SELECT will show the data. SHOW will show only column names.
3rd May 2016, 2:46 AM
Cristobal Campos
Cristobal Campos - avatar
0
'SHOW COLUMNS ..' is used for getting table schema/structure/definition. It gives you details about all columns and their datatypes, size, default values constraints(if any) etc. Whereas 'SELECT' statement returns data from the table.
16th Nov 2016, 12:24 AM
Satyendra Chaudhary
Satyendra Chaudhary - avatar