Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. T-SQL Syntax

T-SQL Syntax

Scheduled Pinned Locked Moved Database
questiondatabase
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lakshmi_sri
    wrote on last edited by
    #1

    how can i save the value of a field into a parameter in T-SQL?what i wrote is- Create Procedure a_c @C_Name varchar(100), as if exists( select id as 'ID' from ABC where C_Name = @C_Name) begin ---- end else begin --- end go is this syntax correct?and should i declare 'ID'and how can i do it?

    Z 1 Reply Last reply
    0
    • L lakshmi_sri

      how can i save the value of a field into a parameter in T-SQL?what i wrote is- Create Procedure a_c @C_Name varchar(100), as if exists( select id as 'ID' from ABC where C_Name = @C_Name) begin ---- end else begin --- end go is this syntax correct?and should i declare 'ID'and how can i do it?

      Z Offline
      Z Offline
      zhengdong jin
      wrote on last edited by
      #2

      -- create proc create proc abc @para int output as set @para = 1 go --exec proc declare @p int exec abc @p output select @p

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups