1SELECT TABLE_NAME
2FROM INFORMATION_SCHEMA.TABLES
3WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_CATALOG='YOUR_Database_name'
1Showing all table:
2show tables;
3
4Showing table data:
5SELECT
6* or column_names
7FROM
8table_name;
1SELECT 'test1' AS [@class]
2 , ( SELECT 'test2' as [@class]
3 , (SELECT 'Name' FOR XML PATH(''))
4 FOR XML PATH('td'), type)
5 ,(SELECT 'test3' as [@class]
6 , (SELECT 'Value' FOR XML PATH(''))
7 FOR XML PATH('td'), type)
8FOR XML PATH('tr'), type
1SELECT TABLE_NAME
2FROM INFORMATION_SCHEMA.TABLES
3WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_CATALOG=db_name()
4and TABLE_NAME like'%table_name%'--to check particular table