SQL Beginner Confusion

  • I am in a SQL class and the problem I am having is beginning to write the coding. The text is variable and I cannot tell what the lines look like when they are typed. Is there anywhere that I can learn SQL like I am in kindergarten and specifically this is SQL server? I have three sets of information that I have to enter into and SQL format but not preset table to reference from. There is employee_id with its variable information, Job title with a few components, SQL_insert for a list of names; and with all of this I am to enter these records into a list of supplied job titles. I could do this layout in Cobol and develop a table in excel or word but there is not hint anywhere on basic SQL development. Can you help or do you have a resource?

    Post #1079213

  • Of course, this is way too much to actually teach here in a forum; so I'll just give a few pointers so you have a starting place to wrap your head around.

    I assume you already have SQL server or sqlexpress installed. Use SQL Server Management Studio to connect to the SQL server instance. This is where you will do everything from making databases and tables, to Creating, Reading, Updating and Deleting (CRUD) data.

    Make a database or use a sample (adventure works, pubs, etc.). Right click to create. A database is a giant container of everything related to your system or application. Like an Excel Workbook in a way. A table is like an Excel Worksheet. Many tables can all be in a database. So make a table, define the column names and datatypes.

    Next, is the SQL language part. In a New Query window, you type commands to do the CRUD. Search these forums, or use the installed Books Online and look for the following keywords:

    To Create a row in a table: INSERT INTO

    To Read one or more rows: SELECT * FROM

    To Update one or more rows: UPDATE

    To Delete one or more rows: DELETE

    From the books online or a simple 'how to write sql' (things like this are available all over the web), you can learn how to start writing code and working with the rows in each table of the database.

    Obviously, there is a ton more to it and this is clearly a simplified way of looking at the world of SQL. Also, the Excel illustrations are just to help you grasp the concepts since you mentioned being familiar with it. In reality, there are lots of differences. However, before you get into that, you should check out these basics and I think it'll make a lot more sense to you.

    Jim

    Jim Murphy
    http://www.sqlwatchmen.com
    @SQLMurph

  • Just to add to Jim's recommendation, google is your friend here.

    T-SQL tutorial in google will resolve a number of possibilities.

    Two quick ones (I don't know their worth, but anything will help in this scenario to get you started):

    http://www.sql-tutorial.net/

    http://www.java2s.com/Tutorial/SQLServer/CatalogSQLServer.htm


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Tech greenie (3/17/2011)


    ...The text is variable and I cannot tell what the lines look like when they are typed....

    I have to admit, this part of your post kind of threw me. What application or whatever are you typing in that doesn't display what you just typed? Or am I misunderstanding you completely?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Try SQL Exercises[/url].

    Start with learning stage.

    Help topics and tips are provided. Support is replying.

  • GSquared (3/18/2011)


    Tech greenie (3/17/2011)


    ...The text is variable and I cannot tell what the lines look like when they are typed....

    I have to admit, this part of your post kind of threw me. What application or whatever are you typing in that doesn't display what you just typed? Or am I misunderstanding you completely?

    And if the problem is that you can't see what the teacher in the class is doing, speak to the teacher.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply