Looking for a JavaEE Architect or Potential Tech Co-Founder?
Please don't hesitate to contact me.

MSSQL equivalent of DESC in MYSQL

Long time ago I was executing the command that I'm so used to in mysql which is:

desc tablename

This command will give you the rows, its datatype, length, description etc.

I've tried executing this in MSSQL and it's not working tried: describe, desc but failed. I also tried manually selecting the columns from information_schema.columns but it's too ugly. Luckily digging to the documentation I found the stored procedure:

sp_columns which has the same functionality as desc.


sp_columns tablename
MSSQL equivalent of DESC in MYSQL MSSQL equivalent of DESC in MYSQL Reviewed by czetsuya on Monday, March 02, 2009 Rating: 5

No comments:

Powered by Blogger.