Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Inserting all rows of data from a specific column in one table to a column in a new table

$
0
0

Hello All,

I am trying to insert all rows' worth of data from a column (called "Latitude") in one table ("Data") to another column ("LAT") in a new table ("TEST"). When I ran my code (below), the query executed successfully, but my table "TEST" was empty (i.e., no values stored).

Here's my code:

SELECT

LatitudeINTOLATFROMData

--OR

INSERT INTO LAT

SELECT Latitude FROM Data


How might either one of these code snippets be improved/altered to do what I want it to?

Thanks in advance,
AD


AndrewDen


Viewing all articles
Browse latest Browse all 8428

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>