[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 297
  • Last Modified:

select name from productimages where productimagesid is min

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[productimages](
      [productimagesid] [int] IDENTITY(1,1) NOT NULL,
      [productid] [int] NOT NULL,
      [name] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF



select name from productimages where productimagesid is min
0
rgb192
Asked:
rgb192
2 Solutions
 
Rajkumar GsSoftware EngineerCommented:
select * from productimages where
productimagesid = (select min(productimagesid) from productimages)
0
 
SharathData EngineerCommented:
SELECT TOP 1 * 
    FROM productimages 
ORDER BY productimagesid

Open in new window

0
 
rgb192Author Commented:
thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now