Skip to content
Advertisement

Tag: sql-server-2008

SQL Comments on Create Table on SQL Server 2008

I need to create some pretty big tables in SQL Server 2008, while I do have SQL Server Management Studio, I would like to comment the tables and the columns when I create the table. How do I do this? Example of the query I am running: I’ve tried COMMENT’Expiration Date for the Adult CPR’ and COMMENT=’Expiration Date for the

How to count one to many relationships

ReporterTbl has a one to many relationship with AttachmentTbl. In ReporterTbl, I have an ID (101) and I can have AttachmentTbl more than one Attachments related with ReporterTbl.Id Basically, what I am trying to know is given ReporterTbl.ID, how many Attachments do I have? Table structure: Answer Note: It is important that we are using count(a.id), and not count(*). This

named pipe problem using php to connect ot ms sql 2008

I’m am getting a named pipes error when I try to connect to ms sql server 2008 using a php script running an sqlsrv_connect command. In the ms sql configuration stuff tcp/ip, shared memory, and named pipes are all enabled. Everything is stored on the same server, the database, and the php script so I’m just using a “(local)” for

Advertisement