0

I have created a table in ms sql server . I want to display the structure of table using DESC command but I am facing an error which shows "Incorrect syntax near the keyword 'DESC'."

I am attaching the code here

CREATE TABLE Job(
job_id VARCHAR(15),
job_title VARCHAR(30),
min_sal NUMERIC(7,2),
max_sal NUMERIC(7,2),
);
INSERT INTO Job (job_id,job_title,min_sal,max_sal) VALUES('IT_PROG','Programmer',4000,10000);
INSERT INTO Job (job_id,job_title,min_sal,max_sal) VALUES('MK_MGR','Marketing Manager',9000,15000);
INSERT INTO Job (job_id,job_title,min_sal,max_sal) VALUES('FI_MGR','Finance Manager',8200,12000);
INSERT INTO Job (job_id,job_title,min_sal,max_sal) VALUES('FI_ACC','Account',4200,9000);
INSERT INTO Job (job_id,job_title,min_sal,max_sal) VALUES('LEC','Lecturer',6000,17000);
INSERT INTO Job (job_id,job_title,min_sal,max_sal) VALUES('COMP_OP','Computer Operator',1500,3000);
DESC Job;
Ajay2707
  • 5,690
  • 6
  • 40
  • 58
  • as far as I remember, DESC TableName is something from Oracle SQLPlus,not from SQL Server – Sergey Jan 25 '21 at 10:04
  • 1
    Does this answer your question? [How can I show the table structure in SQL Server query?](https://stackoverflow.com/questions/18298433/how-can-i-show-the-table-structure-in-sql-server-query) – derpirscher Jan 25 '21 at 10:05
  • https://stackoverflow.com/questions/19882402/not-able-to-use-desc-command-in-sql-server-2012-management-studio?lq=1#:~:text=In%20Sql%20Server%20DESC%20is,the%20short%20form%20of%20DESCribe.&text=DESC%20is%20not%20an%20SQL%20command%2C%20it's%20an%20SQL*Plus,to%20mange%20non%2Doracle%20databases. – Ajay2707 Jan 25 '21 at 10:07
  • Your comment is malformed, @Ajay2707 – Thom A Jan 25 '21 at 10:09

0 Answers0