Re: query for tables without PK

From: Narayana Vyas Kondreddi (answer_me_at_hotmail.com)
Date: 05/20/04


Date: Thu, 20 May 2004 17:37:22 +0100

Use the OBJECTPROPERTY function (the TableHasPrimaryKey option). See SQL
Server Books Online for more information.

-- 
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Kevin" <anonymous@discussions.microsoft.com> wrote in message
news:398BB944-469B-4C1B-AD9C-0E3500909484@microsoft.com...
I have a database that I want to use transactional replication on but
several of the tables don't have primary keys - is there a quick query that
I can run that will return a list of the tables without PK's?
Thanks in advance for the help!
Kevin


Relevant Pages

  • Re: so slow DDQ update statement...
    ... Vyas, MVP (SQL Server) ... SQL Server Articles and Code Samples @ http://vyaskn.tripod.com/ ... > Vyas, MVP ...
    (microsoft.public.sqlserver.dts)
  • Re: Stored procedure question
    ... Vyas, MVP (SQL Server) ... > where UserID = @UserID ... > Vyas, MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: delete a system sp
    ... Vyas, MVP (SQL Server) ... >> how to rename or delete a stored procedure .. ...
    (microsoft.public.sqlserver.security)
  • Re: Question about check contraints
    ... that CHECK constraint is looking for. ... Vyas, MVP (SQL Server) ... > Vyas, MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: Lost Permissions after Detach/Attach
    ... Vyas, MVP ... > Did you move those databases to a different machine/different domain? ... > Vyas, MVP (SQL Server) ...
    (microsoft.public.sqlserver.server)