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
S

SHAH MAULIK

@SHAH MAULIK
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Retrive column names from temp table
    S SHAH MAULIK

    thanks .. It's working fine..

    Database

  • Retrive column names from temp table
    S SHAH MAULIK

    I am going to create dynamic temp table and I am looking for the columns available in that temp table for the same session id. you can refer code below for the same.

    ALTER procedure abc
    as
    create table #tmp_table
    (id int , name varchar(450) )

    select c.* ,t.name from tempdb.sys.columns c
    INNER JOIN tempdb.sys.tables t
    on c.object_id = t.object_id
    where t.name = '#tmp_table'
    -- don't use like '%tmp_table%'

    drop table #tmp_table
    return 0

    Database
  • Login

  • Don't have an account? Register

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