June 19, 2003 at 9:19 am
Is there a way to display a table's properties using TSQL in QA?
In Oracle, the command is "descr or describe":
SQL> descr emp
Name Null? Type
------------------- -------- ----
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
Many thanks. Jeff
June 19, 2003 at 9:45 am
select * from information_schema.columns where table name = 'your table'
June 19, 2003 at 10:07 am
or
sp_help tablename
June 20, 2003 at 11:51 am
quote:
Is there a way to display a table's properties using TSQL in QA?
Have you tried the object browser? F8 turns it on and off. The tables section will show you the columns, indexes, constraints (the primary key is a constraint) and triggers. If I need to review the definition of a table while writing a query, it's what I use.
June 20, 2003 at 10:26 pm
In query Analyzer first highlight/select the Table, then click {ALT} & F1 together
paul
paul
June 20, 2003 at 10:29 pm
Another way is, open Enterprise Manager, connect to the Server, Database, Table. On right hand side, select/highlight the table whose attribute you want, Press CTRL+C, come to Query Analyzer press CTRL+v
paul
paul
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply