Cov txheej txheem:

Koj ua li cas tawm hauv SQL?
Koj ua li cas tawm hauv SQL?

Video: Koj ua li cas tawm hauv SQL?

Video: Koj ua li cas tawm hauv SQL?
Video: Koj ua neej li cas lawm Kablia Vwj Nkauj tawm tshiab 2019 2024, Kaum ib hlis
Anonim

Cov lus tsis pub dhau SQL nqe lus

  1. Pib lub tawm tswv yim nrog tus lej thiab lub hnub qub (/*). Txuas ntxiv nrog cov ntawv nyeem ntawm lub tawm tswv yim . Cov ntawv no tuaj yeem hla ntau kab. Xaus lub tawm tswv yim nrog lub hnub qub thiab tus lej (*/).
  2. Pib lub tawm tswv yim nrog -- (ob hyphens). Txuas ntxiv nrog cov ntawv nyeem ntawm lub tawm tswv yim . Cov ntawv no tsis tuaj yeem txuas mus rau kab tshiab.

Ib sab ntawm qhov no, qhov shortcut los tawm tswv yim hauv SQL yog dab tsi?

Rau tawm tswv yim tawm kab code hauv SQL ntawv Server Management Studio (SSMS) Query Window, xaiv kab ntawm cov lej koj xav tau tawm tswv yim tawm thiab ntaus cov keyboard luv 'CTRL + K' ua raws li 'CTRL + C'.

Ib tug kuj yuav nug, dab tsi yog cov lus txib SQL? SQL lus txib tau muab faib ua plaub pawg loj nyob ntawm lawv txoj haujlwm: Cov Lus Txhais Lus (DDL) - Cov no SQL lus txib yog siv los tsim, hloov kho, thiab xa cov qauv ntawm cov khoom siv database. Cov lus txib yog CREATE, ALTER, DROP, RENAME, thiab TRUNCATE.

Ntxiv mus, /* txhais li cas hauv SQL?

/* txhais tau tias pib ntawm ntau kab lus. Piv txwv li: /* CREATE PROC A_SAMPLE_PROC BEGIN AS xaiv * Los ntawm A_SAMPLE_TABLE END */ thaum -- txhais tau tias ib kab lus. Keyboard shortcut rau kev tawm tswv yim hauv MS SQL ntawv Server Studio yog Ctrl + K, Ctrl + C.

Peb sawv cev cov lus hauv Oracle li cas?

Hauv Oracle , a tawm tswv yim pib nrog -- cim yuav tsum nyob rau hauv kawg ntawm ib kab hauv koj SQL nqe lus nrog ib kab so tom qab nws. Txoj kev no ntawm tawm tswv yim tuaj yeem hla ib kab hauv koj SQL nkaus xwb thiab yuav tsum yog qhov kawg ntawm kab.

Pom zoo: